From: mike Date: Thu, 31 Jan 2013 16:27:05 +0000 (+0000) Subject: Add another workaround for LSB on 64-bit Intel. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=082ad377956eb997940d4b2103ffa68ba5e9a5f9;p=thirdparty%2Fcups.git Add another workaround for LSB on 64-bit Intel. git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@10853 7a7537e8-13f0-0310-91df-b6672ffda945 --- diff --git a/config-scripts/cups-compiler.m4 b/config-scripts/cups-compiler.m4 index a7f66f8c28..a6d5219749 100644 --- a/config-scripts/cups-compiler.m4 +++ b/config-scripts/cups-compiler.m4 @@ -3,7 +3,7 @@ dnl "$Id$" dnl dnl Compiler stuff for CUPS. dnl -dnl Copyright 2007-2012 by Apple Inc. +dnl Copyright 2007-2013 by Apple Inc. dnl Copyright 1997-2007 by Easy Software Products, all rights reserved. dnl dnl These coded instructions, statements, and computer programs are the @@ -124,24 +124,28 @@ if test -n "$GCC"; then AC_MSG_RESULT(no)) CFLAGS="$OLDCFLAGS" - # The -fPIE option is available with some versions of GCC and adds - # randomization of addresses, which avoids another class of exploits - # that depend on a fixed address for common functions. - AC_MSG_CHECKING(if GCC supports -fPIE) - OLDCFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -fPIE" - AC_TRY_COMPILE(,, - [case "$CC" in - *clang) - PIEFLAGS="-fPIE -Wl,-pie" - ;; - *) - PIEFLAGS="-fPIE -pie" - ;; - esac - AC_MSG_RESULT(yes)], - AC_MSG_RESULT(no)) - CFLAGS="$OLDCFLAGS" + if test "x$LSB_BUILD" != xy; then + # The -fPIE option is available with some versions of GCC and + # adds randomization of addresses, which avoids another class of + # exploits that depend on a fixed address for common functions. + # + # Not available to LSB binaries... + AC_MSG_CHECKING(if GCC supports -fPIE) + OLDCFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -fPIE" + AC_TRY_COMPILE(,, + [case "$CC" in + *clang) + PIEFLAGS="-fPIE -Wl,-pie" + ;; + *) + PIEFLAGS="-fPIE -pie" + ;; + esac + AC_MSG_RESULT(yes)], + AC_MSG_RESULT(no)) + CFLAGS="$OLDCFLAGS" + fi if test "x$with_optim" = x; then # Add useful warning options for tracking down problems...