From patchwork Fri Aug 24 20:20:38 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: rbmj X-Patchwork-Id: 179908 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 DB7C72C00D2 for ; Sat, 25 Aug 2012 06:21:15 +1000 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1346444477; h=Comment: DomainKey-Signature:Received:Received:Received:Received: Message-id:Date:From:User-Agent:MIME-version:To:Cc:Subject: References:In-reply-to:Content-type:Content-transfer-encoding: Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:Sender:Delivered-To; bh=8Tb5n1Tc+XPHo/m7aTBR wjq4Dko=; b=gaF3XG8D0gaIR+aS2n+zO1oJve+VFVmHpD/Jowg1wdnNNNnxzgZo jo6DY+Ed5LlPonVviER07ePJBZNs5z7bDPO7i5YMWYSofyLM01gbmd7TKtzLm66V MgHH298VZyQYsdkWhDUGthvQ1O1xKTR7cYy/PfiSqINOpVQmQtgTbrU= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:Message-id:Date:From:User-Agent:MIME-version:To:Cc:Subject:References:In-reply-to:Content-type:Content-transfer-encoding:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=ZLxVEQmjyPQISJOSw1tgWyymLaZ4xWtyPq0rZtBMhCZPAa7M2WV7z2U5bDUG/F W0L/cn7QVzainQdFDRp1AMVTyDwHQgWsomcQ4KmP/+W6ALAXHX9LBBglUzXS0S86 GLuz52UlEnPEEdXKx1/gj5awkE7QMzsUf0yXbnEGr+k8Q=; Received: (qmail 28844 invoked by alias); 24 Aug 2012 20:21:11 -0000 Received: (qmail 28834 invoked by uid 22791); 24 Aug 2012 20:21:09 -0000 X-SWARE-Spam-Status: No, hits=1.7 required=5.0 tests=AWL, BAYES_00, BOTNET, KHOP_THREADED, RCVD_IN_DNSWL_NONE, RCVD_IN_HOSTKARMA_NO, RCVD_IN_HOSTKARMA_YE, RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from vms173003pub.verizon.net (HELO vms173003pub.verizon.net) (206.46.173.3) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 24 Aug 2012 20:20:56 +0000 Received: from [10.16.147.104] ([unknown] [131.121.225.22]) by vms173003.mailsrvcs.net (Sun Java(tm) System Messaging Server 7u2-7.02 32bit (built Apr 16 2009)) with ESMTPA id <0M9A003OT0IFNE80@vms173003.mailsrvcs.net> for gcc-patches@gcc.gnu.org; Fri, 24 Aug 2012 15:20:39 -0500 (CDT) Message-id: <5037E216.1040301@verizon.net> Date: Fri, 24 Aug 2012 16:20:38 -0400 From: rbmj User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:14.0) Gecko/20120713 Thunderbird/14.0 MIME-version: 1.0 To: Bruce Korb Cc: gcc-patches@gcc.gnu.org, bonzini@gnu.org, nathan@codesourcery.com Subject: Re: VxWorks Patches Back from the Dead! References: <503573B9.5090406@verizon.net> <50357EC8.3000709@gnu.org> <5037CD07.6020704@verizon.net> <5037DAA3.3080604@gnu.org> In-reply-to: <5037DAA3.3080604@gnu.org> Content-type: text/plain; charset=ISO-8859-1; format=flowed Content-transfer-encoding: 7bit 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 I have two candidate patches. I've tested both and either can supersede the original 0001-fixincludes-machine_name patch. The first is the original proposed sed expression: --- fixincludes/mkfixinc.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/fixincludes/mkfixinc.sh b/fixincludes/mkfixinc.sh index 89e8ab7..a9f7c30 100755 --- a/fixincludes/mkfixinc.sh +++ b/fixincludes/mkfixinc.sh @@ -15,7 +15,6 @@ case $machine in i?86-*-mingw32* | \ x86_64-*-mingw32* | \ i?86-*-interix* | \ - *-*-vxworks* | \ powerpc-*-eabisim* | \ powerpc-*-eabi* | \ powerpc-*-rtems* | \ @@ -26,6 +25,12 @@ case $machine in (echo "#! /bin/sh" ; echo "exit 0" ) > ${target} ;; + *-*-vxworks* ) + # Platforms for which the machine_name fix breaks things + sed '/if test -s .{MACRO_LIST}/s/$/ \&\& false/' \ + ${srcdir}/fixinc.in > ${target} || exit 1 + ;; + *) cat < ${srcdir}/fixinc.in > ${target} || exit 1 ;; -- The second is adding a target-dependent override to fixinc.in directly (IMHO more complex, but also more complete): --- fixincludes/fixinc.in | 14 +++++++++++++- fixincludes/mkfixinc.sh | 1 - 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/fixincludes/fixinc.in b/fixincludes/fixinc.in index e73aed9..de7be35 100755 --- a/fixincludes/fixinc.in +++ b/fixincludes/fixinc.in @@ -128,6 +128,18 @@ fi # # # # # # # # # # # # # # # # # # # # # # +# Check to see if the machine_name fix needs to be disabled. +# + +case "${target_canonical}" in + *-*-vxworks*) + machine_name_override="OVERRIDE" + ;; +esac + + +# # # # # # # # # # # # # # # # # # # # # +# # In the file macro_list are listed all the predefined # macros that are not in the C89 reserved namespace (the reserved # namespace is all identifiers beginnning with two underscores or one @@ -137,7 +149,7 @@ fi # Note dependency on ASCII. \012 = newline. # tr ' ' '\n' is, alas, not portable. -if test -s ${MACRO_LIST} +if test -s ${MACRO_LIST} && test -z "${machine_name_override}" then if test $VERBOSE -gt 0; then echo "Forbidden identifiers: `tr '\012' ' ' < ${MACRO_LIST}`" diff --git a/fixincludes/mkfixinc.sh b/fixincludes/mkfixinc.sh index 89e8ab7..6653fed 100755 --- a/fixincludes/mkfixinc.sh +++ b/fixincludes/mkfixinc.sh @@ -15,7 +15,6 @@ case $machine in i?86-*-mingw32* | \ x86_64-*-mingw32* | \ i?86-*-interix* | \ - *-*-vxworks* | \ powerpc-*-eabisim* | \ powerpc-*-eabi* | \ powerpc-*-rtems* | \