[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: Vadim Zeitlin
Subject: Re: [lmi] [Bulk] Re: Cross-compiling lmi from Linux to MSW
Date: Wed, 27 Jan 2016 03:44:23 +0100

On Wed, 27 Jan 2016 00:37:38 +0000 Greg Chicares <address@hidden> wrote:

GC> On 2016-01-26 15:07, Vadim Zeitlin wrote:
GC> > On Tue, 26 Jan 2016 04:29:56 +0000 Greg Chicares <address@hidden> wrote:
GC> > 
GC> > GC> On 2016-01-23 15:40, Vadim Zeitlin wrote:
GC> > GC> >
GC> > GC> >  I have a pending patch to lmi configure which adds flags for C++11
GC> > GC> > support, I can post it if you'd like. But until then you indeed 
need to
GC> > GC> > pass it configure manually, although I usually use it as part of 
CXX and
GC> > GC> > not CXXFLAGS to ensure that it's used also for linking. I don't 
GC> > GC> > think it makes any difference under Linux, but it definitely does 
under OS
GC> > GC> > X (because C++11 uses a different standard library there) and so I 
just do
GC> > GC> > it consistency under all platforms.
GC> > GC> 
GC> > GC> Then for OSX, wouldn't it make sense to add it to LDFLAGS? Just 
GC> > 
GC> >  This works too, of course, but then you need to add it to two different
GC> > places instead of only one. And, to be incredibly pedantic, in principle
GC> > LDFLAGS could be used to link a C-only target, in which case -std=c++11
GC> > would be out of place (although almost certainly still harmless).
GC> I understand why the 'g++' driver is used as the linker for C++ programs
GC> as a general rule. If, on OSX, you use something like 'g++ -std=c++11' to 
GC> then we have a g++_as_linker flag that can't be passed in CXXFLAGS or 
GC> Isn't that a design flaw in the gnu build system?

 Thinking more about this, it's probably a flaw in my reasoning: the fact
that there is just one linker (and not separate linkers for C, C++, Fortran
etc) de facto guarantees that we can indeed put this option in LDFLAGS and
I was just being overcautious without thinking it through.

GC> If you don't know what $(CXX) is, how do you add '-std=c++11' to it?

 Well, you could do something like

        eval "CXX=\"$CXX -std=c++11\""

but it indeed doesn't seem very appealing and you've just convinced me that
there is no real advantage to it compared to just adding the flag to
{CXX,LD}FLAGS, so I've changed this in wx configure:


GC> (Maybe that's why you're patching 'configure'.)

 No, not really, I've added this --enable-cxx11 option just for

 But thanks for helping me to make it even more convenient!

reply via email to

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