Boost logo

Boost-Commit :

From: ghost_at_[hidden]
Date: 2007-10-01 13:34:43


Author: vladimir_prus
Date: 2007-10-01 13:34:43 EDT (Mon, 01 Oct 2007)
New Revision: 39642
URL: http://svn.boost.org/trac/boost/changeset/39642

Log:
Fix gcc on HP-UX. Patch from Boris Gubenko.

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

Modified: trunk/tools/build/v2/tools/gcc.jam
==============================================================================
--- trunk/tools/build/v2/tools/gcc.jam (original)
+++ trunk/tools/build/v2/tools/gcc.jam 2007-10-01 13:34:43 EDT (Mon, 01 Oct 2007)
@@ -4,6 +4,7 @@
 # Copyright (c) 2005 Reece H. Dunn.
 # Copyright 2006 Ilya Sokolov.
 # Copyright 2007 Roland Schwarz
+# Copyright 2007 Boris Gubenko.
 #
 # Distributed under the Boost Software License, Version 1.0.
 # (See accompanying file LICENSE_1_0.txt or copy at
@@ -137,6 +138,10 @@
         {
             linker = osf ;
         }
+ else if [ os.name ] = HPUX
+ {
+ linker = hpux ;
+ }
         else
         {
             linker = gnu ;
@@ -332,7 +337,7 @@
     # to implement and will increase target path length even more.
     flags gcc.compile OPTIONS <link>shared : -fPIC ;
 }
-if [ os.name ] != NT && [ os.name ] != OSF
+if [ os.name ] != NT && [ os.name ] != OSF && [ os.name ] != HPUX
 {
     # OSF does have an option called -soname but it doesn't seem to work as
     # expected, therefore it has been disabled.
@@ -500,9 +505,16 @@
 flags gcc.link FINDLIBS-SA <find-shared-library> ;
 flags gcc.link LIBRARIES <library-file> ;
 
-# For <runtime-link>static we made sure there are no dynamic libraries
-# in the link
-flags gcc.link OPTIONS <runtime-link>static : -static ;
+# For <runtime-link>static we made sure there are no dynamic libraries
+# in the link.
+# On HP-UX not all system libraries exist as archived libraries (for example,
+# there is no libunwind.a), so, on this platform, the -static option cannot
+# be specified.
+
+if [ os.name ] != HPUX
+{
+ flags gcc.link OPTIONS <runtime-link>static : -static ;
+}
 
 # Now, the vendor specific flags
 # The parameter linker can be either gnu or sun
@@ -608,6 +620,15 @@
         flags $(toolset).link OPTIONS $(condition)/<link>shared : -mimpure-text
           : unchecked ;
         }
+
+ case hpux :
+ {
+ flags $(toolset).link OPTIONS $(condition)/<debug-symbols>off : -Wl,-s
+ : unchecked ;
+ flags $(toolset).link OPTIONS $(condition)/<link>shared : -fPIC
+ : unchecked ;
+ }
+
     case * :
         {
             errors.user-error
@@ -734,10 +755,6 @@
         {
         # gcc on IRIX does not support multi-threading, don't set anything here.
         }
- case HP_UX :
- {
- # gcc on HP-UX does not support multi-threading, don't set anything here
- }
     case Darwin :
         {
         # Darwin has no threading options, don't set anything here.


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