This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: PATCH: Support libtool -no-undefined under GNU/Linux.

On Feb  7, 2001, Mark Mitchell <> wrote:

Alexandre> If they use libtool, it will just work, because, without
Alexandre> -no-undefined, libtool will just create static libraries on these
Alexandre> platforms, that should work in this case.

> That's false on AIX.  We do create a shared library, even when
> -no-undefined is not present.

Indeed.  Because allow_undefined is set on AIX.  On MS-Windows and old
versions of BeOS, this was just unsupported, and static libraries
would get built.  I got confused, sorry.

> So, it would be really good if libtool would support -no-undefined
> usage on GNU/Linux.  If that means working around a GNU linker bug,
> isn't that the sort of thing libtool is supposed to do?

Yep.  I'm convinced.  I'll gladly accept patches that arrange for
libtool to use, in decreasing order of preference:

`${wl}--no-undefined', if running `$LD --no-undefined -shared -o
conftest -lc' works, otherwise

`${wl}--no-undefined ${wl}--allow-shlib-undefined', if running `$LD
--no-undefined -shared -o conftest -lc' works, otherwise,

empty, if everything else fails.

I'd rather not explicitly link libraries against /lib/*,
because this would introduce an unnecessary and possibly incorrect
dependence of the library being created on /lib/*.

If nobody beats me to it, I'll probably implement this myself some

Alexandre Oliva   Enjoy Guarana', see
Red Hat GCC Developer                  aoliva@{,}
CS PhD student at IC-Unicamp        oliva@{,}
Free Software Evangelist    *Please* write to mailing lists, not to me

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]