From patchwork Wed Mar 15 16:14:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Li, Pan2 via Gcc-patches" X-Patchwork-Id: 66420 Return-Path: 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 60D6F385842C for ; Wed, 15 Mar 2023 16:14:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 60D6F385842C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1678896879; bh=1Axq6YD2VU+Uws0bOUL6qTjhRNJkNycw0aU8CbAQuOc=; h=Subject:To:Cc:Date:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=y8Kg9EqfXENOJC7/efgaJNXNl36+AgVBVuLqQiNpixOrSkz4vZvW9PM7pXYPMNRKm qhCFUT3lW8LsVwbxrGcIXpAsO29Y5R96clU0+7+9OTnytJnaHHpHyR7niPRPW2YwM+ zBPGzLVq1u9JUP6RjHOye+l2V6sT2/DFGm7DrDFs= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-lj1-x22e.google.com (mail-lj1-x22e.google.com [IPv6:2a00:1450:4864:20::22e]) by sourceware.org (Postfix) with ESMTPS id 221503858C5F for ; Wed, 15 Mar 2023 16:14:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 221503858C5F Received: by mail-lj1-x22e.google.com with SMTP id g18so20040973ljl.3 for ; Wed, 15 Mar 2023 09:14:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678896844; h=mime-version:user-agent:organization:references:date:cc:to:reply-to :from:subject:message-id:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=1Axq6YD2VU+Uws0bOUL6qTjhRNJkNycw0aU8CbAQuOc=; b=jokHoEDpkmhpmksyTTk6YDxmjECeGmSLxBQC4wKuHl6BHUMq+NdQOxzygNY3kjdd7Q LQmZK4RFI7711jdneK2pRTkdckNws2NDRNeAoUQPLD1jXgeO6JxNFieUbjDnLnz/DXuG +XmZpTzCpWTsB61oyZitDQAXODXqKLp+PyrNL4xhcqKpeeaY1VpH7wMFBATyEpE1Forc PMg5nSnCgsFtk74UZINspnSthGGJKJyHNqpPy47M3n//zrTtVR4x7ABO7pgIk3JTCEat TA72q4Gw9xiYCDUyUfBxCt/nNjk/Tc2SrIaXVixw/f+N4816VdaylU5yMR/UeRp+GaIc Pl8Q== X-Gm-Message-State: AO0yUKXFY1z1gXgzz2YS5i7URuni1bAknkBwulUVjPeRPj2v2uEebLBE 2TZ8EIT6OQiPo67HvjPiLZtN7nWUqReXjw== X-Google-Smtp-Source: AK7set/C4PVWIv4/3BoUDKK64DaPwQ92ZU92bSuf2wEGNYU3Gy2b2bUaffDJ941VqfeU8lPnyRm7Yg== X-Received: by 2002:a05:651c:1023:b0:298:b161:feb0 with SMTP id w3-20020a05651c102300b00298b161feb0mr765436ljm.49.1678896844265; Wed, 15 Mar 2023 09:14:04 -0700 (PDT) Received: from G3620.lan ([178.78.231.178]) by smtp.gmail.com with ESMTPSA id e14-20020a05651c038e00b002987088bda4sm882161ljp.69.2023.03.15.09.14.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Mar 2023 09:14:03 -0700 (PDT) Message-ID: <952ba6f7c288d4198f99437672278473d5bb88f7.camel@gmail.com> Subject: Now gcc-13: [Fwd: [PATCH] gcc-12: Re-enable split-stack support for GNU/Hurd.] To: gcc-patches , Debian Bug Tracking System Cc: Ian Lance Taylor , Matthias Klose Date: Wed, 15 Mar 2023 17:14:01 +0100 References: Organization: Home User-Agent: Evolution 3.30.5-1.1 MIME-Version: 1.0 X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Svante Signell via Gcc-patches From: "Li, Pan2 via Gcc-patches" Reply-To: svante.signell@gmail.com Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" Package: gcc-snapshot Version: 1:20230315-1 Severity: important Tags: patch User: debian-hurd@lists.debian.org Usertags: hurd Affects: gcc-snapshot X-Debbugs-CC: debian-hurd@lists.debian.org Hello, seems like the patch gcc_config_gnu.h.diff, in debian gcc-12 named: pr104290-followup.diff was lost (again). How can this patch ever become upstreamed?? It seems like sending to gcc-patches is not enough. Create a regression bug? https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104290 is already reported as a regression, it has to be updated to cover upstream releases of gcc-13 now. For gcc-12 Debian has been carrying it as: pr104290-followup.diff Submitting this problem as new bug to Debian/gcc-13/gcc-snapshot! Thanks! Hello, In line of porting the latest build of libgo/go with gcc-12 to GNU/Hurd, support of split-stack was found to be removed. After patching the files in libgo the build of gotools fails: go1: error: '-fsplit-stack' currently only supported on GNU/Linux go1: error: '-fsplit-stack' is not supported by this compiler configuration The attached patch defines OPTION_GLIBC_P(opts) and OPTION_GLIBC that was lost in config/gnu.h, needed to enable split-stack support for GNU/Hurd. This problem happened with the latest commit as discussed in the mail thread starting with https://gcc.gnu.org/pipermail/gcc-patches/2022-January/588973.html . The file first doing this check is: (first error: ..) src/gcc/common/config/i386/i386-common.cc in function: static bool ix86_supports_split_stack (bool report, struct gcc_options *opts ATTRIBUTE_UNUSED) and secondly in:src/gcc/opts.cc: (second error: ...) in function: void finish_options (struct gcc_options *opts, struct gcc_options *opts_set, location_t loc) The checking logic is in function ix86_supports_split_stack(): #if defined(TARGET_THREAD_SPLIT_STACK_OFFSET) && defined(OPTION_GLIBC_P) if (!OPTION_GLIBC_P (opts)) #endif { if (report) error ("%<-fsplit-stack%> currently only supported on GNU/Linux"); return false; } bool ret = true; In case of GNU/Hurd TARGET_THREAD_SPLIT_STACK_OFFSET is defined as well as OPTION_GLIBC_P but OPTION_GLIBC_P(opts) is needed to. The attached patch to src/gcc/config/gnu.h creates that definition. For GNU/Hurd, gnu.h is included in the configure stage: Configuring stage 1 in ./gcc ... Using the following target machine macro files: ... ../../src/gcc/config/gnu.h For a longer history about this bug see: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104290 Additionally, I would propose the text in gcc/common/config/i386/i386-common.cc to change from: error ("%<-fsplit-stack%> currently only supported on GNU/Linux"); to: error ("%<-fsplit-stack%> currently only supported on GLIBC-based systems"); Thanks! --- a/src/gcc/config/gnu.h 2022-02-06 11:59:41.000000000 +0100 +++ b/src/gcc/config/gnu.h 2022-02-06 12:00:19.000000000 +0100 @@ -19,6 +19,9 @@ along with GCC. If not, see . */ +#define OPTION_GLIBC_P(opts) (DEFAULT_LIBC == LIBC_GLIBC) +#define OPTION_GLIBC OPTION_GLIBC_P (&global_options) + #undef GNU_USER_TARGET_OS_CPP_BUILTINS #define GNU_USER_TARGET_OS_CPP_BUILTINS() \ do { \