]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Add another workaround for LSB on 64-bit Intel.
authormike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Thu, 31 Jan 2013 16:27:05 +0000 (16:27 +0000)
committermike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Thu, 31 Jan 2013 16:27:05 +0000 (16:27 +0000)
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@10853 7a7537e8-13f0-0310-91df-b6672ffda945

config-scripts/cups-compiler.m4

index a7f66f8c28b0595fd8ca9a5d3d3d42d00fcaeaf3..a6d5219749edb8c13f56230bcee1f187db8f903e 100644 (file)
@@ -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...