[Xorp-hackers] [PATCH 1/3] SConstruct fixes

Ben Greear greearb at candelatech.com
Wed Sep 28 14:14:35 PDT 2011


On 09/28/2011 09:14 AM, Ben Greear wrote:
> On 09/28/2011 05:39 AM, Igor Maravić wrote:
>> Yes that check will be false when optimize is set to override.

How about this patch.  I think it basically does the same
thing as you suggested, just cleaner code:

diff --git a/xorp/SConstruct b/xorp/SConstruct
index 81ced07..c094ea5 100644
--- a/xorp/SConstruct
+++ b/xorp/SConstruct
@@ -731,9 +731,8 @@ if not env['optimize'] == 'override':
                   'highest': '-O3',
                   'size': '-Os' }
      bigoflag = bigodict[env['optimize']]
-    if not env['optimize'] == 'no':
-        env.AppendUnique(CFLAGS = [ bigoflag ])
-        env.AppendUnique(CXXFLAGS = [ bigoflag ])
+    env.AppendUnique(CFLAGS = [ bigoflag ])
+    env.AppendUnique(CXXFLAGS = [ bigoflag ])

      # At least on Fedora 13, -Os breaks build with strict-aliasing
      # warnings.  Code looks right to me, so going to just disable


I'm also going to change the default optimize level to 'full' (-O2)
unless someone has any objections.

Thanks,
Ben

-- 
Ben Greear <greearb at candelatech.com>
Candela Technologies Inc  http://www.candelatech.com



More information about the Xorp-hackers mailing list