From 6ab05a7bf96188f659df098a3966499b51fc41c4 Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Thu, 23 Mar 2006 08:35:37 +0000 Subject: [PATCH] Allow to explicitly specify root, in case where we have trouble auto-detecting it from the compiler name. [SVN r33453] --- v2/tools/gcc.jam | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/v2/tools/gcc.jam b/v2/tools/gcc.jam index 1ead6c8f8..28ad9c0ae 100644 --- a/v2/tools/gcc.jam +++ b/v2/tools/gcc.jam @@ -17,6 +17,12 @@ import set ; import common ; import errors ; +if [ MATCH (--debug-configuration) : [ modules.peek : ARGV ] ] +{ + .debug-configuration = true ; +} + + feature.extend toolset : gcc ; import unix ; @@ -28,7 +34,6 @@ generators.override gcc.prebuilt : builtin.prebuilt ; generators.override gcc.searched-lib-generator : searched-lib-generator ; - # Make the "o" suffix used for gcc toolset on all # platforms type.set-generated-target-suffix OBJ : gcc : o ; @@ -60,11 +65,21 @@ rule init ( version ? : command * : options * ) # If gcc is installed in non-standard location, we'd need to # add LD_LIBRARY_PATH when running programs created with it - # (for unit-test/run rules). + # (for unit-test/run rules). if $(command) { - local path = [ common.get-absolute-tool-path $(command[-1]) ] ; - local lib_path = $(path:D)/lib ; + local root = [ feature.get-values : $(options) ] ; + if ! $(root) + { + root = [ common.get-absolute-tool-path $(command[-1]) ] ; + root = $(root:D) ; + } + local lib_path = $(root)/lib ; + if $(.debug-configuration) + { + ECHO "notice: gcc lib directory for version" $(condition) ; + ECHO "notice: is" $(lib_path) ; + } flags gcc.link RUN_PATH $(condition) : $(lib_path) ; }