From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-x533.google.com (mail-ed1-x533.google.com [IPv6:2a00:1450:4864:20::533]) by sourceware.org (Postfix) with ESMTPS id EA90E3858CDA for ; Wed, 13 Sep 2023 10:26:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org EA90E3858CDA Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-ed1-x533.google.com with SMTP id 4fb4d7f45d1cf-52e828ad46bso8596307a12.1 for ; Wed, 13 Sep 2023 03:26:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1694600783; x=1695205583; darn=gcc.gnu.org; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=Hb6I2FN1yYm/85ScN4Ji1gCsGHVg+LUNiZCSkDzYrtk=; b=lzbqtnlTxbrw+tyO+Fxvlw369Y3H1C75GR5eBeucu5z8N4PBO/nwlFmVEnckjQYOPn U99g3n2TGby8k/q7FbIjKCeCbFvvzKKp53kH4dXWXrmAyujGGXbtLrWwwfxEiqo4ekwh NU569eX/jY9XNn7dWi/a9vx3GSn+Au1qhyCHCsLrqdSfrs1r5qfurVENA9/it1xAtBrp dPzr99BOOVLRRpeP1MOYGrGrJPW6g4MswKF+YELHQzqwu8tZTE/66+amimt+Yisro5rC MqL/JKulLhNdkWQ05gWRFok2zQdeunALG6THRJXi6awPzmU0sPYV+swPZG7y/k3czaKY XZtg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694600783; x=1695205583; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Hb6I2FN1yYm/85ScN4Ji1gCsGHVg+LUNiZCSkDzYrtk=; b=Ts0nOyNl+gz3hsUCr9lAhhKVVJqx+10ngZTPyBRYON41splPz3JVy6X05ISbht81uy 454lLMwoUR9vpT0YZYGKwj8iRJeqiwqbdBqwtstBVhyOZKXrzicZn1vfOPVnAGUp3pHQ XuYeEofLSN1ANUB4jJ3YeIzzX96lpn3OIIGWZvXc768k9cBMwUf1AviOmBNGBQA1TgIy CAvvyqcppHXrexzj2JmEz6YTk6KRpISDnt441gZO+4ZtYyf0C6JAFBUIVDniEpC3n2yg xhDlm9zLtY/YpArM0l7xPMeDze8upuCUXOOuxfltgvHZppxDuv7Rhg+3O3I883U5fRIA ILXg== X-Gm-Message-State: AOJu0Ywh4ykMFntUVyndT00BSnbxK4OcMcZQ0WZ8m4hYc4VQtAK/4Y6x iuwDGwQhxbBqxwQjIwXbgo6h1KI/s5XAKWo8ViDafg== X-Google-Smtp-Source: AGHT+IFaE0j6gZjNFNZFpcmToXtfptJZC0xBRWIRqGWotjISMElPwkBqeIMW3sffKQnTqcU97ex+xyu7ryHKaAUL3Pw= X-Received: by 2002:aa7:c504:0:b0:523:33d7:e324 with SMTP id o4-20020aa7c504000000b0052333d7e324mr1778692edq.38.1694600783528; Wed, 13 Sep 2023 03:26:23 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Christophe Lyon Date: Wed, 13 Sep 2023 12:26:12 +0200 Message-ID: Subject: Re: [PATCH] Tweak language choice in config-list.mk To: Richard Sandiford , gcc-patches@gcc.gnu.org Content-Type: multipart/alternative; boundary="000000000000bd2eae06053afda6" X-Spam-Status: No, score=-10.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,HTML_MESSAGE,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 List-Id: --000000000000bd2eae06053afda6 Content-Type: text/plain; charset="UTF-8" Hi! On Thu, 7 Sept 2023 at 11:30, Richard Sandiford via Gcc-patches < gcc-patches@gcc.gnu.org> wrote: > When I tried to use config-list.mk, the build for every triple except > the build machine's failed for m2. This is because, unlike other > languages, m2 builds target objects during all-gcc. The build will > therefore fail unless you have access to an appropriate binutils > (or an equivalent). That's quite a big ask for over 100 targets. :) > > This patch therefore makes m2 an optional inclusion. > > Doing that wasn't entirely straightforward though. The current > configure line includes "--enable-languages=all,...", which means > that the "..." can only force languages to be added that otherwise > wouldn't have been. (I.e. the only effect of the "..." is to > override configure autodetection.) > > The choice of all,ada and: > > # Make sure you have a recent enough gcc (with ada support) in your path > so > # that --enable-werror-always will work. > > make it clear that lack of GNAT should be a build failure rather than > silently ignored. This predates the D frontend, which requires GDC > in the same way that Ada requires GNAT. I don't know of a reason > why D should be treated differently. > > The patch therefore expands the "all" into a specific list of > languages. > > That in turn meant that Fortran had to be handled specially, > since bpf and mmix don't support Fortran. > > Perhaps there's an argument that m2 shouldn't build target objects > during all-gcc, but (a) it works for practical usage and (b) the > patch is an easy workaround. I'd be happy for the patch to be > reverted if the build system changes. > > OK to install? > > Richard > > > gcc/ > * contrib/config-list.mk (OPT_IN_LANGUAGES): New variable. > ($(LIST)): Replace --enable-languages=all with a specifc list. > Disable fortran on bpf and mmix. Enable the languages in > OPT_IN_LANGUAGES. > --- > contrib/config-list.mk | 17 ++++++++++++++--- > 1 file changed, 14 insertions(+), 3 deletions(-) > > diff --git a/contrib/config-list.mk b/contrib/config-list.mk > index e570b13c71b..50ecb014bc0 100644 > --- a/contrib/config-list.mk > +++ b/contrib/config-list.mk > @@ -12,6 +12,11 @@ TEST=all-gcc > # supply an absolute path. > GCC_SRC_DIR=../../gcc > > +# Define this to ,m2 if you want to build Modula-2. Modula-2 builds > target > +# objects during all-gcc, so it can only be included if you've installed > +# binutils (or an equivalent) for each target. > +OPT_IN_LANGUAGES= > + > # Use -j / -l make arguments and nice to assure a smooth > resource-efficient > # load on the build machine, e.g. for 24 cores: > # svn co svn://gcc.gnu.org/svn/gcc/branches/foo-branch gcc > @@ -126,17 +131,23 @@ $(LIST): make-log-dir > TGT=`echo $@ | awk 'BEGIN { FS = "OPT" }; { print $$1 }'` > && \ > TGT=`$(GCC_SRC_DIR)/config.sub $$TGT` && > \ > case $$TGT in > \ > - *-*-darwin* | *-*-cygwin* | *-*-mingw* | *-*-aix* > | bpf-*-*) \ > + bpf-*-*) > \ > ADDITIONAL_LANGUAGES=""; > \ > ;; > \ > - *) > \ > + *-*-darwin* | *-*-cygwin* | *-*-mingw* | *-*-aix* > | bpf-*-*) \ > Am I misreading, or are you matching bpf here and above? From your commit message, I think bpf should either be only above (and define ADDITIONAL_LANGUAGES to "") and along with mmix (if it supports go) ? > + ADDITIONAL_LANGUAGES=",fortran"; > \ > + ;; > \ > + mmix-*-*) > \ > ADDITIONAL_LANGUAGES=",go"; > \ > ;; > \ > + *) > \ > + ADDITIONAL_LANGUAGES=",fortran,go"; > \ > + ;; > \ > esac && > \ > $(GCC_SRC_DIR)/configure > \ > --target=$(subst SCRIPTS,`pwd`/../scripts/,$(subst > OPT,$(empty) -,$@)) \ > --enable-werror-always ${host_options} > \ > - --enable-languages=all,ada$$ADDITIONAL_LANGUAGES; > \ > + > --enable-languages=c,ada,c++,d,lto,objc,obj-c++,rust$$ADDITIONAL_LANGUAGES$(OPT_IN_LANGUAGES); > \ > ) > log/$@-config.out 2>&1 > > $(LOGFILES) : log/%-make.out : % > -- > 2.25.1 > > --000000000000bd2eae06053afda6--