From 7ed044a4515868a2887b4052b4f48cd61f06ea83 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 22 Aug 2011 18:02:42 +0200 Subject: Pass extra C++ and ld options when extracting library search paths Some options, e.g., -m32, may affect the output. --- build/cxx/gnu/configuration-rules.make | 3 ++- build/cxx/gnu/configure | 8 +++++++- build/cxx/intel/configuration-rules.make | 3 ++- build/cxx/intel/configure | 8 +++++++- 4 files changed, 18 insertions(+), 4 deletions(-) diff --git a/build/cxx/gnu/configuration-rules.make b/build/cxx/gnu/configuration-rules.make index 39a0f15..7eaef83 100644 --- a/build/cxx/gnu/configuration-rules.make +++ b/build/cxx/gnu/configuration-rules.make @@ -4,7 +4,8 @@ # license : GNU GPL v2; see accompanying LICENSE file $(dcf_root)/cxx/gnu/configuration-dynamic.make: | $(dcf_root)/cxx/gnu/. - $(call message,,$(bld_root)/cxx/gnu/configure $@ $(cxx_optimize)) + $(call message,,$(bld_root)/cxx/gnu/configure $@ $(cxx_optimize) \ +"$(cxx_extra_options)" "$(cxx_ld_extra_options)") ifndef %foreign% diff --git a/build/cxx/gnu/configure b/build/cxx/gnu/configure index a52ba7a..bda4bdb 100755 --- a/build/cxx/gnu/configure +++ b/build/cxx/gnu/configure @@ -7,6 +7,8 @@ # $1 out file # $2 optimize (y/n) +# $3 cxx_extra_options +# $4 cxx_ld_extra_options # # bld_root - build root # project_name - project name @@ -27,7 +29,11 @@ $echo "'/usr/local/bin/g++' or 'distcc g++'." $echo cxx_gnu=`read_path --command g++` -cxx_gnu_libraries=`$cxx_gnu -print-search-dirs | sed -e 's/libraries: =//p' -e d` + +# Pass cxx_extra_options and cxx_ld_extra_options since those +# can affect the search paths (e.g., -m32). +# +cxx_gnu_libraries=`$cxx_gnu $3 $4 -print-search-dirs | sed -e 's/libraries: =//p' -e d` optimization= diff --git a/build/cxx/intel/configuration-rules.make b/build/cxx/intel/configuration-rules.make index 17d1402..5edfe2e 100644 --- a/build/cxx/intel/configuration-rules.make +++ b/build/cxx/intel/configuration-rules.make @@ -4,7 +4,8 @@ # license : GNU GPL v2; see accompanying LICENSE file $(dcf_root)/cxx/intel/configuration-dynamic.make: | $(dcf_root)/cxx/intel/. - $(call message,,$(bld_root)/cxx/intel/configure $@ $(cxx_optimize)) + $(call message,,$(bld_root)/cxx/intel/configure $@ $(cxx_optimize) \ +"$(cxx_extra_options)" "$(cxx_ld_extra_options)") ifndef %foreign% diff --git a/build/cxx/intel/configure b/build/cxx/intel/configure index fe0eafe..b4af9bd 100755 --- a/build/cxx/intel/configure +++ b/build/cxx/intel/configure @@ -7,6 +7,8 @@ # $1 out file # $2 optimize (y/n) +# $3 cxx_extra_options +# $4 cxx_ld_extra_options # # bld_root - build root # project_name - project name @@ -27,7 +29,11 @@ $echo "'/opt/intel_cc_80/bin/icpc'." $echo cxx_intel=`read_path --command icpc` -cxx_intel_libraries=`$cxx_intel -print-search-dirs | sed -e 's/libraries: =//p' -e d` + +# Pass cxx_extra_options and cxx_ld_extra_options since those +# can affect the search paths (e.g., -m32). +# +cxx_intel_libraries=`$cxx_intel $3 $4 -print-search-dirs | sed -e 's/libraries: =//p' -e d` # Intel optimizes by default. # -- cgit v1.1