aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandre Oliva <aoliva@redhat.com>2011-01-31 05:26:01 +0000
committerAlexandre Oliva <aoliva@redhat.com>2011-01-31 05:26:01 +0000
commit65b4571a45f1e672f3679d8149cea621e1d7ef1d (patch)
treea5c29203de7293bf8629a461c39e7e1b35d41f3c
parent9c4ea6c5a9607f76721259469ca229957bca2e0b (diff)
downloadgdb-65b4571a45f1e672f3679d8149cea621e1d7ef1d.zip
gdb-65b4571a45f1e672f3679d8149cea621e1d7ef1d.tar.gz
gdb-65b4571a45f1e672f3679d8149cea621e1d7ef1d.tar.bz2
PR libgcj/44341
* configure.ac: Discard --with-* flags for host when configuring target libraries for cross build. * configure: Rebuilt.
-rw-r--r--ChangeLog7
-rwxr-xr-xconfigure44
-rw-r--r--configure.ac44
3 files changed, 93 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 30aa6ba..7711c87 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2011-01-31 Alexandre Oliva <aoliva@redhat.com>
+
+ PR libgcj/44341
+ * configure.ac: Discard --with-* flags for host when configuring
+ target libraries for cross build.
+ * configure: Rebuilt.
+
2011-01-21 Andreas Schwab <schwab@redhat.com>
Sync from GCC:
diff --git a/configure b/configure
index bc408db..518fe6a 100755
--- a/configure
+++ b/configure
@@ -7311,6 +7311,7 @@ serialization_dependencies=serdep.tmp
# Also strip program-prefix, program-suffix, and program-transform-name,
# so that we can pass down a consistent program-transform-name.
baseargs=
+tbaseargs=
keep_next=no
skip_next=no
eval "set -- $ac_configure_args"
@@ -7326,6 +7327,7 @@ do
ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
esac
baseargs="$baseargs '$ac_arg'"
+ tbaseargs="$tbaseargs '$ac_arg'"
keep_next=no
continue
fi
@@ -7347,11 +7349,45 @@ do
;;
esac
+ skip_targ=no
+ case $ac_arg in
+
+ --with-* | --without-*)
+ libopt=`echo "$ac_arg" | sed -e 's,^--[^-_]*[-_],,' -e 's,=.*$,,'`
+
+ case $libopt in
+ *[-_]include)
+ lib=`echo "$libopt" | sed 's,[-_]include$,,'`
+ ;;
+ *[-_]lib)
+ lib=`echo "$libopt" | sed 's,[-_]lib$,,'`
+ ;;
+ *)
+ lib=$libopt
+ ;;
+ esac
+
+
+ case $lib in
+ mpc | mpfr | gmp | ppl | cloog)
+ # If we're processing --with-$lib, --with-$lib-include or
+ # --with-$lib-lib, for one of the libs above, and target is
+ # different from host, don't pass the current argument to any
+ # target library's configure.
+ if test x$is_cross_compiler = xyes; then
+ skip_targ=yes
+ fi
+ ;;
+ esac
+ ;;
+ esac
+
case "$ac_arg" in
--cache-file=/dev/null | \
-cache-file=/dev/null )
# Handled here to avoid the test to skip args below.
baseargs="$baseargs '$ac_arg'"
+ tbaseargs="$tbaseargs '$ac_arg'"
# Assert: $separate_arg should always be no.
keep_next=$separate_arg
;;
@@ -7382,6 +7418,9 @@ do
ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
esac
baseargs="$baseargs '$ac_arg'"
+ if test X"$skip_targ" = Xno; then
+ tbaseargs="$tbaseargs '$ac_arg'"
+ fi
keep_next=$separate_arg
;;
*)
@@ -7408,10 +7447,13 @@ EOF_SED
gcc_transform_name=`cat conftestsed.out`
rm -f conftestsed.out
baseargs="$baseargs --program-transform-name='${gcc_transform_name}'"
+tbaseargs="$tbaseargs --program-transform-name='${gcc_transform_name}'"
if test "$silent" = yes; then
baseargs="$baseargs --silent"
+ tbaseargs="$tbaseargs --silent"
fi
baseargs="$baseargs --disable-option-checking"
+tbaseargs="$tbaseargs --disable-option-checking"
# Record and document user additions to sub configure arguments.
@@ -7437,7 +7479,7 @@ esac
# This seems to be due to autoconf 2.5x stupidity.
host_configargs="$host_configargs --cache-file=./config.cache ${extra_host_args} ${baseargs}"
-target_configargs="$target_configargs ${baseargs}"
+target_configargs="$target_configargs ${tbaseargs}"
# 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 1227054..d266389 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2849,6 +2849,7 @@ AC_SUBST_FILE(serialization_dependencies)
# Also strip program-prefix, program-suffix, and program-transform-name,
# so that we can pass down a consistent program-transform-name.
baseargs=
+tbaseargs=
keep_next=no
skip_next=no
eval "set -- $ac_configure_args"
@@ -2864,6 +2865,7 @@ do
ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
esac
baseargs="$baseargs '$ac_arg'"
+ tbaseargs="$tbaseargs '$ac_arg'"
keep_next=no
continue
fi
@@ -2885,11 +2887,45 @@ do
;;
esac
+ skip_targ=no
+ case $ac_arg in
+changequote(,)
+ --with-* | --without-*)
+ libopt=`echo "$ac_arg" | sed -e 's,^--[^-_]*[-_],,' -e 's,=.*$,,'`
+
+ case $libopt in
+ *[-_]include)
+ lib=`echo "$libopt" | sed 's,[-_]include$,,'`
+ ;;
+ *[-_]lib)
+ lib=`echo "$libopt" | sed 's,[-_]lib$,,'`
+ ;;
+ *)
+ lib=$libopt
+ ;;
+ esac
+changequote([,])
+
+ case $lib in
+ mpc | mpfr | gmp | ppl | cloog)
+ # If we're processing --with-$lib, --with-$lib-include or
+ # --with-$lib-lib, for one of the libs above, and target is
+ # different from host, don't pass the current argument to any
+ # target library's configure.
+ if test x$is_cross_compiler = xyes; then
+ skip_targ=yes
+ fi
+ ;;
+ esac
+ ;;
+ esac
+
case "$ac_arg" in
--cache-file=/dev/null | \
-cache-file=/dev/null )
# Handled here to avoid the test to skip args below.
baseargs="$baseargs '$ac_arg'"
+ tbaseargs="$tbaseargs '$ac_arg'"
# Assert: $separate_arg should always be no.
keep_next=$separate_arg
;;
@@ -2920,6 +2956,9 @@ do
ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
esac
baseargs="$baseargs '$ac_arg'"
+ if test X"$skip_targ" = Xno; then
+ tbaseargs="$tbaseargs '$ac_arg'"
+ fi
keep_next=$separate_arg
;;
*)
@@ -2946,10 +2985,13 @@ EOF_SED
gcc_transform_name=`cat conftestsed.out`
rm -f conftestsed.out
baseargs="$baseargs --program-transform-name='${gcc_transform_name}'"
+tbaseargs="$tbaseargs --program-transform-name='${gcc_transform_name}'"
if test "$silent" = yes; then
baseargs="$baseargs --silent"
+ tbaseargs="$tbaseargs --silent"
fi
baseargs="$baseargs --disable-option-checking"
+tbaseargs="$tbaseargs --disable-option-checking"
# Record and document user additions to sub configure arguments.
AC_ARG_VAR([build_configargs],
@@ -2978,7 +3020,7 @@ esac
# This seems to be due to autoconf 2.5x stupidity.
host_configargs="$host_configargs --cache-file=./config.cache ${extra_host_args} ${baseargs}"
-target_configargs="$target_configargs ${baseargs}"
+target_configargs="$target_configargs ${tbaseargs}"
# Passing a --with-cross-host argument lets the target libraries know
# whether they are being built with a cross-compiler or being built