From 3faecf9a00512dcbc8712c4bca9adae72fb64410 Mon Sep 17 00:00:00 2001 From: Kenneth Heafield Date: Sat, 12 May 2012 14:01:52 -0400 Subject: Give in and copy bjam into cdec source code --- jam-files/boost-build/tools/acc.jam | 118 ++++++++++++++++++++++++++++++++++++ 1 file changed, 118 insertions(+) create mode 100644 jam-files/boost-build/tools/acc.jam (limited to 'jam-files/boost-build/tools/acc.jam') diff --git a/jam-files/boost-build/tools/acc.jam b/jam-files/boost-build/tools/acc.jam new file mode 100644 index 00000000..f04c9dc8 --- /dev/null +++ b/jam-files/boost-build/tools/acc.jam @@ -0,0 +1,118 @@ +# Copyright Vladimir Prus 2004. +# Copyright Toon Knapen 2004. +# Copyright Boris Gubenko 2007. +# 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 toolset : flags ; +import feature ; +import generators ; +import common ; + +feature.extend toolset : acc ; +toolset.inherit acc : unix ; +generators.override builtin.lib-generator : acc.prebuilt ; +generators.override acc.searched-lib-generator : searched-lib-generator ; + +# Configures the acc toolset. +rule init ( version ? : user-provided-command * : options * ) +{ + local condition = [ common.check-init-parameters acc + : version $(version) ] ; + + local command = [ common.get-invocation-command acc : aCC + : $(user-provided-command) ] ; + + common.handle-options acc : $(condition) : $(command) : $(options) ; +} + + +# 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 CFLAGS off : ; +flags acc CFLAGS speed : -O3 ; +flags acc CFLAGS space : -O2 ; + +flags acc CFLAGS off : +d ; +flags acc CFLAGS on : ; +flags acc CFLAGS full : ; + +flags acc C++FLAGS off : ; +flags acc C++FLAGS on : ; + +flags acc C++FLAGS off : ; +flags acc C++FLAGS on : ; + +# 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 CFLAGS on : -g ; +flags acc LINKFLAGS on : -g ; +flags acc LINKFLAGS off : -s ; + +# V2 does not have , not sure what this meant in V1. +# flags acc CFLAGS true : +Z ; + +flags acc CFLAGS on : -pg ; +flags acc LINKFLAGS on : -pg ; + +flags acc CFLAGS 64 : +DD64 ; +flags acc LINKFLAGS 64 : +DD64 ; + +# It is unknown if there's separate option for rpath used only +# at link time, similar to -rpath-link in GNU. We'll use -L. +flags acc RPATH_LINK : ; + +flags acc CFLAGS ; +flags acc C++FLAGS ; +flags acc DEFINES ; +flags acc UNDEFS ; +flags acc HDRS ; +flags acc STDHDRS ; +flags acc LINKFLAGS ; +flags acc ARFLAGS ; + +flags acc LIBPATH ; +flags acc NEEDLIBS ; +flags acc FINDLIBS ; +flags acc FINDLIBS ; + +# Select the compiler name according to the threading model. +flags acc CFLAGS multi : -mt ; +flags acc LINKFLAGS multi : -mt ; + +flags acc.compile.c++ TEMPLATE_DEPTH ; + + +actions acc.link bind NEEDLIBS +{ + $(CONFIG_COMMAND) -AA $(LINKFLAGS) -o "$(<[1])" -L"$(RPATH_LINK)" -L$(LIBPATH) -L$(STDLIBPATH) "$(>)" "$(NEEDLIBS)" "$(NEEDLIBS)" -l$(FINDLIBS) $(OPTIONS) +} + +SPACE = " " ; +actions acc.link.dll bind NEEDLIBS +{ + $(CONFIG_COMMAND) -AA -b $(LINKFLAGS) -o "$(<[1])" -L"$(RPATH_LINK)" -Wl,+h$(<[-1]:D=) -L$(LIBPATH) -L$(STDLIBPATH) "$(>)" "$(NEEDLIBS)" "$(NEEDLIBS)" -l$(FINDLIBS) $(OPTIONS) +} + +actions acc.compile.c +{ + cc -c -I$(BOOST_ROOT) -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) -I"$(HDRS)" -I"$(STDHDRS)" -o "$(<)" "$(>)" $(OPTIONS) +} + +actions acc.compile.c++ +{ + $(CONFIG_COMMAND) -AA -c -Wc,--pending_instantiations=$(TEMPLATE_DEPTH) -I$(BOOST_ROOT) -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) $(C++FLAGS) -I"$(HDRS)" -I"$(STDHDRS)" -o "$(<)" "$(>)" $(OPTIONS) +} + +actions updated together piecemeal acc.archive +{ + ar ru$(ARFLAGS:E="") "$(<)" "$(>)" +} -- cgit v1.2.3