aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2011-08-22 18:02:42 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2011-08-22 18:02:42 +0200
commit7ed044a4515868a2887b4052b4f48cd61f06ea83 (patch)
tree26c9dc567f4fa32fff169c8eef24647c4c181311
parent794a56f1f6d986b04651b4ab7aa04f6e2fbb9972 (diff)
Pass extra C++ and ld options when extracting library search paths
Some options, e.g., -m32, may affect the output.
-rw-r--r--build/cxx/gnu/configuration-rules.make3
-rwxr-xr-xbuild/cxx/gnu/configure8
-rw-r--r--build/cxx/intel/configuration-rules.make3
-rwxr-xr-xbuild/cxx/intel/configure8
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.
#