# Copyright Vladimir Prus 2004. # Copyright Toon Knapen 2004. # Distributed under the Boost Software License, Version 1.0. # (See accompanying file LICENSE_1_0.txt # or copy at http://www.boost.org/LICENSE_1_0.txt) # # Boost.Build V2 toolset for the HP aC++ compiler. # import os ; import toolset ; import feature ; import property ; import generators ; import type ; import common ; import toolset : flags ; import feature : feature get-values ; feature.extend toolset : acc ; toolset.inherit acc : unix ; generators.override acc.prebuilt : builtin.lib-generator ; generators.override acc.prebuilt : builtin.prebuilt ; generators.override acc.searched-lib-generator : searched-lib-generator ; feature.subfeature toolset acc : version ; # Shared libraries:+Z is required for generation of position-independent code # Configures the acc toolset. rule init ( version ? : command * : options * ) { local condition = [ common.check-init-parameters acc : version $(version) ] ; command = [ common.get-invocation-command acc : aCC : $(command) : "/opt/aCC/bin" ] ; # Set the c++ complier to aCC anyway. command ?= aCC ; command_c = cc ; common.handle-options acc : $(condition) : $(command) : $(options) ; toolset.flags acc CONFIG_C_COMMAND $(condition) : $(command_c) ; } # Declare generators generators.register-c-compiler acc.compile.c : C : OBJ : acc ; generators.register-c-compiler acc.compile.c++ : CPP : OBJ : acc ; # Declare flags. flags acc.compile OPTIONS off : ; flags acc.compile OPTIONS speed : -fast ; flags acc.compile OPTIONS space : -O2 ; flags acc.compile OPTIONS off : +d ; flags acc.compile OPTIONS on : ; flags acc.compile OPTIONS full : ; flags acc.compile.c++ OPTIONS off : +noeh ; flags acc.compile.c++ OPTIONS on : ; flags acc.compile.c++ OPTIONS off : ; flags acc.compile.c++ OPTIONS on : ; # architecture/instruction-set/address-model options #flags acc.compile OPTIONS default : +DSnative ; #flags acc.compile OPTIONS blended : +DSblended ; flags acc.compile OPTIONS itanium : +DSitanium ; flags acc.compile OPTIONS itanium2 : +DSitanium2 ; flags acc.compile OPTIONS mckinley : +DSitanium2 ; flags acc.compile OPTIONS montecito : +DSmontecito; # Specify the data model i.e 32/64-bit flags acc.compile OPTIONS 32 : +DD32 ; flags acc.compile OPTIONS 64 : +DD64 ; flags acc.link OPTIONS 32 : +DD32 ; flags acc.link OPTIONS 64 : +DD64 ; # We want the full path to the sources in the debug symbols because otherwise # the debugger won't find the sources when we use boost.build. flags acc.compile OPTIONS on : -g ; flags acc.link OPTIONS on : -g ; flags acc.link OPTIONS off : -s ; flags acc.compile OPTIONS on : -pg ; flags acc.link OPTIONS on : -pg ; flags acc.compile OPTIONS ; flags acc.compile.c++ OPTIONS ; flags acc.compile DEFINES ; flags acc.compile INCLUDES ; flags acc.compile UNDEFS ; flags acc.compile HDRS ; flags acc.compile STDHDRS ; flags acc.link OPTIONS ; # flags acc ARFLAGS ; flags acc.link LIBPATH ; flags acc.link LIBRARIES ; flags acc.link FINDLIBS-ST ; flags acc.link FINDLIBS-SA ; flags sun.link LINK-RUNTIME static : -Wl,-a,archive ; flags sun.link LINK-RUNTIME shared : -Wl,-a,shared ; # Set the compiler and linker flag for threading flags acc.compile OPTIONS multi : -mt ; flags acc.link OPTIONS multi : -mt ; # +Z for position-independent code (PIC) actions link bind LIBRARIES { $(CONFIG_COMMAND) -AA $(OPTIONS) -o "$(<)" -L$(LIBPATH) "$(>)" "$(LIBRARIES)" -l$(FINDLIBS-ST) -l$(FINDLIBS-SA) -Wl,+s } actions link.dll bind LIBRARIES { $(CONFIG_COMMAND) -AA -b $(OPTIONS) -o "$(<[1])" -L$(LIBPATH) "$(>)" "$(LIBRARIES)" -l$(FINDLIBS-ST) -l$(FINDLIBS-SA) -Wl,+s } actions compile.c { "$(CONFIG_C_COMMAND)" $(OPTIONS) -U$(UNDEFS) -D$(DEFINES) -I"$(INCLUDES)" -c -o "$(<)" "$(>)" } actions compile.c++ { "$(CONFIG_COMMAND)" -AA $(OPTIONS) -U$(UNDEFS) -D$(DEFINES) -I"$(INCLUDES)" -c -o "$(<)" "$(>)" } actions piecemeal archive { ar ru$(ARFLAGS:E="") "$(<)" "$(>)" }