From 62ab940d81eb103c0e494218398908c4ba41529e Mon Sep 17 00:00:00 2001 From: Benjamin Reed Date: Sat, 26 Jan 2008 13:13:52 -0500 Subject: [PATCH] Fix GNU ld assumption Apple's ld does not support the -z option; wrap the LDFLAGS entries that use -z with a check for $with_gnu_ld. --- configure.in | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-) diff --git a/configure.in b/configure.in index 275ff5b..2c3d00f 100644 --- a/configure.in +++ b/configure.in @@ -214,7 +214,9 @@ if test "x$GCC" = "xyes"; then *[\ \ ]-fPIC[\ \ ]*) ;; *) if cc_supports_flag -fPIC; then PIC_CFLAGS="-fPIC" - PIC_LDFLAGS="-Wl,-z,relro" + if [ "x$with_gnu_ld" = "xyes" ]; then + PIC_LDFLAGS="-Wl,-z,relro" + fi fi ;; esac @@ -223,7 +225,11 @@ if test "x$GCC" = "xyes"; then *[\ \ ]-fPIE[\ \ ]*) ;; *) if cc_supports_flag -fPIE; then PIE_CFLAGS="-fPIE" - PIE_LDFLAGS="-pie -Wl,-z,relro" + if [ "x$with_gnu_ld" = "xyes" ]; then + PIE_LDFLAGS="-pie -Wl,-z,relro" + else + PIE_LDFLAGS="-pie" + fi fi ;; esac -- 1.5.3.7