summaryrefslogtreecommitdiff
path: root/acinclude.m4
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2009-09-24 00:04:37 +0200
committerLudovic Courtès <ludo@gnu.org>2009-09-24 00:06:54 +0200
commit76e8a7588c7cdbdfe96be81366fe9ef43960423f (patch)
tree17a9ffb0f90105db46b34bea187c7f072182de81 /acinclude.m4
parent297273e422ac2b382f6e289b9df5cf9c28b39fa6 (diff)
Move "-z relro" out of $LDFLAGS so it's not in `guile-2.0.pc'.
* acinclude.m4 (GUILE_GNU_LD_RELRO): Substitute `GNU_LD_FLAGS'. * libguile/Makefile.am (libguile_la_LDFLAGS): Add $(GNU_LD_FLAGS). * srfi/Makefile.am (AM_LDFLAGS): New.
Diffstat (limited to 'acinclude.m4')
-rw-r--r--acinclude.m412
1 files changed, 9 insertions, 3 deletions
diff --git a/acinclude.m4 b/acinclude.m4
index edabf24a2..1b836ccbd 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -317,16 +317,22 @@ dnl Check whether GNU ld's read-only relocations (the `PT_GNU_RELRO'
dnl ELF segment header) are supported. This allows things like
dnl statically allocated cells (1) to eventually be remapped read-only
dnl by the loader, and (2) to be identified as pointerless by the
-dnl garbage collector.
+dnl garbage collector. Substitute `GNU_LD_FLAGS' with the relevant
+dnl flags.
AC_DEFUN([GUILE_GNU_LD_RELRO], [
AC_MSG_CHECKING([whether the linker understands `-z relro'])
+ GNU_LD_FLAGS="-Wl,-z -Wl,relro"
+
save_LDFLAGS="$LDFLAGS"
- LDFLAGS="$LDFLAGS -Wl,-z -Wl,relro"
+ LDFLAGS="$LDFLAGS $GNU_LD_FLAGS"
AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])],
[AC_MSG_RESULT([yes])],
[AC_MSG_RESULT([no])
- LDFLAGS="$save_LDFLAGS"])
+ GNU_LD_FLAGS=""])
+ LDFLAGS="$save_LDFLAGS"
+
+ AC_SUBST([GNU_LD_FLAGS])
])
dnl GUILE_READLINE