This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [committed, PATCH] Update top-level files from GCC trunk
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Joseph Myers <joseph at codesourcery dot com>
- Cc: Binutils <binutils at sourceware dot org>
- Date: Tue, 17 Mar 2015 05:18:35 -0700
- Subject: Re: [committed, PATCH] Update top-level files from GCC trunk
- Authentication-results: sourceware.org; auth=none
- References: <20150316161557 dot GA29815 at intel dot com> <alpine dot DEB dot 2 dot 10 dot 1503162309270 dot 30120 at digraph dot polyomino dot org dot uk>
On Mon, Mar 16, 2015 at 4:13 PM, Joseph Myers <joseph@codesourcery.com> wrote:
> On Mon, 16 Mar 2015, H.J. Lu wrote:
>
>> Hi,
>>
>> I checked in this patch to update top-level files from GCC trunk.
>
> Thanks - note that config-ml.in also appears to be out of sync.
I am checking in this.
> I think the config/ intl/ libdecnumber/ libiberty/ directories should be
> *identical* between the trees (including ChangeLog contents); include/
> should be identical except for binutils-gdb having more files in it, and
> extra ChangeLog entries relating to those files. At least include/ has
> changes only present in binutils-gdb (copyright year updates, at least),
> so complicating getting it back in sync.
I will see what I can do. Anyone is more than welcome to fix them.
> include/ in newlib-cygwin should probably be identical to the binutils-gdb
> version until it's better understood exactly what is needed there.
>
--
H.J.
From 5df8a8fcf1cdd7896b38f27e65938a8fc89ec2bc Mon Sep 17 00:00:00 2001
From: "H.J. Lu" <hjl.tools@gmail.com>
Date: Tue, 17 Mar 2015 05:15:34 -0700
Subject: [PATCH] Sync config-ml.in with GCC trunk
Sync with GCC
2014-06-13 Thomas Schwinge <thomas@codesourcery.com>
* config-ml.in: Robustify ac_configure_args parsing.
---
ChangeLog | 7 +++++++
config-ml.in | 68 +++++++++++++++++++++++++++++++++---------------------------
2 files changed, 45 insertions(+), 30 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index f3f8e95..a3aa1f1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2015-03-17 H.J. Lu <hongjiu.lu@intel.com>
+
+ Sync with GCC
+ 2014-06-13 Thomas Schwinge <thomas@codesourcery.com>
+
+ * config-ml.in: Robustify ac_configure_args parsing.
+
2015-03-16 H.J. Lu <hongjiu.lu@intel.com>
* Makefile.def: Updated from GCC trunk.
diff --git a/config-ml.in b/config-ml.in
index 1198346..927bad6 100644
--- a/config-ml.in
+++ b/config-ml.in
@@ -2,7 +2,7 @@
# wanting multilib support.
#
# Copyright (C) 1995, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2007, 2008, 2010, 2011 Free Software Foundation, Inc.
+# 2005, 2006, 2007, 2008, 2010, 2011, 2014 Free Software Foundation, Inc.
#
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -105,31 +105,34 @@ ml_realsrcdir=${srcdir}
# Scan all the arguments and set all the ones we need.
-ml_verbose=--verbose
-for option in ${ac_configure_args}
-do
- # strip single quotes surrounding individual options
- case $option in
- \'*\') eval option=$option ;;
- esac
-
- case $option in
- --*) ;;
- -*) option=-$option ;;
- esac
-
- case $option in
- --*=*)
+scan_arguments ()
+{
+ ml_verbose=--verbose
+ for option
+ do
+ # Strip single quotes surrounding individual options, that is, remove one
+ # level of shell quoting for these.
+ case $option in
+ \'*\') eval option=$option ;;
+ esac
+
+ case $option in
+ --*) ;;
+ -*) option=-$option ;;
+ esac
+
+ case $option in
+ --*=*)
optarg=`echo $option | sed -e 's/^[^=]*=//'`
;;
- esac
+ esac
- case $option in
- --disable-*)
+ case $option in
+ --disable-*)
enableopt=`echo ${option} | sed 's:^--disable-:enable_:;s:-:_:g'`
eval $enableopt=no
;;
- --enable-*)
+ --enable-*)
case "$option" in
*=*) ;;
*) optarg=yes ;;
@@ -139,32 +142,37 @@ do
# Don't undo its work.
case $enableopt in
enable_shared | enable_static) ;;
- *) eval $enableopt="$optarg" ;;
+ *) eval $enableopt='$optarg' ;;
esac
;;
- --norecursion | --no-recursion)
+ --norecursion | --no-recursion)
ml_norecursion=yes
;;
- --silent | --sil* | --quiet | --q*)
+ --silent | --sil* | --quiet | --q*)
ml_verbose=--silent
;;
- --verbose | --v | --verb*)
+ --verbose | --v | --verb*)
ml_verbose=--verbose
;;
- --with-*)
+ --with-*)
case "$option" in
*=*) ;;
*) optarg=yes ;;
esac
withopt=`echo ${option} | sed 's:^--::;s:=.*$::;s:-:_:g'`
- eval $withopt="$optarg"
+ eval $withopt='$optarg'
;;
- --without-*)
+ --without-*)
withopt=`echo ${option} | sed 's:^--::;s:out::;s:-:_:g'`
eval $withopt=no
;;
- esac
-done
+ esac
+ done
+}
+# Use eval to properly handle configure arguments such as
+# --enable-foo='--enable-a=1 --enable-b=2 --enable-c=3'.
+eval scan_arguments "${ac_configure_args}"
+unset scan_arguments
# Only do this if --enable-multilib.
if [ "${enable_multilib}" = yes ]; then
@@ -860,7 +868,7 @@ if [ -n "${multidirs}" ] && [ -z "${ml_norecursion}" ]; then
if eval ${ml_config_env} ${ml_config_shell} ${ml_recprog} \
--with-multisubdir=${ml_dir} --with-multisrctop=${multisrctop} \
- ${ac_configure_args} ${ml_config_env} ${ml_srcdiroption} ; then
+ "${ac_configure_args}" ${ml_config_env} ${ml_srcdiroption} ; then
true
else
exit 1
--
2.1.0