This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
[PATCH] Fix toplevel configure for --target TARGET_NAME etc.
- From: Jakub Jelinek <jakub at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org, binutils at sources dot redhat dot com
- Date: Thu, 16 Jan 2003 17:17:11 +0100
- Subject: [PATCH] Fix toplevel configure for --target TARGET_NAME etc.
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
Hi!
autoconf supports lots of ways to specify --target etc. arguments,
but with the current toplevel configure only --target=TARGET_NAME
works. If one uses e.g. --target TARGET_NAME, -target=TARGET_NAME,
--t TARGET_NAME etc., it fails badly (e.g. when not using =
but whitespace to separate the option from its optarg, baseargs
contains trailing --target (TARGET_NAME is wiped out), so whatever
comes after ${BUILD,HOST,TARGET}_CONFIGARGS in invocation of some command
is treated as --target's optarg.
The following patch fixes it.
Ok to commit?
2003-01-16 Jakub Jelinek <jakub@redhat.com>
* configure.in (baseargs): Remove all supported forms of
--cache-file, --srcdir, --host, --build and --target options
from argument lists.
* configure: Rebuilt.
--- configure.in.jj 2003-01-16 00:59:46.000000000 +0100
+++ configure.in 2003-01-16 17:00:25.000000000 +0100
@@ -1794,11 +1794,11 @@ AC_SUBST_FILE(serialization_dependencies
# down to subconfigures.
baseargs=`echo " ${ac_configure_args} " | \
sed -e 's/ --no[[^ ]]* / /' \
- -e 's/ --cache[[a-z-]]*=[[^ ]]* / /' \
- -e 's/ --sr[[a-z-]]*=[[^ ]]* / /' \
- -e 's/ --ho[[a-z-]]*=[[^ ]]* / /' \
- -e 's/ --bu[[a-z-]]*=[[^ ]]* / /' \
- -e 's/ --ta[[a-z-]]*=[[^ ]]* / /' \
+ -e 's/ \(--c[[a-z-]]*\|-cache-file\)[[= ]][[^ ]]* / /' \
+ -e 's/ \(--sr[[a-z-]]*\|-srcdir\)[[= ]][[^ ]]* / /' \
+ -e 's/ \(--ho[[a-z-]]*\|-host\)[[= ]][[^ ]]* / /' \
+ -e 's/ \(--bu[[a-z-]]*\|-build\)[[= ]][[^ ]]* / /' \
+ -e 's/ \(--t[[a-z-]]*\|-target\)[[= ]][[^ ]]* / /' \
-e 's/ [[^ -][^ ]*] / /' \
-e 's/^ *//;s/ *$//'`
--- configure.jj 2003-01-16 00:59:46.000000000 +0100
+++ configure 2003-01-16 17:01:13.000000000 +0100
@@ -2452,11 +2452,11 @@ serialization_dependencies=serdep.tmp
# down to subconfigures.
baseargs=`echo " ${ac_configure_args} " | \
sed -e 's/ --no[^ ]* / /' \
- -e 's/ --cache[a-z-]*=[^ ]* / /' \
- -e 's/ --sr[a-z-]*=[^ ]* / /' \
- -e 's/ --ho[a-z-]*=[^ ]* / /' \
- -e 's/ --bu[a-z-]*=[^ ]* / /' \
- -e 's/ --ta[a-z-]*=[^ ]* / /' \
+ -e 's/ \(--c[a-z-]*\|-cache-file\)[= ][^ ]* / /' \
+ -e 's/ \(--sr[a-z-]*\|-srcdir\)[= ][^ ]* / /' \
+ -e 's/ \(--ho[a-z-]*\|-host\)[= ][^ ]* / /' \
+ -e 's/ \(--bu[a-z-]*\|-build\)[= ][^ ]* / /' \
+ -e 's/ \(--t[a-z-]*\|-target\)[= ][^ ]* / /' \
-e 's/ [^ -][^ ]* / /' \
-e 's/^ *//;s/ *$//'`
Jakub