[Top][All Lists]

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

Re: [lmi] [Bulk] Re: Cross-compiling lmi from Linux to MSW

From: Greg Chicares
Subject: Re: [lmi] [Bulk] Re: Cross-compiling lmi from Linux to MSW
Date: Tue, 26 Jan 2016 04:29:56 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.3.0

On 2016-01-23 15:40, Vadim Zeitlin wrote:
> On Sat, 23 Jan 2016 06:44:31 +0000 Greg Chicares <address@hidden> wrote:
[...configuring lmi for C++11...]
> GC> BTW, changing the subject, I configured thus:
> GC> 
> GC> PATH=$HOME/msw/i686-w64-mingw32/bin:$PATH ~/src/lmi/configure \
> GC>   --prefix=$HOME/msw/i686-w64-mingw32 --host=i686-w64-mingw32 \
> GC>   CPPFLAGS=-I$HOME/msw/i686-w64-mingw32/include \
> GC>   LDFLAGS=-L$HOME/msw/i686-w64-mingw32/lib \
> GC>   CXXFLAGS='-Wno-unused-local-typedefs -Wno-unused-variable' 2>&1 |less
> GC> 
> GC> so to get C++11 am I supposed to add '-std=c++11' to CXXFLAGS?
> GC> If so, should I do that to every 'configure' command and then
> GC> rebuild every library (except libxml2 and libxslt, which are
> GC> just plain C)?
>  I have a pending patch to lmi configure which adds flags for C++11
> support, I can post it if you'd like. But until then you indeed need to
> pass it configure manually, although I usually use it as part of CXX and
> not CXXFLAGS to ensure that it's used also for linking. I don't actually
> think it makes any difference under Linux, but it definitely does under OS
> X (because C++11 uses a different standard library there) and so I just do
> it consistency under all platforms.

Then for OSX, wouldn't it make sense to add it to LDFLAGS? Just curious.

Using CXX means writing the full compiler name everywhere:
  CXX='i686-w64-mingw32-g++ -std=c++11'
which doesn't seem like it ought to be necessary...so I tried adding
'-std=c++11' to CXXFLAGS, and re-cross-compiling everything seems to work.

But now here's something weird--could we need '-std=c++11' in CPPFLAGS?
I configured lmi thus:

PATH=$HOME/msw/i686-w64-mingw32/bin:$PATH ~/src/lmi/configure \
  --prefix=$HOME/msw/i686-w64-mingw32 --host=i686-w64-mingw32 \
  CPPFLAGS=-I$HOME/msw/i686-w64-mingw32/include \
  LDFLAGS=-L$HOME/msw/i686-w64-mingw32/lib \
  CXXFLAGS='-Wno-unused-local-typedefs -Wno-unused-variable -std=c++11'

and got:

checking wx/pdfdc.h usability... yes
checking wx/pdfdc.h presence... no
configure: WARNING: wx/pdfdc.h: accepted by the compiler, rejected by the 
configure: WARNING: wx/pdfdc.h: proceeding with the compiler's result
checking for wx/pdfdc.h... yes

Anyway, in my debian-8 VM with cross-gcc-4.9.1 and --jobs=8:

  build and install wx:
no '-std' : real 7m16.047s user 37m31.684s sys 2m18.176s
-std=c++11: 2727.30s user 197.85s system 561% cpu 8:41.03 total
521s with C++11, 436 without '-std=': 521/436 - 1 = 20% C++11 penalty

  build and install lmi:
-std=c++11: 776.04s user 59.34s system 628% cpu 2:13.01 total
(I don't find a comparable non-C++11 timing)

I put a file 'xc' in lmi's gwc/ subdirectory on savannah. I'll add an
'xc11' for C++11 after some more testing.

reply via email to

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