From 4d0f6b6662fcea8cbe0697de79d2f41b13331978 Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Wed, 14 Jul 2004 11:05:19 +0000 Subject: [PATCH] Fix Sun toolset so that we invoke cc for C files, not CC. Unfortunately the compiler does not have a switch to change the source language, so we take the command and replace the filename in the last element with 'cc'. [SVN r23539] --- v2/tools/sun.jam | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/v2/tools/sun.jam b/v2/tools/sun.jam index 47d194c9f..76598b2de 100644 --- a/v2/tools/sun.jam +++ b/v2/tools/sun.jam @@ -21,15 +21,18 @@ feature.compose sun-stlport : -library=stlport4 -library=stlport4 ; -rule init ( version ? : command * ) +rule init ( version ? : command * ) { local condition = [ common.check-init-parameters sun : version $(version) ] ; command = [ common.get-invocation-command sun : CC : $(command) : "/opt/SUNWspro/bin" ] ; + + command_c = $(command[1--2]) $(command[-1]:B=cc) ; toolset.flags sun CONFIG_COMMAND $(condition) : $(command) ; + toolset.flags sun CONFIG_C_COMMAND $(condition) : $(command_c) ; } # Declare generators @@ -52,7 +55,7 @@ flags sun.compile INCLUDES ; actions compile.c { - "$(CONFIG_COMMAND)" $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -c -o "$(<)" "$(>)" + "$(CONFIG_C_COMMAND)" $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -c -o "$(<)" "$(>)" } actions compile.c++