From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf1-x132.google.com (mail-lf1-x132.google.com [IPv6:2a00:1450:4864:20::132]) by sourceware.org (Postfix) with ESMTPS id 3FF8D3858D3C for ; Tue, 12 Sep 2023 09:49:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3FF8D3858D3C Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-lf1-x132.google.com with SMTP id 2adb3069b0e04-500bbe3ef0eso6507594e87.1 for ; Tue, 12 Sep 2023 02:49:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1694512155; x=1695116955; darn=gcc.gnu.org; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=JKgxOa0NpMIteJxPeBFplzfOlFQ8sJ1WGSXtT1nfvTA=; b=ZrSwqabceTYOeoorThgXhm/uajSzPPKmNlxUaAx56s+oaPphLiTv2o1OAPcwUqRoju NNqSIXMJ2bvz9mH7TaKpv7HRDp75jyFSEWhbKv0sEESuTqwYKFUtxJjtqCgQQdula6fx 31+iR0xdja4Dx7ODPcH357vkBGlHO7FWkvxyTgxWvqmtKPwPGipTyD7SUWWTV4FmJc/w n4sUSa2LwIlBL4RyJlwkqFYEuwXnELHbHc+oto/tC3y9NYiFkXkQDaBPUOXjeLSgTt/Z Rf8nmRGolCpIXdoLdUM7eiQk6h/bcCdY0+puPYSEbB+3wjVlZOW+zR5DV+vqtCDUT3DT aqcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694512155; x=1695116955; h=content-transfer-encoding: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=JKgxOa0NpMIteJxPeBFplzfOlFQ8sJ1WGSXtT1nfvTA=; b=WRivpgLHLqsaFPEo1UvdpWMQZ9++/3e52MBS8BkhfQ5jiveEMFMZpC+KkhembL0vfA 8Hm/SPeTgjOH3Dhkn11Y/WhUFfBa4S3zhFD4pIewXpywVtXX9/Sj7UpHuyOgdZSB83nd aNzrXYjams6z/4SKDy+RP/T8thkchTw945VD22QtXiId3Z1+OfYMHWB1qGO3GdrdHMr/ sUDV+gbMU2coXigbtsztilbtA9MId3C1HJOvj67IjLWL2Uzgx+ybTszFdryY+sDfZ4gb Jqn32ElljWWZXhBCj87SzZLmNEni4e/EJsa+R3HPoYBDn8IPA/LvgUvVCM/dYPrcAcjg lthw== X-Gm-Message-State: AOJu0YyG4Ia7d5NcUH/QGz6xQIftyGpk9j4atmyT4/i8M6atnsAdkrbY elKsVUuBnM07WKs81h+p/t9eKlWj0ZlgMudRWivqGyxc X-Google-Smtp-Source: AGHT+IFwDgb4cLkqeQ9X787mjiQez6ra9loEqPnmSu6C1Q1ikR7ip8aBRW7Rzd2yjLGqj4qHnUoBaYgndvLo6Zw7ypQ= X-Received: by 2002:a05:6512:33c8:b0:4f8:6e1a:f3ac with SMTP id d8-20020a05651233c800b004f86e1af3acmr757851lfg.28.1694512154421; Tue, 12 Sep 2023 02:49:14 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Richard Biener Date: Tue, 12 Sep 2023 11:47:11 +0200 Message-ID: Subject: Re: [PATCH] Tweak language choice in config-list.mk To: Richard Sandiford , gcc-patches@gcc.gnu.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,GIT_PATCH_0,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: On Thu, Sep 7, 2023 at 11:30=E2=80=AFAM Richard Sandiford via Gcc-patches 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=3Dall,...", 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 pat= h 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, Yes, I think that's unfortunate - can you open a bugreport for this? > 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? OK. > Richard > > > gcc/ > * contrib/config-list.mk (OPT_IN_LANGUAGES): New variable. > ($(LIST)): Replace --enable-languages=3Dall 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=3Dall-gcc > # supply an absolute path. > GCC_SRC_DIR=3D../../gcc > > +# Define this to ,m2 if you want to build Modula-2. Modula-2 builds tar= get > +# objects during all-gcc, so it can only be included if you've installed > +# binutils (or an equivalent) for each target. > +OPT_IN_LANGUAGES=3D > + > # Use -j / -l make arguments and nice to assure a smooth resource-effici= ent > # 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=3D`echo $@ | awk 'BEGIN { FS =3D "OPT" }; { print $$1= }'` && \ > TGT=3D`$(GCC_SRC_DIR)/config.sub $$TGT` && = \ > case $$TGT in = \ > - *-*-darwin* | *-*-cygwin* | *-*-mingw* | *-*-aix*= | bpf-*-*) \ > + bpf-*-*) = \ > ADDITIONAL_LANGUAGES=3D""; = \ > ;; = \ > - *) = \ > + *-*-darwin* | *-*-cygwin* | *-*-mingw* | *-*-aix*= | bpf-*-*) \ > + ADDITIONAL_LANGUAGES=3D",fortran"; = \ > + ;; = \ > + mmix-*-*) = \ > ADDITIONAL_LANGUAGES=3D",go"; = \ > ;; = \ > + *) = \ > + ADDITIONAL_LANGUAGES=3D",fortran,go"; = \ > + ;; = \ > esac && = \ > $(GCC_SRC_DIR)/configure = \ > --target=3D$(subst SCRIPTS,`pwd`/../scripts/,$(su= bst OPT,$(empty) -,$@)) \ > --enable-werror-always ${host_options} = \ > - --enable-languages=3Dall,ada$$ADDITIONAL_LANGUAGE= S; \ > + --enable-languages=3Dc,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 >