lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lmi] wx configure and CXXFLAGS [Was: Building lmi with pre-wx-2.9.5


From: Greg Chicares
Subject: Re: [lmi] wx configure and CXXFLAGS [Was: Building lmi with pre-wx-2.9.5 snapshot]
Date: Wed, 17 Aug 2016 19:16:35 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.8.0

On 2016-08-17 15:47, Vadim Zeitlin wrote:
> On Wed, 17 Aug 2016 15:29:13 +0000 Greg Chicares <address@hidden> wrote:
> 
> GC> On 2013-07-11 22:51, Vadim Zeitlin wrote:
> GC> > On Thu, 11 Jul 2013 14:06:57 +0000 Greg Chicares <address@hidden> wrote:
> GC> [...]
> GC> > GC> (2) Unrelated question: when building wx itself, using
> GC> > GC>   ../configure [...options...] && make && make install
> GC> > GC> can I add my own CXXFLAGS in configure's options-list?
> GC> > 
> GC> >  I'm afraid there is no way to do it now.
> 
>  Sorry, I think I was just wrong about this and I don't remember at all any
> more why did I write the above. Passing CXXFLAGS on configure command line
> is perfectly possible and this is not something that changed in the last 3
> years, AFAIR it was always the case.

Thanks, now it works perfectly.

Here's the recent evidence that led me to believe your 2013 advice must
be correct. I specify CC and CXX...

../configure --prefix=/opt/lmi/local --build=x86_64-unknown-linux-gnu \
 --host=i686-w64-mingw32 --disable-apple_ieee --disable-aui --disable-compat24 \
 --disable-fswatcher --disable-gif --disable-mediactrl --disable-propgrid \
 --disable-ribbon --disable-richtext --disable-stc --disable-webview \
 --enable-monolithic --enable-shared --enable-std_iostreams --enable-stl \
 --enable-vendor='gcc-491-5fd8da132214bb973133d574fde5cbee' --without-libjpeg \
 --without-libtiff --without-opengl --without-subdirs \
 CC='i686-w64-mingw32-gcc -fno-omit-frame-pointer' \
 CXX='i686-w64-mingw32-g++ -fno-omit-frame-pointer -std=c++11' \
 && make && make install

...and the frame-pointer and C++11 options are actually used:

/opt/lmi/wx-scratch/wxWidgets-4c0e272589667c7cf57407d99f1810e2e83348e4/gcc-491-5fd8da132214bb973133d574fde5cbee/bk-deps
 \
  i686-w64-mingw32-g++ -fno-omit-frame-pointer -std=c++11 -c -o monodll_any.o

So far so good...

>  You should be able to do
> 
>       % $WXWIN/configure CXXFLAGS=-fno-omit-frame-pointer --with-cxx=11
> 
> without any problems.

However, when I (mistakenly) configured thus:

../configure --prefix=/opt/lmi/local --build=x86_64-unknown-linux-gnu \
...
  --without-opengl \
  --without-subdirs \
  CCFLAGS='$(wx_cc_flags)'
  CXXFLAGS='$(wx_cxx_flags)' \

those g++ options were not actually used. That's why I went looking for
an explanation, and found your 2013-07-11T22:51 post. Nevertheless, what
you said today is correct, and can be demonstrated by adding the missing
'\' to the command above:

-  CCFLAGS='$(wx_cc_flags)'
+  CCFLAGS='$(wx_cc_flags)' \

and with that change everything works now. In fact, it's much better to
specify CXXFLAGS rather than CXX in the configure command, because
CXXFLAGS overrides come at the end of the compile command:

i686-w64-mingw32-g++ -c -o monodll_languageinfo.o \
  [...many -I, -D, and -W options...] \
  -mthreads -O2 -fno-omit-frame-pointer -std=c++11  
../src/common/languageinfo.cpp

which of course means I can override '-O2' (e.g.) if I want.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]