From patchwork Sun Sep 26 13:15:38 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ralf Wildenhues X-Patchwork-Id: 65781 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 4D32EB70E1 for ; Sun, 26 Sep 2010 23:15:56 +1000 (EST) Received: (qmail 22603 invoked by alias); 26 Sep 2010 13:15:52 -0000 Received: (qmail 22594 invoked by uid 22791); 26 Sep 2010 13:15:50 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, TW_SV, T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org Received: from mailout-de.gmx.net (HELO mail.gmx.net) (213.165.64.23) by sourceware.org (qpsmtpd/0.43rc1) with SMTP; Sun, 26 Sep 2010 13:15:42 +0000 Received: (qmail invoked by alias); 26 Sep 2010 13:15:39 -0000 Received: from xdsl-89-0-135-164.netcologne.de (EHLO localhost.localdomain) [89.0.135.164] by mail.gmx.net (mp019) with SMTP; 26 Sep 2010 15:15:39 +0200 Received: from ralf by localhost.localdomain with local (Exim 4.69) (envelope-from ) id 1Ozr4s-0004f6-Ue for gcc-patches@gcc.gnu.org; Sun, 26 Sep 2010 15:15:38 +0200 Date: Sun, 26 Sep 2010 15:15:38 +0200 From: Ralf Wildenhues To: gcc-patches@gcc.gnu.org Subject: [PATCH build] PR bootstrap/44621: fix unportable shell quoting Message-ID: <20100926131538.GY17516@gmx.de> Mail-Followup-To: Ralf Wildenhues , gcc-patches@gcc.gnu.org MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.20 (2010-08-04) X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org This fixes known portability issues with nested double- and backquotes in the configury code and helper scripts. Close to obvious, I'd say, but I'd like an OK for trunk, and backporting of the configure-related bits to 4.5 and 4.4 (when respective branches are open for regression fixes of course). The config/po.m4 resp. intl/configure change has been fixed upstream. Thanks, Ralf Fix unportable shell quoting. ChangeLog: 2010-06-26 Ralf Wildenhues PR bootstrap/44621 * configure.ac: Fix unportable shell quoting. * configure: Regenerate. config/ChangeLog: 2010-06-26 Ralf Wildenhues * po.m4 (AM_PO_SUBDIRS): Fix unportable shell quoting. contrib/reghunt/ChangeLog: 2010-06-26 Ralf Wildenhues * bin/gcc-svn-ids: Fix unportable shell quoting. * date_based/reg_periodic: Likewise. * date_based/reg_search: Likewise. intl/ChangeLog: 2010-06-26 Ralf Wildenhues PR bootstrap/44621 * configure: Regenerate. diff --git a/config/po.m4 b/config/po.m4 index 861e3de..2edd5a7 100644 --- a/config/po.m4 +++ b/config/po.m4 @@ -96,7 +96,7 @@ AC_DEFUN([AM_PO_SUBDIRS], case "$ac_file" in */Makefile.in) # Adjust a relative srcdir. ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` - ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" + ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'` ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` # In autoconf-2.13 it is called $ac_given_srcdir. # In autoconf-2.50 it is called $srcdir. diff --git a/configure.ac b/configure.ac index 67e79fe..ee7bfb3 100644 --- a/configure.ac +++ b/configure.ac @@ -351,7 +351,7 @@ ENABLE_GOLD=no) configdirs="$configdirs gold" ;; *) - configdirs="`echo " ${configdirs} " | sed -e 's/ ld / gold /'`" + configdirs=`echo " ${configdirs} " | sed -e 's/ ld / gold /'` ;; esac ENABLE_GOLD=yes diff --git a/contrib/reghunt/bin/gcc-svn-ids b/contrib/reghunt/bin/gcc-svn-ids index 98602cc..2953e56 100755 --- a/contrib/reghunt/bin/gcc-svn-ids +++ b/contrib/reghunt/bin/gcc-svn-ids @@ -63,8 +63,8 @@ fi ID="$1" case ${FROM_KIND} in -index) LINE="`awk -F '|' -v id="${ID}" '{if ($1 == id) print }' < ${LIST}`";; -rev) LINE="`awk -F '|' -v id="${ID}" '{if ($2 == id) print }' < ${LIST}`";; +index) LINE=`awk -F '|' -v id="${ID}" '{if ($1 == id) print }' < ${LIST}`;; +rev) LINE=`awk -F '|' -v id="${ID}" '{if ($2 == id) print }' < ${LIST}`;; *) errmsg "unrecognized FROM kind: ${FROM_KIND}"; usage;; esac diff --git a/contrib/reghunt/date_based/reg_periodic b/contrib/reghunt/date_based/reg_periodic index 498e6dc..a77567d 100755 --- a/contrib/reghunt/date_based/reg_periodic +++ b/contrib/reghunt/date_based/reg_periodic @@ -25,7 +25,7 @@ # is STOP in the current directory. # # -# Copyright (c) 2002, 2003, 2005, 2009 Free Software Foundation, Inc. +# Copyright (c) 2002, 2003, 2005, 2009, 2010 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 @@ -70,7 +70,7 @@ error() { # control tools and report to the user. make_date() { - MADE_DATE="`${DATE} -u +\"%Y-%m-%d %H:%M %Z\" --date \"1970-01-01 ${1} seconds\"`" \ + MADE_DATE=`${DATE} -u +"%Y-%m-%d %H:%M %Z" --date "1970-01-01 ${1} seconds"` \ || error "make_date: date command failed" } diff --git a/contrib/reghunt/date_based/reg_search b/contrib/reghunt/date_based/reg_search index 75cb214..4660205 100755 --- a/contrib/reghunt/date_based/reg_search +++ b/contrib/reghunt/date_based/reg_search @@ -45,7 +45,7 @@ # # # -# Copyright (c) 2002, 2003, 2005, 2009 Free Software Foundation, Inc. +# Copyright (c) 2002, 2003, 2005, 2009, 2010 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 @@ -96,7 +96,7 @@ error() { # control tools and report to the user. make_date() { - MADE_DATE="`${DATE} -u +\"%Y-%m-%d %H:%M %Z\" --date \"1970-01-01 ${1} seconds\"`" \ + MADE_DATE=`${DATE} -u +"%Y-%m-%d %H:%M %Z" --date "1970-01-01 ${1} seconds"` \ || error "make_date: date command failed" }