CXXFLAGS in configure.in

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

CXXFLAGS in configure.in

Xiaowen Wang
Hi:
As of the most recent CVS checkout, the configure.in
(head version 1.81) has the following script for
customizing CXXFLAGS:

if test "$GXX" = yes; then
    CXXFLAGS="-g -O3 -pedantic -Wall"
else
    CXXFLAGS=""
fi

This script won't allow for customized CXXFLAGS.
Changing to the following will do:

if test "$GXX" = yes -a -z "$CXXFLAGS"; then
    CXXFLAGS="-g -O3 -pedantic -Wall"
fi

Xiaowen

__________________________________________________
Do You Yahoo!?
Yahoo! Health - your guide to health and wellness
http://health.yahoo.com


Reply | Threaded
Open this post in threaded view
|

Re: CXXFLAGS in configure.in

Luigi Ballabio-4
At 02:35 PM 5/4/02 -0700, Xiaowen Wang wrote:
>This script won't allow for customized CXXFLAGS.
>Changing to the following will do:
>
>if test "$GXX" = yes -a -z "$CXXFLAGS"; then
>     CXXFLAGS="-g -O3 -pedantic -Wall"
>fi

Xiaowen,
         I made the change, but now I seem to get "-g -O2" out of
nowhere---I sure didn't specify it. Do you have any idea where the above
default could be stored? (it is not an environment variable, I checked those)

Later,
         Luigi



Reply | Threaded
Open this post in threaded view
|

Re: CXXFLAGS in configure.in

Xiaowen Wang
--- Luigi Ballabio <[hidden email]> wrote:

> At 02:35 PM 5/4/02 -0700, Xiaowen Wang wrote:
> >This script won't allow for customized CXXFLAGS.
> >Changing to the following will do:
> >
> >if test "$GXX" = yes -a -z "$CXXFLAGS"; then
> >     CXXFLAGS="-g -O3 -pedantic -Wall"
> >fi
>
> Xiaowen,
>          I made the change, but now I seem to get
> "-g -O2" out of
> nowhere---I sure didn't specify it. Do you have any
> idea where the above
> default could be stored? (it is not an environment
> variable, I checked those)

Yes, that also what I got when I didn't specify a
customized CXXFLAGS for configure.
As I recall, '-g O2' is specified as default flags
somewhere (most probably in configure.in). I won't
have access to my computer until later today, I'll
check it then and get back to you.

You may also want to do 'grep -n "\-O2"
./configure.in' to see whether it's there.

This change is intended for the following to work out:
CXXFLAGS="whatever flags you like" ./configure

Before making this change, as long as the compile is
g++, the CXXFLAGS is always set to "-g -O3 -pedantic
-Wall".

Cheers
Xiaowen

>
> Later,
>          Luigi
>


__________________________________________________
Do You Yahoo!?
Yahoo! Health - your guide to health and wellness
http://health.yahoo.com