Boost logo

Boost-Commit :

From: ghost_at_[hidden]
Date: 2008-07-10 11:53:43


Author: vladimir_prus
Date: 2008-07-10 11:53:42 EDT (Thu, 10 Jul 2008)
New Revision: 47293
URL: http://svn.boost.org/trac/boost/changeset/47293

Log:
AIX/gcc fixes.
        - Use native AIX linker
        - Search both for .a and .so libraries
        - Include only solib basename to refer to them, to workaround for lack
        for -soname option.

Patches from Andrew Miller and Andrej van der Zee.

Text files modified:
   trunk/tools/build/v2/tools/gcc.jam | 33 ++++++++++++++++++++++++++++++++-
   1 files changed, 32 insertions(+), 1 deletions(-)

Modified: trunk/tools/build/v2/tools/gcc.jam
==============================================================================
--- trunk/tools/build/v2/tools/gcc.jam (original)
+++ trunk/tools/build/v2/tools/gcc.jam 2008-07-10 11:53:42 EDT (Thu, 10 Jul 2008)
@@ -141,6 +141,10 @@
         {
             linker = hpux ;
         }
+ else if [ os.name ] = AIX
+ {
+ linker = aix ;
+ }
         else
         {
             linker = gnu ;
@@ -327,7 +331,7 @@
     # implement and will increase target path length even more.
     flags gcc.compile OPTIONS <link>shared : -fPIC ;
 }
-if [ os.name ] != NT && [ os.name ] != OSF && [ os.name ] != HPUX
+if [ os.name ] != NT && [ os.name ] != OSF && [ os.name ] != HPUX && [ os.name ] != AIX
 {
     # OSF does have an option called -soname but it doesn't seem to work as
     # expected, therefore it has been disabled.
@@ -611,6 +615,33 @@
             flags $(toolset).link OPTIONS $(condition)/<link>shared
                 : -fPIC : unchecked ;
         }
+
+ case aix :
+ {
+ #
+ # On AIX we *have* to use the native linker.
+ #
+ # Using -brtl, the AIX linker will look for libraries with both the .a and .so
+ # extensions, such as libfoo.a and libfoo.so. Without -brtl, the AIX linker
+ # looks only for libfoo.a. Note that libfoo.a is an archived file that may
+ # contain shared objects and is different from static libs as on Linux.
+ #
+ # The -bnoipath strips the prepending (relative) path of libraries from
+ # the loader section in the target library or executable. Hence, during load-
+ # time LIBPATH (identical to LD_LIBRARY_PATH) or a hard-coded -blibpath
+ # (*similar* to -lrpath/-lrpath-link) is searched. Without this option,
+ # the prepending (relative) path + library name is hard-coded in the loader
+ # section, causing *only* this path to be searched during load-time.
+ # Note that the AIX linker does not have an -soname equivalent, this
+ # is as close as it gets.
+ #
+ # The above options are definately for AIX 5.x, and most likely also for
+ # AIX 4.x and AIX 6.x. For details about AIX linker:
+ # http://download.boulder.ibm.com/ibmdl/pub/software/dw/aix/es-aix_ll.pdf
+ #
+
+ flags $(toolset).link OPTIONS : -Wl,-brtl -Wl,-bnoipath : unchecked ;
+ }
 
     case * :
         {


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk