Message ID | 20211103131847.116762-1-rasmus.villemoes@prevas.dk |
---|---|
State | Committed |
Commit | 44d0243a247dd1280265c649dab26e9486ffa015 |
Headers |
Return-Path: <gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id BCE81385800A for <patchwork@sourceware.org>; Wed, 3 Nov 2021 13:25:46 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-lj1-x22d.google.com (mail-lj1-x22d.google.com [IPv6:2a00:1450:4864:20::22d]) by sourceware.org (Postfix) with ESMTPS id 56820385800E for <gcc-patches@gcc.gnu.org>; Wed, 3 Nov 2021 13:18:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 56820385800E Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=rasmusvillemoes.dk Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=rasmusvillemoes.dk Received: by mail-lj1-x22d.google.com with SMTP id r10so2582200ljj.11 for <gcc-patches@gcc.gnu.org>; Wed, 03 Nov 2021 06:18:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rasmusvillemoes.dk; s=google; h=sender:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=aNgGHRo57Y8chDSxcVnxCMoI+vQ4XxuL1ifxdGuagUY=; b=iHIcOFmSse+ETmluEsdxCnxzzIhAEU5j0++S8GI4N/W6J8cw7hwVjzEhVEurZBcHzv gpnrdRRQpivsjRxk+drj9MILuVGLPOaHaStRjufSDb0SIuET3OPIvtG9MFE7GQUP8zr6 ALGBKlOHqGLi51AmGmjdoIUYP5k0o1Kb/a9X4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; bh=aNgGHRo57Y8chDSxcVnxCMoI+vQ4XxuL1ifxdGuagUY=; b=wxkF1ssL6AGi55P0qzJuSJCx4E7zuQj3GWeagjZ671JRkJ67mnd4qtYL8ho5o5w0AE Rtam4oNtvQF3cWPMak2Z1OjQ+7Ab/6eIiP0a0U6pUCGlgeZZjyCjPh3SwC6RmHdMZ3oG Iqr8qv8W/WJGOUSc3sfG73hvOgixvZr81YfcPSWLGe889YZDxH6uHs43G1cIxj6Emk6J SRI/18Q9XuCSJk/iq6I5z6Xn3/rtmqY1zC7X8PX+QE9dAGXIi8c/VUssBFmrmlW99gEV jDqH2qBw78h5gxnJiHwseQXEBPCa6gQ682022j5CKJJ/v1d0a+AkDkTAK4eNNB85Yh/K iFlw== X-Gm-Message-State: AOAM532F1SCQaWki7/8zZkx9ZJbe5Jn9loQO+WNr3jLlD4gTrsjSMgbM dQ2jZEAu9fGz71AVr59/W5j+cVAwKxSdL6to X-Google-Smtp-Source: ABdhPJzQKQMUwJQ9+FN7JdOueY7Jqyq9H6lQ6xkGN5ZLy4d4cs+tvBnTOYOgqat2J4QFSBBhyrYj+Q== X-Received: by 2002:a2e:a609:: with SMTP id v9mr25821898ljp.45.1635945535735; Wed, 03 Nov 2021 06:18:55 -0700 (PDT) Received: from prevas-ravi.prevas.se ([81.216.59.226]) by smtp.gmail.com with ESMTPSA id p19sm179238lfr.37.2021.11.03.06.18.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Nov 2021 06:18:55 -0700 (PDT) From: Rasmus Villemoes <rv@rasmusvillemoes.dk> X-Google-Original-From: Rasmus Villemoes <rasmus.villemoes@prevas.dk> To: gcc-patches@gcc.gnu.org Subject: [PATCH] gcc: vx-common.h: fix test for VxWorks7 Date: Wed, 3 Nov 2021 14:18:47 +0100 Message-Id: <20211103131847.116762-1-rasmus.villemoes@prevas.dk> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-11.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_NUMSUBJECT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> Cc: Alexandre Oliva <oliva@adacore.com>, Rasmus Villemoes <rasmus.villemoes@prevas.dk> Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" <gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org> |
Series |
gcc: vx-common.h: fix test for VxWorks7
|
|
Commit Message
Rasmus Villemoes
Nov. 3, 2021, 1:18 p.m. UTC
The macro TARGET_VXWORKS7 is always defined (see vxworks-dummy.h). Thus we need to test its value, not its definedness. Fixes aca124df (define NO_DOT_IN_LABEL only in vxworks6). gcc/ChangeLog: * config/vx-common.h: Test value of TARGET_VXWORKS7 rather than definedness. --- gcc/config/vx-common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Comments
Hi Rasmus, > On 3 Nov 2021, at 14:18, Rasmus Villemoes <rv@rasmusvillemoes.dk> wrote: > > The macro TARGET_VXWORKS7 is always defined (see vxworks-dummy.h). > Thus we need to test its value, not its definedness. > > Fixes aca124df (define NO_DOT_IN_LABEL only in vxworks6). > > gcc/ChangeLog: > > * config/vx-common.h: Test value of TARGET_VXWORKS7 rather > than definedness. Indeed. Ok, thanks!
On 05/11/2021 09.08, Olivier Hainque wrote: > Hi Rasmus, > >> On 3 Nov 2021, at 14:18, Rasmus Villemoes <rv@rasmusvillemoes.dk> wrote: >> >> The macro TARGET_VXWORKS7 is always defined (see vxworks-dummy.h). >> Thus we need to test its value, not its definedness. >> >> Fixes aca124df (define NO_DOT_IN_LABEL only in vxworks6). >> >> gcc/ChangeLog: >> >> * config/vx-common.h: Test value of TARGET_VXWORKS7 rather >> than definedness. > > Indeed. Ok, thanks! Applied to master and pushed - hope I've done it right. How about the gcc-11 branch, can it be applied there as well, and if so, should I do a "git cherry-pick -x" and push it to that branch? From looking at the git history it seems to be the way things are done. Thanks, Rasmus
> On 5 Nov 2021, at 09:48, Rasmus Villemoes <rasmus.villemoes@prevas.dk> wrote: > Applied to master and pushed - hope I've done it right. AFAICS, yes. > How about the gcc-11 branch, can it be applied there as well, Yes, I think so. The builds you do used to work before the change that introduced the ifdef, IIUC, and the adjustment you propose is close to being in the "obvious" category. Very small, clearly vxworks only and in line with every other use of that macro. > and if so, > should I do a "git cherry-pick -x" and push it to that branch? > From > looking at the git history it seems to be the way things are done. That's my understanding as well. Thanks, Olivier
On 05/11/2021 15.08, Olivier Hainque wrote: > > >> On 5 Nov 2021, at 09:48, Rasmus Villemoes <rasmus.villemoes@prevas.dk> wrote: >> Applied to master and pushed - hope I've done it right. > > AFAICS, yes. > >> How about the gcc-11 branch, can it be applied there as well, > > Yes, I think so. The builds you do used to work before > the change that introduced the ifdef, Well, apart from all the other fixups, some of which are not upstreamable, that I also need to apply :) IIUC, and the adjustment > you propose is close to being in the "obvious" category. Indeed. I'll cherry-pick it into releases/gcc-11. Have you had a chance to look at the other four patches I've sent recently? They are also vxworks-only, and shouldn't be very controversial. Rasmus
> On 5 Nov 2021, at 15:12, Rasmus Villemoes <rasmus.villemoes@prevas.dk> wrote: > >> Yes, I think so. The builds you do used to work before >> the change that introduced the ifdef, > > Well, apart from all the other fixups, some of which are not > upstreamable, that I also need to apply :) Sure. My comment was only meant as positioning wrt the branch commit policy. The issue you address can be seen as triggering a regression on its own, regardless of other changes possibly causing issues as well, so a safe fix for it is eligible to the branch. > IIUC, and the adjustment >> you propose is close to being in the "obvious" category. > > Indeed. I'll cherry-pick it into releases/gcc-11. > > Have you had a chance to look at the other four patches I've sent > recently? They are also vxworks-only, and shouldn't be very controversial. Not yet, but I'm planning to get there RSN. I have been in delivery preparation mode on another project this week and we had to finalize a move to gcc-11 for non vxworks ports we have in-house first. VxWorks ports are next in line, starting next week. We have quite a few changes to push (wrt shared libs in particular), and I'll take the opportunity to incorporate your changes in my local testing cycles (pretty heavy for vx7, and some for vx6). We happen to also have a few fixincludes hunks around. Some of them have been there for years now and I thought would be nice to propagate at some point. Do you use it?
On 05/11/2021 16.12, Olivier Hainque wrote: > > >> On 5 Nov 2021, at 15:12, Rasmus Villemoes <rasmus.villemoes@prevas.dk> wrote: > We happen to also have a few fixincludes hunks around. Some of > them have been there for years now and I thought would be nice to > propagate at some point. > > Do you use it? Sort of, kind of. I have previously sent fixups for some of the vxworks fixincludes, and I think I have a few more I could submit, but since I'm able to modify our target headers directly that's often much easier. For example, there's the mkdir fixup that adds #define mkdir(dir, ...) ((void)0, ##__VA_ARGS__, (mkdir)(dir)) But that macro doesn't play well with code in libstdc++ that says if (posix::mkdir(p.c_str(), mode)) because that expands to utter nonsense and breaks the build. A better macro, also using the comma operator to have the mode argument evaluated then ignored, would be something like #define mkdir(dir, mode) mkdir(((void)(mode), (dir))) (or the variadic version to continue allowing a one-argument invocation). But it was easier to just change the target header, making that fixinclude pattern no longer apply - knowing that if we ever compile the mkdir implementation [we have parts of the kernel sources, but not all], we'll have to fixup the definition. The one fixinclude-related problem I have is the stdint.h one I've mentioned previously. Rasmus
diff --git a/gcc/config/vx-common.h b/gcc/config/vx-common.h index 7dd4dee536e..a436bf14074 100644 --- a/gcc/config/vx-common.h +++ b/gcc/config/vx-common.h @@ -97,7 +97,7 @@ along with GCC; see the file COPYING3. If not see /* ------------------------ Misc configuration bits ---------------------- */ -#ifndef TARGET_VXWORKS7 +#if !TARGET_VXWORKS7 /* VxWorks, prior to version 7, could not have dots in constructor labels, because it used a mutant variation of collect2 that generates C code instead of assembly. Thus each constructor label