1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 03:40:34 +02:00

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.
This commit is contained in:
Ludovic Courtès 2009-09-24 00:04:37 +02:00
parent 297273e422
commit 76e8a7588c
3 changed files with 16 additions and 5 deletions

View file

@ -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

View file

@ -433,7 +433,11 @@ noinst_HEADERS += vm-engine.c vm-i-system.c vm-i-scheme.c vm-i-loader.c
libguile_la_DEPENDENCIES = @LIBLOBJS@
libguile_la_LIBADD = @LIBLOBJS@ $(gnulib_library) $(LTLIBGMP) $(LTLIBUNISTRING)
libguile_la_LDFLAGS = @LTLIBINTL@ -version-info @LIBGUILE_INTERFACE_CURRENT@:@LIBGUILE_INTERFACE_REVISION@:@LIBGUILE_INTERFACE_AGE@ -export-dynamic -no-undefined
libguile_la_LDFLAGS = \
@LTLIBINTL@ \
-version-info @LIBGUILE_INTERFACE_CURRENT@:@LIBGUILE_INTERFACE_REVISION@:@LIBGUILE_INTERFACE_AGE@ \
-export-dynamic -no-undefined \
$(GNU_LD_FLAGS)
if HAVE_LD_VERSION_SCRIPT

View file

@ -1,6 +1,6 @@
## Process this file with Automake to create Makefile.in
##
## Copyright (C) 2001, 2002, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
## Copyright (C) 2001, 2002, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
##
## This file is part of GUILE.
##
@ -30,6 +30,7 @@ AM_CPPFLAGS = -I.. -I$(srcdir)/.. \
-I$(top_srcdir)/lib -I$(top_builddir)/lib
AM_CFLAGS = $(GCC_CFLAGS)
AM_LDFLAGS = $(GNU_LD_FLAGS)
srfiincludedir = $(pkgincludedir)/srfi