From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by sourceware.org (Postfix) with ESMTP id 42C163858D33 for ; Sat, 2 Dec 2023 14:25:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 42C163858D33 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 42C163858D33 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=217.140.110.172 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701527138; cv=none; b=v6n2R/+eFINq4LOOQkTukN9cS4VLbjOuwDdZR/qqpNJG71tZ6dAKYXNBT+uj7QsOlDEddeswg8Hv4f1NWWJRSqEB7wZ0he/DqFeXxYYdsM7Sj3HyCX0HU5TnYvll8iTU0e5lS/810YqeIxsHVh1q+qVqoqI1ELoRlfH0XhfVBGc= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701527138; c=relaxed/simple; bh=qyL3Cte0NBBXKbkwQOKUW0hlAdl6CR9PPocoj+PButI=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=Rc26cFqstl6JTxPgSVSFIlFspss9YFyoxF1AEOy6IbPZNN84gMMMom1q1F4+ZaHUC3u+eAAsw332bR8x1PVqiLJBD6lWIrBNm5pUZEb8ur/iHQ0lF9MTV+KfAJRxf5z7RKo2nY8hXYfYhJ+8kw2ZGp6Avl39xYjokB2+OhH5+vE= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 446FDFEC; Sat, 2 Dec 2023 06:26:23 -0800 (PST) Received: from localhost (e121540-lin.manchester.arm.com [10.32.110.72]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 6FB6F3F73F; Sat, 2 Dec 2023 06:25:36 -0800 (PST) From: Richard Sandiford To: Christophe Lyon Mail-Followup-To: Christophe Lyon ,gcc-patches@gcc.gnu.org, richard.sandiford@arm.com Cc: gcc-patches@gcc.gnu.org Subject: Re: [PATCH] Tweak language choice in config-list.mk References: Date: Sat, 02 Dec 2023 14:25:35 +0000 In-Reply-To: (Christophe Lyon's message of "Wed, 13 Sep 2023 12:26:12 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-22.3 required=5.0 tests=BAYES_00,GIT_PATCH_0,KAM_DMARC_NONE,KAM_DMARC_STATUS,KAM_LAZY_DOMAIN_SECURITY,KAM_SHORT,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE 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: Christophe Lyon writes: > 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) ? Thanks for the catch. I forgot to remove bpf from the old list when adding the new case. I've now (finally!) pushed the patch with the redundant bpf removed. Richard >> + 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 >> >>