You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/sci-mathematics/gmp-ecm/files/gmp-ecm-7.0.4-execstack.patch

50 lines
1.5 KiB

diff --git a/acinclude.m4 b/acinclude.m4
index e92d2c9..b602f12 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -604,32 +604,3 @@ AC_SUBST(CUDALDFLAGS)
AC_SUBST(CUDARPATH)
])
-
-dnl Checks whether the stack can be marked nonexecutable by passing an option
-dnl to the C-compiler when acting on .s files. Appends that option to ASMFLAGS.
-dnl This macro is adapted from one found in GMP 6.1.1.
-dnl FIXME: This test looks broken. It tests that a file with .note.GNU-stack...
-dnl can be compiled/assembled with -Wa,--noexecstack. It does not determine
-dnl if that command-line option has any effect on general asm code.
-AC_DEFUN([CL_AS_NOEXECSTACK],[
-dnl AC_REQUIRE([AC_PROG_CC]) GMP uses something else
-AC_CACHE_CHECK([whether assembler supports --noexecstack option],
-cl_cv_as_noexecstack, [dnl
- cat > conftest.c <<EOF
-void foo() {}
-EOF
- if AC_TRY_COMMAND([${CC} $CFLAGS $CPPFLAGS
- -S -o conftest.s conftest.c >/dev/null]) \
- && grep .note.GNU-stack conftest.s >/dev/null \
- && AC_TRY_COMMAND([${CC} $CFLAGS $CPPFLAGS -Wa,--noexecstack
- -c -o conftest.o conftest.s >/dev/null])
- then
- cl_cv_as_noexecstack=yes
- else
- cl_cv_as_noexecstack=no
- fi
- rm -f conftest*])
- if test "$cl_cv_as_noexecstack" = yes; then
- LIBECM_LDFLAGS="$LIBECM_LDFLAGS -Wl,-znoexecstack"
- fi
-])
diff --git a/configure.ac b/configure.ac
index 66a18dc..25b9aba 100644
--- a/configure.ac
+++ b/configure.ac
@@ -590,7 +590,6 @@ error
fi
;;
esac
-CL_AS_NOEXECSTACK
AC_SUBST([LIBECM_LDFLAGS])