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]
Other format: [Raw text]

-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-aix5.3.0.0/4.2.0/../../.. is passed along with -L/usr/local/lib/gcc/powerpc-ibm-aix5.3.0.0/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 it solves.

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- aix5.3.0.0/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. ( )

Low cost SATA Disk Systems for IBMs p5, pSeries, and RS/6000 AIX systems

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