summaryrefslogtreecommitdiff
path: root/sci-mathematics/gmp-ecm/files/gmp-ecm-7.0.4-execstack.patch
blob: 6cca1916191164c47d54b13bd6cb83bc29311df6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
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])