aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>2010-10-02 14:52:07 +0000
committerRalf Wildenhues <rwild@gcc.gnu.org>2010-10-02 14:52:07 +0000
commitffedf5114c8bdd5b024fb87e23b935e7d90c6ff3 (patch)
tree2bc93cf6744bf10457800aad14d751389a4dc261
parent8b932a71067075d3e0fcf99fc5bce499df08d96f (diff)
downloadgcc-ffedf5114c8bdd5b024fb87e23b935e7d90c6ff3.zip
gcc-ffedf5114c8bdd5b024fb87e23b935e7d90c6ff3.tar.gz
gcc-ffedf5114c8bdd5b024fb87e23b935e7d90c6ff3.tar.bz2
Allow to pass separate configure arguments for build, host and target.
/: PR bootstrap/45326 PR bootstrap/45174 * configure.ac: Honor initial values of $build_configargs, $host_configargs, $target_configargs. Mark the precious, so environment settings get recorded. * configure: Regenerate. gcc/: * doc/install.texi (Configuration): Document build_configargs, host_configargs, target_configargs. From-SVN: r164904
-rw-r--r--ChangeLog9
-rwxr-xr-xconfigure26
-rw-r--r--configure.ac14
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/doc/install.texi30
5 files changed, 75 insertions, 9 deletions
diff --git a/ChangeLog b/ChangeLog
index 4b89e3c..031a4b2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2010-10-02 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ PR bootstrap/45326
+ PR bootstrap/45174
+ * configure.ac: Honor initial values of $build_configargs,
+ $host_configargs, $target_configargs. Mark the precious, so
+ environment settings get recorded.
+ * configure: Regenerate.
+
2010-09-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
PR bootstrap/45796
diff --git a/configure b/configure
index 3a51249..392f077 100755
--- a/configure
+++ b/configure
@@ -655,12 +655,9 @@ CFLAGS_FOR_BUILD
CC_FOR_BUILD
AS_FOR_BUILD
AR_FOR_BUILD
-target_configargs
target_configdirs
configdirs
-host_configargs
build_configdirs
-build_configargs
INSTALL_GDB_TK
GDB_TK
CONFIGURE_GDB_TK
@@ -668,6 +665,9 @@ build_tooldir
tooldir
GCC_SHLIB_SUBDIR
RPATH_ENVVAR
+target_configargs
+host_configargs
+build_configargs
BUILD_CONFIG
CXXFLAGS_FOR_TARGET
CFLAGS_FOR_TARGET
@@ -835,6 +835,9 @@ CXX
CXXFLAGS
CCC
CPP
+build_configargs
+host_configargs
+target_configargs
AR
AS
DLLTOOL
@@ -1569,6 +1572,12 @@ Some influential environment variables:
CXX C++ compiler command
CXXFLAGS C++ compiler flags
CPP C preprocessor
+ build_configargs
+ additional configure arguments for build directories
+ host_configargs
+ additional configure arguments for host directories
+ target_configargs
+ additional configure arguments for target directories
AR AR for the host
AS AS for the host
DLLTOOL DLLTOOL for the host
@@ -7916,10 +7925,15 @@ if test "$silent" = yes; then
fi
baseargs="$baseargs --disable-option-checking"
+# Record and document user additions to sub configure arguments.
+
+
+
+
# For the build-side libraries, we just need to pretend we're native,
# and not use the same cache file. Multilibs are neither needed nor
# desired.
-build_configargs="--cache-file=../config.cache ${baseargs}"
+build_configargs="$build_configargs --cache-file=../config.cache ${baseargs}"
# For host modules, accept cache file option, or specification as blank.
case "${cache_file}" in
@@ -7933,9 +7947,9 @@ esac
# Host dirs don't like to share a cache file either, horribly enough.
# This seems to be due to autoconf 2.5x stupidity.
-host_configargs="--cache-file=./config.cache ${extra_host_args} ${baseargs}"
+host_configargs="$host_configargs --cache-file=./config.cache ${extra_host_args} ${baseargs}"
-target_configargs=${baseargs}
+target_configargs="$target_configargs ${baseargs}"
# Passing a --with-cross-host argument lets the target libraries know
# whether they are being built with a cross-compiler or being built
diff --git a/configure.ac b/configure.ac
index 6ef9df6..5f80aa9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2969,10 +2969,18 @@ if test "$silent" = yes; then
fi
baseargs="$baseargs --disable-option-checking"
+# Record and document user additions to sub configure arguments.
+AC_ARG_VAR([build_configargs],
+ [additional configure arguments for build directories])
+AC_ARG_VAR([host_configargs],
+ [additional configure arguments for host directories])
+AC_ARG_VAR([target_configargs],
+ [additional configure arguments for target directories])
+
# For the build-side libraries, we just need to pretend we're native,
# and not use the same cache file. Multilibs are neither needed nor
# desired.
-build_configargs="--cache-file=../config.cache ${baseargs}"
+build_configargs="$build_configargs --cache-file=../config.cache ${baseargs}"
# For host modules, accept cache file option, or specification as blank.
case "${cache_file}" in
@@ -2986,9 +2994,9 @@ esac
# Host dirs don't like to share a cache file either, horribly enough.
# This seems to be due to autoconf 2.5x stupidity.
-host_configargs="--cache-file=./config.cache ${extra_host_args} ${baseargs}"
+host_configargs="$host_configargs --cache-file=./config.cache ${extra_host_args} ${baseargs}"
-target_configargs=${baseargs}
+target_configargs="$target_configargs ${baseargs}"
# Passing a --with-cross-host argument lets the target libraries know
# whether they are being built with a cross-compiler or being built
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index b7c2e64..5c22678 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2010-10-02 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ * doc/install.texi (Configuration): Document build_configargs,
+ host_configargs, target_configargs.
+
2010-10-01 Uros Bizjak <ubizjak@gmail.com>
* config/i386/i386.md (*ashl<mode>3_mask): New insn_and_split pattern.
diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi
index a54b450..ce6b5cf 100644
--- a/gcc/doc/install.texi
+++ b/gcc/doc/install.texi
@@ -1991,6 +1991,36 @@ Do not try to compile and run a test libart program.
@end table
+@subsubheading Overriding @command{configure} test results
+
+Sometimes, it might be necessary to override the result of some
+@command{configure} test, for example in order to ease porting to a new
+system or work around a bug in a test. The toplevel @command{configure}
+script provides three variables for this:
+
+@table @code
+
+@item build_configargs
+@cindex @code{build_configargs}
+The contents of this variable is passed to all build @command{configure}
+scripts.
+
+@item host_configargs
+@cindex @code{host_configargs}
+The contents of this variable is passed to all host @command{configure}
+scripts.
+
+@item target_configargs
+@cindex @code{target_configargs}
+The contents of this variable is passed to all target @command{configure}
+scripts.
+
+@end table
+
+In order to avoid shell and @command{make} quoting issues for complex
+overrides, you can pass a setting for @env{CONFIG_SITE} and set
+variables in the site file.
+
@html
<hr />
<p>