[Top][All Lists]

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

Re: Ping: Cygwin libtool / assembler problem with -DPIC

From: Gerrit P. Haase
Subject: Re: Ping: Cygwin libtool / assembler problem with -DPIC
Date: Fri, 15 Oct 2004 12:43:49 +0200

Hi Charles,

yet another contra:

> You're missing the point.  *libtool* doesn't know that -DPIC means
> nothing for your code.  On some platforms, you really have to compile 
> DIFFERENT CODE, not just compile the same code in a different way 
> (-fpic), when you want to make a pic object.

Don't mix things up.  `-f' is a command line switch for gcc/ld/whatever,
`-D' defines a macro and is not a command line switch to any tool.
You can think of it as counterpart of a `#define PIC 1' in any included
header and doesn't affect the behaviour of gcc/ld/whatever.

So IMO -D is completely in the user domain, just like CFLAGS, ASFLAGS
et al.  If libtool needs a flag internally to distinguish between shared
a non shared code compilation, then use another one, e.g. LT_DO_LO_NOW?

> See above.  Libtool is providing a symbol that COULD, even on cygwin, be
> of some use.  You cannot specify it as an AM_CFLAGS because it should be
> "on" when building .lo's and "off" when building .o's -- and AM_CFLAGS
> don't allow that fine-grain control.  So libtool does it.

IMO the only relevant and also the only used flag on platforms where it
is needed is -fPIC?

> It is not used by gmp.  It might be used by ncurses.  Or Orbit.  Or any
> one of the thousands of other libtoolized packages.  You're asking me to
> unilaterally remove a feature from libtool that other packages may 
> already be using, because gmp doesn't use it and gets confused by it?

Yes.  Well, what I'm really asking for is to make libtool better, i.e.
do about the fact that a defined PIC macro breaks assembler code
e.g. to disable the macro automatically when assembler code is to be
compiled with libtool. 


reply via email to

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