From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from rock.gnat.com (rock.gnat.com [IPv6:2620:20:4000:0:a9e:1ff:fe9b:1d1]) by sourceware.org (Postfix) with ESMTPS id 0781D3856DDF for ; Thu, 6 Oct 2022 08:24:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 0781D3856DDF Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=adacore.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=adacore.com Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 8FF91116BA2; Thu, 6 Oct 2022 04:24:46 -0400 (EDT) X-Virus-Scanned: Debian amavisd-new at gnat.com Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id BsMXqBFZ+g3L; Thu, 6 Oct 2022 04:24:46 -0400 (EDT) Received: from free.home (tron.gnat.com [IPv6:2620:20:4000:0:46a8:42ff:fe0e:e294]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by rock.gnat.com (Postfix) with ESMTPS id 2603C11650B; Thu, 6 Oct 2022 04:24:45 -0400 (EDT) Received: from livre (livre.home [172.31.160.2]) by free.home (8.15.2/8.15.2) with ESMTPS id 2968Octv381146 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Thu, 6 Oct 2022 05:24:39 -0300 From: Alexandre Oliva To: gcc-patches@gcc.gnu.org Subject: Re: [PATCH] Support multilib-aware target lib flags self-specs overriding Organization: Free thinker, does not speak for AdaCore References: Errors-To: aoliva@lxoliva.fsfla.org Date: Thu, 06 Oct 2022 05:24:38 -0300 In-Reply-To: (Alexandre Oliva's message of "Tue, 28 Jun 2022 10:32:54 -0300") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Scanned-By: MIMEDefang 2.84 X-Spam-Status: No, score=-6.3 required=5.0 tests=BAYES_00,KAM_DMARC_STATUS,KAM_SHORT,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 List-Id: On Jun 28, 2022, Alexandre Oliva wrote: > Support multilib-aware target lib flags self-specs overriding > This patch introduces -fmultiflags, short for multilib TFLAGS, as an > option that does nothing by default, but that can be added to TFLAGS > and mapped to useful options by driver self-specs. > Regstrapped on x86_64-linux-gnu. Posted mainly FTR, but... I wouldn't > mind putting it in, so... Ok to install? ;-) Since this patch didn't seem to gain much traction towards acceptance, I've been thinking of other ways to accomplish its goal, namely, to enable target libs to be built with additional flags, like setting TFLAGS, but enabling different multilibs to be built with different flags. The other way that came to mind was to add settings to the multilib target fragment configurations, say MULTILIB_TFLAGS, to map multilibs to extra flags to use, and then adjust the target lib multilib flag build machinery to extract and add these flags when configuring and building each library. Yuck. I'd much rather we could use -fmultiflags, a far more elegant arrangement IMHO, so... Ping? https://gcc.gnu.org/pipermail/gcc-patches/2022-June/597419.html > for gcc/ChangeLog > * common.opt (fmultiflags): New. > * doc/invoke.texi: Document it. > * gcc.cc (driver_self_specs): Discard it. > * opts.cc (common_handle_option): Ignore it in the driver. Since this is kind of a build machinery feature, would anyone mind if I self-approved this with my build machinery maintainer hat on? Please raise your objection within one week if you do. Thanks, -- Alexandre Oliva, happy hacker https://FSFLA.org/blogs/lxo/ Free Software Activist GNU Toolchain Engineer Disinformation flourishes because many people care deeply about injustice but very few check the facts. Ask me about