This is the mail archive of the
mailing list for the GCC project.
-L<path> on AIX
- From: Perry Smith <pedzsan at gmail dot com>
- To: gcc at gcc dot gnu dot org
- Date: Sat, 31 Jan 2009 00:12:57 -0600
- Subject: -L<path> on AIX
Lets suppose I build GNU's sed using gcc 4.2.0 on AIX. At link time,
the flag -L/usr/local/lib/gcc/powerpc-ibm-aix22.214.171.124/4.2.0/../../.. is
passed along with -L/usr/local/lib/gcc/powerpc-ibm-aix126.96.36.199/4.2.0 to
ld. sed links and runs fine.
In the executable, this list of paths is kept and is the default
search path for shared libraries. It can be overridden with the
LIBPATH environment variable but often that brings up more issues than
As it is now, it requires the user of sed to have not only gcc's
libraries installed but the 4.2.0 version of the libraries. And, if
you ask ldd to dump out the libraries that sed uses, it actually does
not use any gcc libraries. But if the /usr/local/lib/gcc/powerpc-ibm-
aix188.8.131.52/4.2.0 directory is gone, then the loader can't find
libintl.a in /usr/local/lib and sed won't execute.
Looking at the code, it appears like spec_path might be a good place
to collapse these paths and remove the ..'s.
Is this a good idea?
Ease Software, Inc. ( http://www.easesoftware.com )
Low cost SATA Disk Systems for IBMs p5, pSeries, and RS/6000 AIX systems