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 A7A6C3858D1E for ; Tue, 24 Jan 2023 10:48:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A7A6C3858D1E Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=foss.arm.com Authentication-Results: sourceware.org; spf=none smtp.mailfrom=foss.arm.com 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 EF1821FB; Tue, 24 Jan 2023 02:48:48 -0800 (PST) Received: from [10.2.78.76] (e126323.cambridge.arm.com [10.2.78.76]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 6B5DD3F64C; Tue, 24 Jan 2023 02:48:06 -0800 (PST) Message-ID: Date: Tue, 24 Jan 2023 10:48:06 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: [PATCH][GCC] arm: Fix inclusion of arm-mlib.h header more than once (pr108505). Content-Language: en-GB To: Srinath Parvathaneni , gcc-patches@gcc.gnu.org Cc: nd@arm.com, richard.earnshaw@arm.com, kyrylo.tkachov@arm.com References: <0848d46d-cf28-4b97-bdb8-fda36ee53fea@AZ-NEU-EX04.Arm.com> From: Richard Earnshaw In-Reply-To: <0848d46d-cf28-4b97-bdb8-fda36ee53fea@AZ-NEU-EX04.Arm.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3496.2 required=5.0 tests=BAYES_00,GIT_PATCH_0,KAM_DMARC_STATUS,KAM_LAZY_DOMAIN_SECURITY,NICE_REPLY_A,SPF_HELO_NONE,SPF_NONE,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 24/01/2023 09:55, Srinath Parvathaneni via Gcc-patches wrote: > Hello, > > The patch fixes the build issue for arm-none-eabi target configured with > --with-multilib-list=aprofile,rmprofile, in which case the header file > arm/arm-mlib.h is being included more than once and the toolchain build > is failing (PR108505). > > Regression tested on arm-none-eabi target and found no regressions. > > Ok for master? > > Regards, > Srinath. > > gcc/ChangeLog: > > 2023-01-24 Srinath Parvathaneni > > PR target/108505 > * config.gcc (tm_file): Move the variable out of loop. > > > ############### Attachment also inlined for ease of reply ############### > > A more robust fix would be: > diff --git a/gcc/config.gcc b/gcc/config.gcc > index 771bd35e803b47e79c0a62eab8f4845e9bbf96ef..d828223c16d3076da0ab6582dfaf59ad657ea438 100644 > --- a/gcc/config.gcc > +++ b/gcc/config.gcc > @@ -4350,7 +4350,6 @@ case "${target}" in > case ${arm_multilib} in > aprofile|rmprofile) > tmake_profile_file="arm/t-multilib" > - tm_file="$tm_file arm/arm-mlib.h" tm_mlib_file="arm/arm-mlib.h" > ;; > @*) > ml=`echo "X$arm_multilib" | sed '1s,^X@,,'` > @@ -4389,6 +4388,7 @@ case "${target}" in > # through to the multilib selector > with_float="soft" > tmake_file="${tmake_file} ${tmake_profile_file}" > + tm_file="$tm_file arm/arm-mlib.h" tm_file="$tm_file $tm_mlib_file" > TM_MULTILIB_CONFIG="$with_multilib_list" > fi > fi > > > Then if we ever need to add additional alternative multilib variants we can control the selection separately. R.