From patchwork Wed Jun 6 16:36:15 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: rbmj X-Patchwork-Id: 163394 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 D5373B6FA1 for ; Thu, 7 Jun 2012 02:37:02 +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=1339605423; 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:Mailing-List:Precedence: List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender: Delivered-To; bh=5JLI38CTZaVtI4SmETv5ZQ+eVCs=; b=e4mnsXnFuWyh7m+ 9L/IhW6aI2knzpv3l6j2Q6g/SusbbuglcCJ4YWiEPoWIKuT0ZvG+vm4gN2p78Otr 531JiSE7KUa7E60MtM6pMV7tdgFbEHcwnrJh7pD0TXqkvvRxa3nojK2uh8p0oyC3 UYJs1MPEWaEoLUxQvNJW2oyX39Uo= 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:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=hBQl2GgCktJjNBVWxbLIUH5qTmur69ev+wNNGe/OmQ2nKmgSgviKirT4xItEys 4hwdTeYbhwMzfQFrhRJcsHf6U0oDKOoTdayuY65bTKE/0WKzNjvUpiUMsETfVlOE 15vqvvtSdecIZNbxOtosp4k3OFJpALGUq8jb6sk1Up58w=; Received: (qmail 5950 invoked by alias); 6 Jun 2012 16:36:56 -0000 Received: (qmail 5742 invoked by uid 22791); 6 Jun 2012 16:36:55 -0000 X-SWARE-Spam-Status: No, hits=1.8 required=5.0 tests=AWL, BAYES_00, BOTNET, KHOP_THREADED, RCVD_IN_DNSWL_NONE, RCVD_IN_HOSTKARMA_NO, RCVD_IN_HOSTKARMA_YE, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from vms173007pub.verizon.net (HELO vms173007pub.verizon.net) (206.46.173.7) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 06 Jun 2012 16:36:43 +0000 Received: from [10.97.33.69] ([unknown] [151.188.105.156]) by vms173007.mailsrvcs.net (Sun Java(tm) System Messaging Server 7u2-7.02 32bit (built Apr 16 2009)) with ESMTPA id <0M570020RFGFQIH0@vms173007.mailsrvcs.net> for gcc-patches@gcc.gnu.org; Wed, 06 Jun 2012 11:36:16 -0500 (CDT) Message-id: <4FCF86FF.9030100@verizon.net> Date: Wed, 06 Jun 2012 12:36:15 -0400 From: rbmj User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120329 Thunderbird/11.0.1 MIME-version: 1.0 To: gcc-patches@gcc.gnu.org Cc: nathan@codesourcery.com, bkorb@gnu.org Subject: [PATCH 2/7] Added assert fixinclude hack for VxWorks. References: <4FCF863E.6090400@verizon.net> In-reply-to: <4FCF863E.6090400@verizon.net> Content-type: multipart/mixed; boundary=------------070307040309000207030000 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 VxWorks's assert.h relies on adjacent string tokens being joined, and uses macros for some of the strings (e.g. __FILE__). However, it does not put a space after the end quote and before the macro, so instead of replacing the macro, gcc >= 4.7.x thinks it's a user-defined literal token, and since the lookup obviously fails, compilation of libstdc++ dies. Changes: * fixincludes/inclhack.def: Added AAB_vxworks_assert fix. --- fixincludes/inclhack.def | 40 ++++++++++++++++++++++++++++++++++++++++ 1 files changed, 40 insertions(+), 0 deletions(-) From d2cbe2a8f546abf5713e8a6ed614ef2eac1f749b Mon Sep 17 00:00:00 2001 From: rbmj Date: Mon, 4 Jun 2012 13:18:10 -0400 Subject: [PATCH 2/7] Added assert fixinclude hack for VxWorks. VxWorks's assert.h relies on adjacent string tokens being joined, and uses macros for some of the strings (e.g. __FILE__). However, it does not put a space after the end quote and before the macro, so instead of replacing the macro, gcc >= 4.7.x thinks it's a user-defined literal token, and since the lookup obviously fails, compilation of libstdc++ dies. Changes: * fixincludes/inclhack.def: Added AAB_vxworks_assert fix. --- fixincludes/inclhack.def | 40 ++++++++++++++++++++++++++++++++++++++++ 1 files changed, 40 insertions(+), 0 deletions(-) diff --git a/fixincludes/inclhack.def b/fixincludes/inclhack.def index 8a26f28..d66b1cb 100644 --- a/fixincludes/inclhack.def +++ b/fixincludes/inclhack.def @@ -354,6 +354,46 @@ fix = { _EndOfHeader_; }; +/* + * Fix assert.h on VxWorks: + */ +fix = { + hackname = AAB_vxworks_assert; + files = assert.h; + mach = "*-*-vxworks*"; + + replace = <<- _EndOfHeader_ + #ifndef _ASSERT_H + #define _ASSERT_H + + #ifdef assert + #undef assert + #endif + + #if defined(__STDC__) || defined(__cplusplus) + extern void __assert (const char*); + #else + extern void __assert (); + #endif + + #ifdef NDEBUG + #define assert(ign) ((void)0) + #else + + #define ASSERT_STRINGIFY(str) ASSERT_STRINGIFY_HELPER(str) + #define ASSERT_STRINGIFY_HELPER(str) #str + + #define assert(test) ((void) \ + ((test) ? ((void)0) : \ + __assert("Assertion failed: " ASSERT_STRINGIFY(test) ", file " \ + __FILE__ ", line " ASSERT_STRINGIFY(__LINE__) "\n"))) + + #endif + + #endif + _EndOfHeader_; +}; + /* * complex.h on AIX 5 and AIX 6 define _Complex_I and I in terms of __I, -- 1.7.5.4