From b5848e930187a833cbb98dffbfd6870fc4003a44 Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Thu, 16 Feb 2006 12:45:46 +0000 Subject: [PATCH] First version of qcc toolset [SVN r32963] --- v2/tools/qcc.jam | 70 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 v2/tools/qcc.jam diff --git a/v2/tools/qcc.jam b/v2/tools/qcc.jam new file mode 100644 index 000000000..b531276c7 --- /dev/null +++ b/v2/tools/qcc.jam @@ -0,0 +1,70 @@ +# Copyright (c) 2005 Jim Douglas. +# 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) + + +import toolset ; +import feature ; +import toolset : flags ; + +import gcc ; +import common ; +import errors ; +import generators ; + +feature.extend toolset : qcc ; + + +toolset.inherit-generators qcc : gcc ; +generators.override qcc.prebuilt : builtin.lib-generator ; +generators.override qcc.prebuilt : builtin.prebuilt ; +generators.override qcc.searched-lib-generator : searched-lib-generator ; + +toolset.inherit-rules qcc : gcc ; +toolset.inherit-flags qcc : gcc + : off on full on shared ; + +rule init ( version ? : command * : options * ) +{ + local condition = [ common.check-init-parameters qcc : version $(version) ] ; + + command = [ common.get-invocation-command qcc : QCC : $(command) : ] ; + + if $(command) + { + local root = [ common.get-absolute-tool-path $(command[-1]) ] ; + + if $(root) + { + flags qcc.compile.c C_CONFIG_COMMAND : $(root)/qcc ; + } + else + { + # Just for legible output when testing. + flags qcc.compile.c C_CONFIG_COMMAND : qcc ; + } + } + command ?= QCC ; + + common.handle-options qcc : $(condition) : $(command) : $(options) ; +} + +# For both compile and link. +flags qcc OPTIONS on : -gstabs+ ; + +flags qcc.compile OPTIONS off : -Wc,-fno-inline ; +flags qcc.compile OPTIONS on : -Wc,-Wno-inline ; +flags qcc.compile OPTIONS full : -Wc,-finline-functions,-Wno-inline ; +flags qcc.compile CFLAGS : -Wc,-Wall,-Wno-non-virtual-dtor ; + +flags qcc OPTIONS shared : -Wc,-fPIC ; + +flags qcc FINDLIBS : m ; + +actions compile.c +{ + "$(C_CONFIG_COMMAND)" $(LANG) $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -c -o "$(<)" "$(>)" +} + + +