[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cups-commit
Subject:    [cups.commit] [CUPS] r9717 - in trunk: . config-scripts
From:       cups-dev () easysw ! com
Date:       2011-04-22 23:02:00
Message-ID: 10488-cups.commit () news ! easysw ! com
[Download RAW message or body]

Author: mike
Date: 2011-04-22 16:01:57 -0700 (Fri, 22 Apr 2011)
New Revision: 9717
Log:
Clang doesn't support "-pie", so just pass as "-Wl,-pie" (which both GCC and
Clang support)


Modified:
   trunk/Makedefs.in
   trunk/config-scripts/cups-compiler.m4

Modified: trunk/Makedefs.in
===================================================================
--- trunk/Makedefs.in	2011-04-22 22:38:01 UTC (rev 9716)
+++ trunk/Makedefs.in	2011-04-22 23:01:57 UTC (rev 9717)
@@ -3,7 +3,7 @@
 #
 #   Common makefile definitions for CUPS.
 #
-#   Copyright 2007-2010 by Apple Inc.
+#   Copyright 2007-2011 by Apple Inc.
 #   Copyright 1997-2007 by Easy Software Products, all rights reserved.
 #
 #   These coded instructions, statements, and computer programs are the

Modified: trunk/config-scripts/cups-compiler.m4
===================================================================
--- trunk/config-scripts/cups-compiler.m4	2011-04-22 22:38:01 UTC (rev 9716)
+++ trunk/config-scripts/cups-compiler.m4	2011-04-22 23:01:57 UTC (rev 9717)
@@ -1,9 +1,9 @@
 dnl
 dnl "$Id$"
 dnl
-dnl   Compiler stuff for the Common UNIX Printing System (CUPS).
+dnl   Compiler stuff for CUPS.
 dnl
-dnl   Copyright 2007-2009 by Apple Inc.
+dnl   Copyright 2007-2011 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
@@ -131,15 +131,15 @@
 		AC_MSG_RESULT(no))
 	CFLAGS="$OLDCFLAGS"
 
-	# The -pie option is available with some versions of GCC and adds
+	# 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 -pie)
+	AC_MSG_CHECKING(if GCC supports -fPIE)
 	OLDCFLAGS="$CFLAGS"
-	CFLAGS="$CFLAGS -pie -fPIE"
+	CFLAGS="$CFLAGS -fPIE"
 	AC_TRY_COMPILE(,,
-		PIEFLAGS="-pie -fPIE"
-		AC_MSG_RESULT(yes),
+		[PIEFLAGS="-fPIE -Wl,-pie"
+		AC_MSG_RESULT(yes)],
 		AC_MSG_RESULT(no))
 	CFLAGS="$OLDCFLAGS"
 
@@ -160,7 +160,7 @@
 			# checking, basically wrapping all string functions
 			# with buffer-limited ones.  Not strictly needed for
 			# CUPS since we already use buffer-limited calls, but
-			# this will catch any additions that are broken.		
+			# this will catch any additions that are broken.
 			CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=2"
 
 			if test x$enable_pie = xyes; then

_______________________________________________
cups-commit mailing list
cups-commit@easysw.com
http://lists.easysw.com/mailman/listinfo/cups-commit
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic