[Top][All Lists]

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

Re: Portability of -no-undefined

From: Bob Friesenhahn
Subject: Re: Portability of -no-undefined
Date: Wed, 20 Oct 2004 09:03:50 -0500 (CDT)

On Tue, 19 Oct 2004, Noah Misch wrote:
easy to craft a link line that omits dependencies, thereby preventing the
resolution of all symbols.  For example, if libfoo depends on libfoo_dep, this
might work on GNU/Linux,

libtool --mode=link $(CC) -o foo.lo bar.lo

It is worth pointing out that providing only partial dependencies at link time may work under modern GNU/Linux, but it depends on non-portable behavior. Even under GNU/Linux, if a dependency is linked differently (itself omitting a dependency), linking may start to fail since not all the information the linker needs is available.

Libtool helps in this regard since the .la files contain dependency information so if a dependency provides a .la file, libtool then knows its own dependencies so the dependent package doesn't need to list the remaining dependencies (which may be system specific).

Bob Friesenhahn

reply via email to

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