[Xorp-cvs] SF.net SVN: xorp:[11696] trunk/xorp/SConstruct
greear at users.sourceforge.net
greear at users.sourceforge.net
Fri Apr 23 11:33:43 PDT 2010
Revision: 11696
http://xorp.svn.sourceforge.net/xorp/?rev=11696&view=rev
Author: greear
Date: 2010-04-23 18:33:43 +0000 (Fri, 23 Apr 2010)
Log Message:
-----------
sparc: Fix compile on systems with alignment warnings.
Disable -Werror for platforms other than x86.
Signed-off-by: Ben Greear <greearb at candelatech.com>
Modified Paths:
--------------
trunk/xorp/SConstruct
Modified: trunk/xorp/SConstruct
===================================================================
--- trunk/xorp/SConstruct 2010-04-23 16:13:30 UTC (rev 11695)
+++ trunk/xorp/SConstruct 2010-04-23 18:33:43 UTC (rev 11696)
@@ -535,9 +535,22 @@
( 'BOOST_DISABLE_THREADS' ),
])
+# Some platforms have alignment warnings that cannot easily be
+# fixed, so we can't enable Werror for them.
+if (host_cpu == "i686" or
+ host_cpu == "x86_64"):
+ env.AppendUnique(CFLAGS = [
+ '-Werror',
+ ])
+ env.AppendUnique(CXXFLAGS = [
+ '-Werror',
+ ])
+else:
+ print "WARNING: Detected non x86 platform, will not enable -Werror compile option: ", host_cpu
+
+
# NOTE: gcc specific flags.
env.AppendUnique(CFLAGS = [
- '-Werror',
'-W',
'-Wall',
'-Wwrite-strings',
@@ -553,7 +566,6 @@
])
env.AppendUnique(CXXFLAGS = [
- '-Werror',
'-W',
'-Wall',
'-Wwrite-strings',
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Xorp-cvs
mailing list