Ticket #1228: gcc.jam.3.patch

File gcc.jam.3.patch, 2.7 KB (added by Boris Gubenko, 15 years ago)

patch for gcc.jam tested on both HP-UX/ia64 and HP-UX PA-RISC

  • tools/gcc.jam

     
    44#  Copyright (c) 2005 Reece H. Dunn.
    55# Copyright 2006 Ilya Sokolov.
    66# Copyright 2007 Roland Schwarz
     7# Copyright 2007 Boris Gubenko.
    78#
    89# Distributed under the Boost Software License, Version 1.0.
    910#    (See accompanying file LICENSE_1_0.txt or copy at
     
    137138        {
    138139            linker = osf ;
    139140        }
     141        else if [ os.name ] = HPUX
     142        {
     143            linker = hpux ;
     144        }
    140145        else
    141146        {                           
    142147            linker = gnu ;
     
    332337    # to implement and will increase target path length even more.
    333338    flags gcc.compile OPTIONS <link>shared : -fPIC ;
    334339}   
    335 if [ os.name ] != NT && [ os.name ] != OSF
     340if [ os.name ] != NT && [ os.name ] != OSF && [ os.name ] != HPUX
    336341{
    337342    # OSF does have an option called -soname but it doesn't seem to work as
    338343    # expected, therefore it has been disabled.
     
    500505flags gcc.link FINDLIBS-SA <find-shared-library> ;
    501506flags gcc.link LIBRARIES <library-file> ;
    502507
    503 # For <runtime-link>static we made sure there are no dynamic libraries
    504 # in the link
    505 flags gcc.link OPTIONS <runtime-link>static : -static ;
    506 
    507508# Now, the vendor specific flags
    508509# The parameter linker can be either gnu or sun
    509510rule init-link-flags ( toolset linker condition )
     
    608609        flags $(toolset).link OPTIONS $(condition)/<link>shared : -mimpure-text
    609610          : unchecked ;
    610611        }
     612
     613    case hpux :
     614        {
     615            flags $(toolset).link OPTIONS $(condition)/<debug-symbols>off : -Wl,-s
     616              : unchecked ;
     617            flags $(toolset).link OPTIONS $(condition)/<link>shared : -fPIC
     618              : unchecked ;
     619        }
     620
    611621    case * :
    612622        {
    613623            errors.user-error
     
    734744        {
    735745        # gcc on IRIX does not support multi-threading, don't set anything here.
    736746        }
    737     case HP_UX :
    738         {
    739         # gcc on HP-UX does not support multi-threading, don't set anything here
    740         }
    741747    case Darwin :
    742748        {
    743749        # Darwin has no threading options, don't set anything here.
     
    750756    }
    751757}
    752758
     759# For <runtime-link>static we made sure there are no dynamic libraries
     760# in the link.
     761# On HP-UX not all system libraries exist as archived libraries (for example,
     762# there is no libunwind.a), so, on this platform, the -static option cannot
     763# be specified.
     764
     765if [ os.name ] != HPUX
     766{
     767    flags gcc.link OPTIONS <runtime-link>static : -static ;
     768}
     769
    753770local rule cpu-flags ( toolset variable : architecture : instruction-set + : values + : default ? )
    754771{
    755772    if $(default)