public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH][GCC] arm: Fix inclusion of arm-mlib.h header more than once (pr108505).
@ 2023-01-24  9:55 Srinath Parvathaneni
  2023-01-24  9:56 ` Kyrylo Tkachov
  2023-01-24 10:48 ` Richard Earnshaw
  0 siblings, 2 replies; 3+ messages in thread
From: Srinath Parvathaneni @ 2023-01-24  9:55 UTC (permalink / raw)
  To: gcc-patches; +Cc: nd, richard.earnshaw, kyrylo.tkachov

[-- Attachment #1: Type: text/plain, Size: 1303 bytes --]

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  <srinath.parvathaneni@arm.com>

        PR target/108505
        * config.gcc (tm_file): Move the variable out of loop.


###############     Attachment also inlined for ease of reply    ###############


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"
 						;;
 					@*)
 						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_MULTILIB_CONFIG="$with_multilib_list"
 			fi
 		fi




[-- Attachment #2: rb16824.patch --]
[-- Type: text/plain, Size: 696 bytes --]

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"
 						;;
 					@*)
 						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_MULTILIB_CONFIG="$with_multilib_list"
 			fi
 		fi




^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: [PATCH][GCC] arm: Fix inclusion of arm-mlib.h header more than once (pr108505).
  2023-01-24  9:55 [PATCH][GCC] arm: Fix inclusion of arm-mlib.h header more than once (pr108505) Srinath Parvathaneni
@ 2023-01-24  9:56 ` Kyrylo Tkachov
  2023-01-24 10:48 ` Richard Earnshaw
  1 sibling, 0 replies; 3+ messages in thread
From: Kyrylo Tkachov @ 2023-01-24  9:56 UTC (permalink / raw)
  To: Srinath Parvathaneni, gcc-patches; +Cc: nd, Richard Earnshaw



> -----Original Message-----
> From: Srinath Parvathaneni <srinath.parvathaneni@arm.com>
> Sent: Tuesday, January 24, 2023 9:55 AM
> To: gcc-patches@gcc.gnu.org
> Cc: nd <nd@arm.com>; Richard Earnshaw <Richard.Earnshaw@arm.com>;
> Kyrylo Tkachov <Kyrylo.Tkachov@arm.com>
> Subject: [PATCH][GCC] arm: Fix inclusion of arm-mlib.h header more than
> once (pr108505).
> 
> 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?
> 

Ok.
Thanks,
Kyrill

> Regards,
> Srinath.
> 
> gcc/ChangeLog:
> 
> 2023-01-24  Srinath Parvathaneni  <srinath.parvathaneni@arm.com>
> 
>         PR target/108505
>         * config.gcc (tm_file): Move the variable out of loop.
> 
> 
> ###############     Attachment also inlined for ease of reply
> ###############
> 
> 
> diff --git a/gcc/config.gcc b/gcc/config.gcc
> index
> 771bd35e803b47e79c0a62eab8f4845e9bbf96ef..d828223c16d3076da0ab658
> 2dfaf59ad657ea438 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"
>  						;;
>  					@*)
>  						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_MULTILIB_CONFIG="$with_multilib_list"
>  			fi
>  		fi
> 
> 


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH][GCC] arm: Fix inclusion of arm-mlib.h header more than once (pr108505).
  2023-01-24  9:55 [PATCH][GCC] arm: Fix inclusion of arm-mlib.h header more than once (pr108505) Srinath Parvathaneni
  2023-01-24  9:56 ` Kyrylo Tkachov
@ 2023-01-24 10:48 ` Richard Earnshaw
  1 sibling, 0 replies; 3+ messages in thread
From: Richard Earnshaw @ 2023-01-24 10:48 UTC (permalink / raw)
  To: Srinath Parvathaneni, gcc-patches; +Cc: nd, richard.earnshaw, kyrylo.tkachov



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  <srinath.parvathaneni@arm.com>
> 
>          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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-01-24 10:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-24  9:55 [PATCH][GCC] arm: Fix inclusion of arm-mlib.h header more than once (pr108505) Srinath Parvathaneni
2023-01-24  9:56 ` Kyrylo Tkachov
2023-01-24 10:48 ` Richard Earnshaw

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).