From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 43556 invoked by alias); 27 Jun 2018 14:27:27 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 42939 invoked by uid 89); 27 Jun 2018 14:27:26 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-spam-relays-external:209.85.208.66, H*RU:209.85.208.66, H*r:sk:r17-v6s X-HELO: mail-ed1-f66.google.com Received: from mail-ed1-f66.google.com (HELO mail-ed1-f66.google.com) (209.85.208.66) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 27 Jun 2018 14:27:24 +0000 Received: by mail-ed1-f66.google.com with SMTP id r17-v6so3211510edo.13 for ; Wed, 27 Jun 2018 07:27:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rasmusvillemoes.dk; s=google; h=from:to:cc:subject:date:message-id; bh=sGVbyyl/liA7M9BAytcUvqxlBrwIFgopTmmzrZVd7jo=; b=ZZlNQYl0dDAUXbUG+1EIu8BJVzTfPZhLns+PSBluIW8znjPT3F1UM+aMNUb9uqG0Oz 1WxOvar7kxqR7qZGubkNCYWXY3nYFXdDMxaRWQpmgqKGJe5k80xpaNdHbXP7x/wu+HRD t9aamF6lKbvqOI+mXhMqo1Kx2De9gdyy7ENdo= Return-Path: Received: from prevas-ravi.waoo.dk (dhcp-5-186-124-231.cgn.ip.fibianet.dk. [5.186.124.231]) by smtp.gmail.com with ESMTPSA id j14-v6sm1590962edr.73.2018.06.27.07.27.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 27 Jun 2018 07:27:21 -0700 (PDT) From: Rasmus Villemoes To: gcc-patches@gcc.gnu.org Cc: bkorb@gnu.org, Olivier Hainque , Rasmus Villemoes Subject: [PATCH] fixincludes: vxworks: regs.h: Guard include of vxTypesOld.h by !_ASMLANGUAGE Date: Wed, 27 Jun 2018 14:27:00 -0000 Message-Id: <20180627142715.10534-1-rv@rasmusvillemoes.dk> X-SW-Source: 2018-06/txt/msg01683.txt.bz2 VxWorks' regs.h does include some files that need types defined in vxTypesOld.h, and it does not itself include that header, directly or indirectly. Moreover, vxTypesOld.h ends up pulling in definitions of various cpufamily macros (from types/vxCpu.h) that are also needed directly by regs.h. However, when compiling some assembly files that #include "regs.h", the typedefs in vxTypesOld.h break the build: /tmp/ccPxG4gA.s: Assembler messages: /tmp/ccPxG4gA.s:1: Error: unrecognized opcode: `typedef' /tmp/ccPxG4gA.s:2: Error: unrecognized opcode: `typedef' etc. The simplest fix is to guard the include of vxTypesOld.h by !defined(_ASMLANGUAGE). This should not affect C code, and existing assembly files that include regs.h must already have arranged for including types/vxCpu.h prior to including regs.h. ==changelog== fixincludes/ * inclhack.def (AAB_vxworks_regs_vxtypes): Guard include of types/vxTypesOld.h by #ifndef _ASMLANGUAGE. * fixincl.x: Regenerate. --- fixincludes/inclhack.def | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fixincludes/inclhack.def b/fixincludes/inclhack.def index c1f5a13eda4..bac0079b69f 100644 --- a/fixincludes/inclhack.def +++ b/fixincludes/inclhack.def @@ -426,7 +426,9 @@ fix = { replace = <<- _EndOfHeader_ #ifndef _REGS_H #define _REGS_H + #ifndef _ASMLANGUAGE #include + #endif #include_next #endif _EndOfHeader_; -- 2.16.4