diff options
author | Ludovic Courtès <ludo@gnu.org> | 2009-09-24 00:04:37 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2009-09-24 00:06:54 +0200 |
commit | 76e8a7588c7cdbdfe96be81366fe9ef43960423f (patch) | |
tree | 17a9ffb0f90105db46b34bea187c7f072182de81 /acinclude.m4 | |
parent | 297273e422ac2b382f6e289b9df5cf9c28b39fa6 (diff) | |
download | guile-76e8a7588c7cdbdfe96be81366fe9ef43960423f.tar.gz |
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.m4 | 12 |
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 |