Index: tools/gcc.jam =================================================================== --- tools/gcc.jam (revision 39548) +++ tools/gcc.jam (working copy) @@ -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 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,10 +505,6 @@ flags gcc.link FINDLIBS-SA ; flags gcc.link LIBRARIES ; -# For static we made sure there are no dynamic libraries -# in the link -flags gcc.link OPTIONS static : -static ; - # Now, the vendor specific flags # The parameter linker can be either gnu or sun rule init-link-flags ( toolset linker condition ) @@ -608,6 +609,15 @@ flags $(toolset).link OPTIONS $(condition)/shared : -mimpure-text : unchecked ; } + + case hpux : + { + flags $(toolset).link OPTIONS $(condition)/off : -Wl,-s + : unchecked ; + flags $(toolset).link OPTIONS $(condition)/shared : -fPIC + : unchecked ; + } + case * : { errors.user-error @@ -734,10 +744,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. @@ -750,6 +756,17 @@ } } +# For 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 static : -static ; +} + local rule cpu-flags ( toolset variable : architecture : instruction-set + : values + : default ? ) { if $(default)