[Xorp-hackers] [PATCH1/3] main SConstract bugs

"Igor Maravić" igorm at etf.rs
Mon Sep 26 09:43:54 PDT 2011


> On 09/26/2011 01:32 AM, "Igor Maravić" wrote:
>>> On 09/23/2011 06:43 AM, "Igor Maravić" wrote:
>>>> When I did "scons install" rtrmngr was looking for .xrls files in folder /xrl/targets not in folder /xorp/xrls, so I changed that.
>>>> Also I removed ; from if statements.
>>>> Also only when value of 'optimize' is set to 'override', we should skip appending CFLAGS/CXXFLAGS.
>>>> When it's value is 'no', CFLAGS/CXXFLAGS still have some value to be appended.
>>>
>>> Please break this into 3 different patches for these 3 different
>>> things.
>>>
>>> For the .xrls part, what error did you see?  I don't see
>>> any trouble with 'scons install' on my systems.  What command
>>> are you using for the compile?
>>>
>>> Thanks,
>>> Ben
>>>
>>> --
>>> Ben Greear<greearb at candelatech.com>
>>> Candela Technologies Inc  http://www.candelatech.com
>>>
>>>
>>
>> Only when value of 'optimize' is set to 'override', we should skip appending CFLAGS/CXXFLAGS.
>> When it's value is 'no', CFLAGS/CXXFLAGS still have some value to be appended.
>
> This code is already in an if statement that checks for override:
>
> # If the user didn't override our default optimization, then
> # sanitize user's CFLAGS/CXXFLAGS to not contain optimization options,
> # and map to an appropriate GCC flag.
> if not env['optimize'] == 'override':
>
> Are you sure your patch is needed?
>
> Thanks,
> Ben
>
>>
>> Signed-off-by: Igor Maravić<igorm at etf.rs>
>> ---
>>
>> diff -upNr xorp.orig/SConstruct xorp/SConstruct
>> --- xorp.orig/SConstruct        2011-09-12 20:23:12.000000000 +0200
>> +++ xorp/SConstruct        2011-09-23 15:28:34.429947091 +0200
>> @@ -713,7 +713,7 @@ if not env['optimize'] == 'override':
>>                    'highest': '-O3',
>>                    'size': '-Os' }
>>       bigoflag = bigodict[env['optimize']]
>> -    if not env['optimize'] == 'no':
>> +    if not env['optimize'] == 'override':
>>           env.AppendUnique(CFLAGS = [ bigoflag ])
>>           env.AppendUnique(CXXFLAGS = [ bigoflag ])
>
>
> --
> Ben Greear <greearb at candelatech.com>
> Candela Technologies Inc  http://www.candelatech.com
>
>

100 % sure.

> # If the user didn't override our default optimization, then
> # sanitize user's CFLAGS/CXXFLAGS to not contain optimization options,
> # and map to an appropriate GCC flag.

This is for the upper line, not for the line that I changed.

Here is the compiler output when patch is not applied.


g++ -o obj/i686-pc-linux-gnu/libxipc/xrl_pf_factory.os -c -g3 -Werror -W -Wall -Wwrite-strings -Wcast-qual -Wpointer-arith -Wcast-align -Woverloaded-virtual -ftemplate-depth-25 -pipe -fPIC -DXRL_PF=120 -D_FORTIFY_SOURCE=0 -Iobj/i686-pc-linux-gnu -I. -I. libxipc/xrl_pf_factory.cc
g++ -o obj/i686-pc-linux-gnu/libxipc/xrl_pf_stcp.os -c -g3 -Werror -W -Wall -Wwrite-strings -Wcast-qual -Wpointer-arith -Wcast-align -Woverloaded-virtual -ftemplate-depth-25 -pipe -fPIC -DXRL_PF=120 -D_FORTIFY_SOURCE=0 -Iobj/i686-pc-linux-gnu -I. -I. libxipc/xrl_pf_stcp.cc
g++ -o obj/i686-pc-linux-gnu/libxipc/xrl_pf_stcp_ph.os -c -g3 -Werror -W -Wall -Wwrite-strings -Wcast-qual -Wpointer-arith -Wcast-align -Woverloaded-virtual -ftemplate-depth-25 -pipe -fPIC -DXRL_PF=120 -D_FORTIFY_SOURCE=0 -Iobj/i686-pc-linux-gnu -I. -I. libxipc/xrl_pf_stcp_ph.cc

As you can see there is no -O0 flag.

I'l send you patches tomorrow, it's the end of work time in Serbia.
Could you send me some instructions how to make git patches.
I made patches with help of linux kernel official instructions.

BR
Igor Maravić





More information about the Xorp-hackers mailing list