From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf1-x134.google.com (mail-lf1-x134.google.com [IPv6:2a00:1450:4864:20::134]) by sourceware.org (Postfix) with ESMTPS id AB299385840F for ; Thu, 17 Mar 2022 09:04:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org AB299385840F Received: by mail-lf1-x134.google.com with SMTP id w7so7889771lfd.6 for ; Thu, 17 Mar 2022 02:04:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:subject:from:reply-to:to:cc:date :in-reply-to:references:organization:user-agent:mime-version :content-transfer-encoding; bh=BK59JdOIOtDEU0Uz/t5HitxL70mTeH/I0PZHW7rpu5c=; b=UgSpoEd/1n5usxVN7ifs2VdWALPKLs06mmaomywm3TBuB0QasKZ3ah+XKgCIJqOj8E fRv2vshLvoIEFbPvneXN9smukWPyNYxAKQyr4Pit965XIIgSm+8jIi4QdGtiV05cWjZ1 hmV7iJR2b6epr0V3G7blGWeK9PlM4t9doGy2U2cZ7Mj33Zq/+4m1QkBp7zrnE5dEW2tn dFeOfUi9r6EP5za/0Oesra3wElLy+JepRyZgo+AMWWDtIr0VBfggSJw+ZjvnnLy0cGXP ArX+QmmMdkbynGd8qQE0Jlyz0AdbQ/AZhWBd08UtUXUQvGvi09knNoIKv7BfELXkv+kk gm0Q== X-Gm-Message-State: AOAM531lnzAqxft3U1Oxhgbho/b22iLnNcwW2o/jw5TZqttAzBNi2bJP cYw0uNCDwaVlLeM94bt27QGh7ql6SXv+HA== X-Google-Smtp-Source: ABdhPJzks+ouH9DYvnIbhFHpqvUfnnk6U5cLzMfp+IoLkAMVdEEnLGqD3X2dWOgSMERYpg2+tnL/gw== X-Received: by 2002:a19:dc47:0:b0:448:a5b9:d04d with SMTP id f7-20020a19dc47000000b00448a5b9d04dmr2361022lfj.444.1647507870795; Thu, 17 Mar 2022 02:04:30 -0700 (PDT) Received: from G3620.lan (178-78-231-178.customers.ownit.se. [178.78.231.178]) by smtp.gmail.com with ESMTPSA id l11-20020a2e868b000000b002492a4ab2f7sm389611lji.4.2022.03.17.02.04.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Mar 2022 02:04:29 -0700 (PDT) Message-ID: <080d60291f4c5c614d79d84155ee84c05fda413a.camel@gmail.com> Subject: Re: [PATCH] gcc-12: Re-enable split-stack support for GNU/Hurd. From: Svante Signell Reply-To: svante.signell@gmail.com To: gcc-patches Cc: Ian Lance Taylor , Matthias Klose Date: Thu, 17 Mar 2022 10:05:24 +0100 In-Reply-To: References: Organization: Home Content-Type: text/plain; charset="ISO-8859-1" User-Agent: Evolution 3.30.5-1.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.4 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, T_SCC_BODY_TEXT_LINE 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Mar 2022 09:04:34 -0000 ping On Wed, 2022-02-23 at 11:13 +0100, Svante Signell wrote: > 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!