diff --git a/v2/tools/tru64.jam b/v2/tools/tru64.jam new file mode 100644 index 000000000..7442ee871 --- /dev/null +++ b/v2/tools/tru64.jam @@ -0,0 +1,154 @@ +# Copyright 2001 David Abrahams. +# Copyright 2004, 2005 Markus Schoepflin. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + +# +# Jam tools information for : +# Compaq Alpha CXX compiler +# +# Notes on this toolset: +# +# - Because of very subtle issues with the default ansi mode, strict_ansi mode +# is used for compilation. One example of things that don't work correctly in +# the default ansi mode is overload resolution of function templates when +# mixed with non-template functions. +# +# - For template instantiation "-timplicit_local" is used. Previously, +# "-tlocal" has been tried to avoid the need for a template repository +# but this doesn't work with manually instantiated templates. "-tweak" +# has not been used to avoid the stream of warning messages issued by +# ar or ld when creating a library or linking an application. +# +# - Debug symbols are generated with "-g3", as this works both in debug and +# release mode. When compiling C++ code without optimization, we additionally +# use "-gall", which generates full symbol table information for all classes, +# structs, and unions. As this turns off optimization, it can't be used when +# optimization is needed. +# + +import feature generators common ; +import toolset : flags ; + +feature.extend toolset : tru64 ; + +# Inherit from Unix toolset to get library ordering magic. +toolset.inherit tru64 : unix ; + +#toolset.inherit-generators tru64 : unix : unix.link unix.link.dll ; + +generators.override builtin.lib-generator : tru64.prebuilt ; +generators.override tru64.searched-lib-generator : searched-lib-generator ; + +#feature.subfeature toolset tru64 : version ; + + +rule init ( version ? : command * : options * ) +{ + local condition = [ common.check-init-parameters tru64 : version $(version) ] ; + + local command = [ common.get-invocation-command tru64 : cxx : $(command) ] ; + command ?= cxx ; + + common.handle-options tru64 : $(condition) : $(command) : $(options) ; +} + +generators.register-c-compiler tru64.compile.c++ : CPP : OBJ : tru64 ; +generators.register-c-compiler tru64.compile.c : C : OBJ : tru64 ; + + + +# No static linking as far as I can tell. +# flags cxx LINKFLAGS static : -bstatic ; +flags tru64.compile OPTIONS on : -g3 ; +flags tru64.compile OPTIONS.c++ off/on : -gall ; +flags tru64.link OPTIONS on : -g ; +flags tru64.link OPTIONS off : -s ; +# FIXME: Can we just add '-shared' to link.dll rule below? +# FIXME: What about -expect_unresolved, what do they do? +#flags tru64.link OPTIONS $(SHARED_TYPES) : -shared -expect_unresolved 'Py*' -expect_unresolved '_Py*' ; + +flags tru64.compile OPTIONS off : -O0 ; +flags tru64.compile OPTIONS speed/on : -O2 ; +flags tru64.compile OPTIONS speed : -O2 ; + +# This (undocumented) macro needs to be defined to get all C function +# overloads required by the C++ standard. +flags tru64.compile.c++ OPTIONS : -D__CNAME_OVERLOADS ; + +# Added for threading support +flags tru64.compile OPTIONS multi : -pthread ; +flags tru64.link OPTIONS multi : -pthread ; + +flags tru64.compile OPTIONS space/on : size ; +flags tru64.compile OPTIONS space : -O1 ; +flags tru64.compile OPTIONS off : -inline none ; + +# The compiler versions tried (up to V6.5-040) hang when compiling Boost code +# with full inlining enabled. So leave it at the default level for now. +# +# flags tru64.compile OPTIONS full : -inline all ; + +flags tru64.compile OPTIONS on : -pg ; +flags tru64.link OPTIONS on : -pg ; + +# Selection of the object model. This flag is needed on both the C++ compiler +# and linker command line. +# +# FIXME: Don't know what this feature does. Disabling until +# it's figured out. + +#flags tru64.compile.c++ OPTIONS arm : -model arm ; +#flags tru64.compile.c++ OPTIONS ansi : -model ansi ; +#flags tru64.compile.c++ OPTIONS default : -model ansi ; + + +#flags tru64.link OPTIONS arm : -model arm ; +#flags tru64.link OPTIONS ansi : -model ansi ; +#flags tru64.link OPTIONS default : -model ansi ; + + +flags tru64.compile OPTIONS ; +flags tru64.compile.c++ OPTIONS ; +flags tru64.compile DEFINES ; +flags tru64.compile INCLUDES ; +flags tru64.link OPTIONS ; + +flags tru64.link LIBPATH ; +flags tru64.link LIBRARIES ; +flags tru64.link FINDLIBS-ST ; +flags tru64.link FINDLIBS-SA ; + + +actions link bind LIBRARIES +{ + $(CONFIG_COMMAND) -noimplicit_include $(OPTIONS) -o "$(<)" -L$(LIBPATH) "$(>)" "$(LIBRARIES)" -l$(FINDLIBS-ST) -l$(FINDLIBS-SA) -lrt -lm +} + +actions link.dll bind LIBRARIES +{ + $(CONFIG_COMMAND) -qrtti -noimplicit_include $(OPTIONS) -o "$(<[1])" -L$(LIBPATH) "$(>)" "$(LIBRARIES)" -l$(FINDLIBS-ST) -l$(FINDLIBS-SA) -lm +} + + +# Note: Relaxed ANSI mode (-std) is used for compilation because in strict ANSI +# C89 mode (-std1) the compiler doesn't accept C++ comments in C files. As -std +# is the default, no special flag is needed. + +# FIXME: Need to add whatever flags that makes compiler act in C mode. +actions compile.c +{ + $(CONFIG_COMMAND) -msg_display_number -msg-disable 186,450,1115 -c $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -o "$(<)" "$(>)" +} + +# Note: DON'T disable warning 1133 -- the compiler is buggy and you +# really can't ignore this one! +actions compile.c++ +{ + $(CONFIG_COMMAND) -c -std strict_ansi -nopure_cname -noimplicit_include -timplicit_local -ptr "$(<[1]:D)/cxx_repository" -msg_display_number -msg_disable 186,450,1115 $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -o "$(<)" "$(>)" +} + +actions updated together piecemeal archive +{ + ar -ru $(<) $(>) +}