public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] LoongArch: Fix multiarch tuple canonization
@ 2023-02-13 10:38 Xi Ruoyao
  2023-02-14  3:32 ` Lulu Cheng
  2023-02-15 10:42 ` WANG Xuerui
  0 siblings, 2 replies; 6+ messages in thread
From: Xi Ruoyao @ 2023-02-13 10:38 UTC (permalink / raw)
  To: gcc-patches; +Cc: WANG Xuerui, Lulu Cheng, Chenghua Xu, Xi Ruoyao

Multiarch tuple will be coded in file or directory names in
multiarch-aware distros, so one ABI should have only one multiarch
tuple.  For example, "--target=loongarch64-linux-gnu --with-abi=lp64s"
and "--target=loongarch64-linux-gnusf" should both set multiarch tuple
to "loongarch64-linux-gnusf".  Before this commit,
"--target=loongarch64-linux-gnu --with-abi=lp64s --disable-multilib"
will produce wrong result (loongarch64-linux-gnu).

A recent LoongArch psABI revision mandates "loongarch64-linux-gnu" to be
used for -mabi=lp64d (instead of "loongarch64-linux-gnuf64") for some
non-technical reason [1].  Note that we cannot make
"loongarch64-linux-gnuf64" an alias for "loongarch64-linux-gnu" because
to implement such an alias, we must create thousands of symlinks in the
distro and doing so would be completely unpractical.  This commit also
aligns GCC with the revision.

Tested by building cross compilers with --enable-multiarch and multiple
combinations of --target=loongarch64-linux-gnu*, --with-abi=lp64{s,f,d},
and --{enable,disable}-multilib; and run "xgcc --print-multiarch" then
manually verify the result with eyesight.

Ok for trunk and backport to releases/gcc-12?

[1]: https://github.com/loongson/LoongArch-Documentation/pull/80

gcc/ChangeLog:

	* config.gcc (triplet_abi): Set its value based on $with_abi,
	instead of $target.
	(la_canonical_triplet): Set it after $triplet_abi is set
	correctly.
	* config/loongarch/t-linux (MULTILIB_OSDIRNAMES): Make the
	multiarch tuple for lp64d "loongarch64-linux-gnu" (without
	"f64" suffix).
---
 gcc/config.gcc               | 14 +++++++-------
 gcc/config/loongarch/t-linux |  2 +-
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/gcc/config.gcc b/gcc/config.gcc
index 067720ac795..c070e6ecd2e 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -4889,20 +4889,16 @@ case "${target}" in
 		case ${target} in
 		loongarch64-*-*-*f64)
 			abi_pattern="lp64d"
-			triplet_abi="f64"
 			;;
 		loongarch64-*-*-*f32)
 			abi_pattern="lp64f"
-			triplet_abi="f32"
 			;;
 		loongarch64-*-*-*sf)
 			abi_pattern="lp64s"
-			triplet_abi="sf"
 			;;
 		loongarch64-*-*-*)
 			abi_pattern="lp64[dfs]"
 			abi_default="lp64d"
-			triplet_abi=""
 			;;
 		*)
 			echo "Unsupported target ${target}." 1>&2
@@ -4923,9 +4919,6 @@ case "${target}" in
 			  ;;
 		esac
 
-		la_canonical_triplet="loongarch64-${triplet_os}${triplet_abi}"
-
-
 		# Perform initial sanity checks on --with-* options.
 		case ${with_arch} in
 		"" | loongarch64 | la464) ;; # OK, append here.
@@ -4996,6 +4989,13 @@ case "${target}" in
 			;;
 		esac
 
+		case ${with_abi} in
+		  "lp64d") triplet_abi="";;
+		  "lp64f") triplet_abi="f32";;
+		  "lp64s") triplet_abi="sf";;
+		esac
+		la_canonical_triplet="loongarch64-${triplet_os}${triplet_abi}"
+
 		# Set default value for with_abiext (internal)
 		case ${with_abiext} in
 		"")
diff --git a/gcc/config/loongarch/t-linux b/gcc/config/loongarch/t-linux
index 131c45fdced..e40da179203 100644
--- a/gcc/config/loongarch/t-linux
+++ b/gcc/config/loongarch/t-linux
@@ -40,7 +40,7 @@ ifeq ($(filter LA_DISABLE_MULTILIB,$(tm_defines)),)
 
     MULTILIB_OSDIRNAMES = \
       mabi.lp64d=../lib64$\
-      $(call if_multiarch,:loongarch64-linux-gnuf64)
+      $(call if_multiarch,:loongarch64-linux-gnu)
 
     MULTILIB_OSDIRNAMES += \
       mabi.lp64f=../lib64/f32$\
-- 
2.39.1


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

* Re: [PATCH] LoongArch: Fix multiarch tuple canonization
  2023-02-13 10:38 [PATCH] LoongArch: Fix multiarch tuple canonization Xi Ruoyao
@ 2023-02-14  3:32 ` Lulu Cheng
  2023-02-15  9:32   ` Yujie Yang
  2023-02-15 10:42 ` WANG Xuerui
  1 sibling, 1 reply; 6+ messages in thread
From: Lulu Cheng @ 2023-02-14  3:32 UTC (permalink / raw)
  To: Xi Ruoyao, gcc-patches; +Cc: WANG Xuerui, Chenghua Xu, yangyujie

add yangyujie.

在 2023/2/13 下午6:38, Xi Ruoyao 写道:
> Multiarch tuple will be coded in file or directory names in
> multiarch-aware distros, so one ABI should have only one multiarch
> tuple.  For example, "--target=loongarch64-linux-gnu --with-abi=lp64s"
> and "--target=loongarch64-linux-gnusf" should both set multiarch tuple
> to "loongarch64-linux-gnusf".  Before this commit,
> "--target=loongarch64-linux-gnu --with-abi=lp64s --disable-multilib"
> will produce wrong result (loongarch64-linux-gnu).
>
> A recent LoongArch psABI revision mandates "loongarch64-linux-gnu" to be
> used for -mabi=lp64d (instead of "loongarch64-linux-gnuf64") for some
> non-technical reason [1].  Note that we cannot make
> "loongarch64-linux-gnuf64" an alias for "loongarch64-linux-gnu" because
> to implement such an alias, we must create thousands of symlinks in the
> distro and doing so would be completely unpractical.  This commit also
> aligns GCC with the revision.
>
> Tested by building cross compilers with --enable-multiarch and multiple
> combinations of --target=loongarch64-linux-gnu*, --with-abi=lp64{s,f,d},
> and --{enable,disable}-multilib; and run "xgcc --print-multiarch" then
> manually verify the result with eyesight.
>
> Ok for trunk and backport to releases/gcc-12?
>
> [1]: https://github.com/loongson/LoongArch-Documentation/pull/80
>
> gcc/ChangeLog:
>
> 	* config.gcc (triplet_abi): Set its value based on $with_abi,
> 	instead of $target.
> 	(la_canonical_triplet): Set it after $triplet_abi is set
> 	correctly.
> 	* config/loongarch/t-linux (MULTILIB_OSDIRNAMES): Make the
> 	multiarch tuple for lp64d "loongarch64-linux-gnu" (without
> 	"f64" suffix).
> ---
>   gcc/config.gcc               | 14 +++++++-------
>   gcc/config/loongarch/t-linux |  2 +-
>   2 files changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/gcc/config.gcc b/gcc/config.gcc
> index 067720ac795..c070e6ecd2e 100644
> --- a/gcc/config.gcc
> +++ b/gcc/config.gcc
> @@ -4889,20 +4889,16 @@ case "${target}" in
>   		case ${target} in
>   		loongarch64-*-*-*f64)
>   			abi_pattern="lp64d"
> -			triplet_abi="f64"
>   			;;
>   		loongarch64-*-*-*f32)
>   			abi_pattern="lp64f"
> -			triplet_abi="f32"
>   			;;
>   		loongarch64-*-*-*sf)
>   			abi_pattern="lp64s"
> -			triplet_abi="sf"
>   			;;
>   		loongarch64-*-*-*)
>   			abi_pattern="lp64[dfs]"
>   			abi_default="lp64d"
> -			triplet_abi=""
>   			;;
>   		*)
>   			echo "Unsupported target ${target}." 1>&2
> @@ -4923,9 +4919,6 @@ case "${target}" in
>   			  ;;
>   		esac
>   
> -		la_canonical_triplet="loongarch64-${triplet_os}${triplet_abi}"
> -
> -
>   		# Perform initial sanity checks on --with-* options.
>   		case ${with_arch} in
>   		"" | loongarch64 | la464) ;; # OK, append here.
> @@ -4996,6 +4989,13 @@ case "${target}" in
>   			;;
>   		esac
>   
> +		case ${with_abi} in
> +		  "lp64d") triplet_abi="";;
> +		  "lp64f") triplet_abi="f32";;
> +		  "lp64s") triplet_abi="sf";;
> +		esac
> +		la_canonical_triplet="loongarch64-${triplet_os}${triplet_abi}"
> +
>   		# Set default value for with_abiext (internal)
>   		case ${with_abiext} in
>   		"")
> diff --git a/gcc/config/loongarch/t-linux b/gcc/config/loongarch/t-linux
> index 131c45fdced..e40da179203 100644
> --- a/gcc/config/loongarch/t-linux
> +++ b/gcc/config/loongarch/t-linux
> @@ -40,7 +40,7 @@ ifeq ($(filter LA_DISABLE_MULTILIB,$(tm_defines)),)
>   
>       MULTILIB_OSDIRNAMES = \
>         mabi.lp64d=../lib64$\
> -      $(call if_multiarch,:loongarch64-linux-gnuf64)
> +      $(call if_multiarch,:loongarch64-linux-gnu)
>   
>       MULTILIB_OSDIRNAMES += \
>         mabi.lp64f=../lib64/f32$\


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

* Re: [PATCH] LoongArch: Fix multiarch tuple canonization
  2023-02-14  3:32 ` Lulu Cheng
@ 2023-02-15  9:32   ` Yujie Yang
  0 siblings, 0 replies; 6+ messages in thread
From: Yujie Yang @ 2023-02-15  9:32 UTC (permalink / raw)
  To: Lulu Cheng, Xi Ruoyao, gcc-patches; +Cc: WANG Xuerui, Chenghua Xu

On Tue, Feb 14, 2023 at 11:32:00AM +0800, Lulu Cheng wrote:
> add yangyujie.
 
Looks good to me. Thanks for the forward!


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

* Re: [PATCH] LoongArch: Fix multiarch tuple canonization
  2023-02-13 10:38 [PATCH] LoongArch: Fix multiarch tuple canonization Xi Ruoyao
  2023-02-14  3:32 ` Lulu Cheng
@ 2023-02-15 10:42 ` WANG Xuerui
  2023-02-17  1:41   ` Lulu Cheng
  1 sibling, 1 reply; 6+ messages in thread
From: WANG Xuerui @ 2023-02-15 10:42 UTC (permalink / raw)
  To: Xi Ruoyao, gcc-patches; +Cc: Lulu Cheng, Chenghua Xu, Revy

Hi,

On 2023/2/13 18:38, Xi Ruoyao wrote:
> Multiarch tuple will be coded in file or directory names in
> multiarch-aware distros, so one ABI should have only one multiarch
> tuple.  For example, "--target=loongarch64-linux-gnu --with-abi=lp64s"
> and "--target=loongarch64-linux-gnusf" should both set multiarch tuple
> to "loongarch64-linux-gnusf".  Before this commit,
> "--target=loongarch64-linux-gnu --with-abi=lp64s --disable-multilib"
> will produce wrong result (loongarch64-linux-gnu).
>
> A recent LoongArch psABI revision mandates "loongarch64-linux-gnu" to be
> used for -mabi=lp64d (instead of "loongarch64-linux-gnuf64") for some
> non-technical reason [1].  Note that we cannot make
> "loongarch64-linux-gnuf64" an alias for "loongarch64-linux-gnu" because
> to implement such an alias, we must create thousands of symlinks in the
> distro and doing so would be completely unpractical.  This commit also
> aligns GCC with the revision.
>
> Tested by building cross compilers with --enable-multiarch and multiple
> combinations of --target=loongarch64-linux-gnu*, --with-abi=lp64{s,f,d},
> and --{enable,disable}-multilib; and run "xgcc --print-multiarch" then
> manually verify the result with eyesight.
>
> Ok for trunk and backport to releases/gcc-12?
>
> [1]: https://github.com/loongson/LoongArch-Documentation/pull/80
>
> gcc/ChangeLog:
>
> 	* config.gcc (triplet_abi): Set its value based on $with_abi,
> 	instead of $target.
> 	(la_canonical_triplet): Set it after $triplet_abi is set
> 	correctly.
> 	* config/loongarch/t-linux (MULTILIB_OSDIRNAMES): Make the
> 	multiarch tuple for lp64d "loongarch64-linux-gnu" (without
> 	"f64" suffix).
> ---
>   gcc/config.gcc               | 14 +++++++-------
>   gcc/config/loongarch/t-linux |  2 +-
>   2 files changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/gcc/config.gcc b/gcc/config.gcc
> index 067720ac795..c070e6ecd2e 100644
> --- a/gcc/config.gcc
> +++ b/gcc/config.gcc
> @@ -4889,20 +4889,16 @@ case "${target}" in
>   		case ${target} in
>   		loongarch64-*-*-*f64)
>   			abi_pattern="lp64d"
> -			triplet_abi="f64"
>   			;;
>   		loongarch64-*-*-*f32)
>   			abi_pattern="lp64f"
> -			triplet_abi="f32"
>   			;;
>   		loongarch64-*-*-*sf)
>   			abi_pattern="lp64s"
> -			triplet_abi="sf"
>   			;;
>   		loongarch64-*-*-*)
>   			abi_pattern="lp64[dfs]"
>   			abi_default="lp64d"
> -			triplet_abi=""
>   			;;
>   		*)
>   			echo "Unsupported target ${target}." 1>&2
> @@ -4923,9 +4919,6 @@ case "${target}" in
>   			  ;;
>   		esac
>   
> -		la_canonical_triplet="loongarch64-${triplet_os}${triplet_abi}"
> -
> -
>   		# Perform initial sanity checks on --with-* options.
>   		case ${with_arch} in
>   		"" | loongarch64 | la464) ;; # OK, append here.
> @@ -4996,6 +4989,13 @@ case "${target}" in
>   			;;
>   		esac
>   
> +		case ${with_abi} in
> +		  "lp64d") triplet_abi="";;
> +		  "lp64f") triplet_abi="f32";;
> +		  "lp64s") triplet_abi="sf";;
> +		esac
> +		la_canonical_triplet="loongarch64-${triplet_os}${triplet_abi}"
> +
>   		# Set default value for with_abiext (internal)
>   		case ${with_abiext} in
>   		"")
> diff --git a/gcc/config/loongarch/t-linux b/gcc/config/loongarch/t-linux
> index 131c45fdced..e40da179203 100644
> --- a/gcc/config/loongarch/t-linux
> +++ b/gcc/config/loongarch/t-linux
> @@ -40,7 +40,7 @@ ifeq ($(filter LA_DISABLE_MULTILIB,$(tm_defines)),)
>   
>       MULTILIB_OSDIRNAMES = \
>         mabi.lp64d=../lib64$\
> -      $(call if_multiarch,:loongarch64-linux-gnuf64)
> +      $(call if_multiarch,:loongarch64-linux-gnu)
>   
>       MULTILIB_OSDIRNAMES += \
>         mabi.lp64f=../lib64/f32$\

Thanks for the quick patch; however Revy told me offline yesterday that 
this might conflict with things Debian side once this gets merged. He 
may have more details to share.

Adding him to CC -- you could keep him CC-ed on future changes that may 
impact distro packaging.


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

* Re: [PATCH] LoongArch: Fix multiarch tuple canonization
  2023-02-15 10:42 ` WANG Xuerui
@ 2023-02-17  1:41   ` Lulu Cheng
  2023-02-18  8:59     ` [pushed][PATCH] " Lulu Cheng
  0 siblings, 1 reply; 6+ messages in thread
From: Lulu Cheng @ 2023-02-17  1:41 UTC (permalink / raw)
  To: WANG Xuerui, Xi Ruoyao, gcc-patches, zhangdandan; +Cc: Chenghua Xu, Revy

Hi,

在 2023/2/15 下午6:42, WANG Xuerui 写道:
> Hi,
>
> On 2023/2/13 18:38, Xi Ruoyao wrote:
>> Multiarch tuple will be coded in file or directory names in
>> multiarch-aware distros, so one ABI should have only one multiarch
>> tuple.  For example, "--target=loongarch64-linux-gnu --with-abi=lp64s"
>> and "--target=loongarch64-linux-gnusf" should both set multiarch tuple
>> to "loongarch64-linux-gnusf".  Before this commit,
>> "--target=loongarch64-linux-gnu --with-abi=lp64s --disable-multilib"
>> will produce wrong result (loongarch64-linux-gnu).
>>
>> A recent LoongArch psABI revision mandates "loongarch64-linux-gnu" to be
>> used for -mabi=lp64d (instead of "loongarch64-linux-gnuf64") for some
>> non-technical reason [1].  Note that we cannot make
>> "loongarch64-linux-gnuf64" an alias for "loongarch64-linux-gnu" because
>> to implement such an alias, we must create thousands of symlinks in the
>> distro and doing so would be completely unpractical.  This commit also
>> aligns GCC with the revision.
>>
>> Tested by building cross compilers with --enable-multiarch and multiple
>> combinations of --target=loongarch64-linux-gnu*, --with-abi=lp64{s,f,d},
>> and --{enable,disable}-multilib; and run "xgcc --print-multiarch" then
>> manually verify the result with eyesight.
>>
>> Ok for trunk and backport to releases/gcc-12?
>>
>> [1]: https://github.com/loongson/LoongArch-Documentation/pull/80
>>
>> gcc/ChangeLog:
>>
>>     * config.gcc (triplet_abi): Set its value based on $with_abi,
>>     instead of $target.
>>     (la_canonical_triplet): Set it after $triplet_abi is set
>>     correctly.
>>     * config/loongarch/t-linux (MULTILIB_OSDIRNAMES): Make the
>>     multiarch tuple for lp64d "loongarch64-linux-gnu" (without
>>     "f64" suffix).
>> ---
>>   gcc/config.gcc               | 14 +++++++-------
>>   gcc/config/loongarch/t-linux |  2 +-
>>   2 files changed, 8 insertions(+), 8 deletions(-)
>>
>> diff --git a/gcc/config.gcc b/gcc/config.gcc
>> index 067720ac795..c070e6ecd2e 100644
>> --- a/gcc/config.gcc
>> +++ b/gcc/config.gcc
>> @@ -4889,20 +4889,16 @@ case "${target}" in
>>           case ${target} in
>>           loongarch64-*-*-*f64)
>>               abi_pattern="lp64d"
>> -            triplet_abi="f64"
>>               ;;
>>           loongarch64-*-*-*f32)
>>               abi_pattern="lp64f"
>> -            triplet_abi="f32"
>>               ;;
>>           loongarch64-*-*-*sf)
>>               abi_pattern="lp64s"
>> -            triplet_abi="sf"
>>               ;;
>>           loongarch64-*-*-*)
>>               abi_pattern="lp64[dfs]"
>>               abi_default="lp64d"
>> -            triplet_abi=""
>>               ;;
>>           *)
>>               echo "Unsupported target ${target}." 1>&2
>> @@ -4923,9 +4919,6 @@ case "${target}" in
>>                 ;;
>>           esac
>>   - la_canonical_triplet="loongarch64-${triplet_os}${triplet_abi}"
>> -
>> -
>>           # Perform initial sanity checks on --with-* options.
>>           case ${with_arch} in
>>           "" | loongarch64 | la464) ;; # OK, append here.
>> @@ -4996,6 +4989,13 @@ case "${target}" in
>>               ;;
>>           esac
>>   +        case ${with_abi} in
>> +          "lp64d") triplet_abi="";;
>> +          "lp64f") triplet_abi="f32";;
>> +          "lp64s") triplet_abi="sf";;
>> +        esac
>> + la_canonical_triplet="loongarch64-${triplet_os}${triplet_abi}"
>> +
>>           # Set default value for with_abiext (internal)
>>           case ${with_abiext} in
>>           "")
>> diff --git a/gcc/config/loongarch/t-linux b/gcc/config/loongarch/t-linux
>> index 131c45fdced..e40da179203 100644
>> --- a/gcc/config/loongarch/t-linux
>> +++ b/gcc/config/loongarch/t-linux
>> @@ -40,7 +40,7 @@ ifeq ($(filter LA_DISABLE_MULTILIB,$(tm_defines)),)
>>         MULTILIB_OSDIRNAMES = \
>>         mabi.lp64d=../lib64$\
>> -      $(call if_multiarch,:loongarch64-linux-gnuf64)
>> +      $(call if_multiarch,:loongarch64-linux-gnu)
>>         MULTILIB_OSDIRNAMES += \
>>         mabi.lp64f=../lib64/f32$\
>
> Thanks for the quick patch; however Revy told me offline yesterday 
> that this might conflict with things Debian side once this gets 
> merged. He may have more details to share.
>
> Adding him to CC -- you could keep him CC-ed on future changes that 
> may impact distro packaging.

Thank you for your feedback.

This modification plan is determined by the operating system group. If 
there is any problem, you can describe it clearly.

If there is no problem, we will combine this patch.

Thanks!


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

* [pushed][PATCH] LoongArch: Fix multiarch tuple canonization
  2023-02-17  1:41   ` Lulu Cheng
@ 2023-02-18  8:59     ` Lulu Cheng
  0 siblings, 0 replies; 6+ messages in thread
From: Lulu Cheng @ 2023-02-18  8:59 UTC (permalink / raw)
  To: WANG Xuerui, Xi Ruoyao, gcc-patches, zhangdandan; +Cc: Chenghua Xu, Revy

Pushed r13-6126 and cherry picked to r12-9187.

在 2023/2/17 上午9:41, Lulu Cheng 写道:
> Hi,
>
> 在 2023/2/15 下午6:42, WANG Xuerui 写道:
>> Hi,
>>
>> On 2023/2/13 18:38, Xi Ruoyao wrote:
>>> Multiarch tuple will be coded in file or directory names in
>>> multiarch-aware distros, so one ABI should have only one multiarch
>>> tuple.  For example, "--target=loongarch64-linux-gnu --with-abi=lp64s"
>>> and "--target=loongarch64-linux-gnusf" should both set multiarch tuple
>>> to "loongarch64-linux-gnusf".  Before this commit,
>>> "--target=loongarch64-linux-gnu --with-abi=lp64s --disable-multilib"
>>> will produce wrong result (loongarch64-linux-gnu).
>>>
>>> A recent LoongArch psABI revision mandates "loongarch64-linux-gnu" 
>>> to be
>>> used for -mabi=lp64d (instead of "loongarch64-linux-gnuf64") for some
>>> non-technical reason [1].  Note that we cannot make
>>> "loongarch64-linux-gnuf64" an alias for "loongarch64-linux-gnu" because
>>> to implement such an alias, we must create thousands of symlinks in the
>>> distro and doing so would be completely unpractical.  This commit also
>>> aligns GCC with the revision.
>>>
>>> Tested by building cross compilers with --enable-multiarch and multiple
>>> combinations of --target=loongarch64-linux-gnu*, 
>>> --with-abi=lp64{s,f,d},
>>> and --{enable,disable}-multilib; and run "xgcc --print-multiarch" then
>>> manually verify the result with eyesight.
>>>
>>> Ok for trunk and backport to releases/gcc-12?
>>>
>>> [1]: https://github.com/loongson/LoongArch-Documentation/pull/80
>>>
>>> gcc/ChangeLog:
>>>
>>>     * config.gcc (triplet_abi): Set its value based on $with_abi,
>>>     instead of $target.
>>>     (la_canonical_triplet): Set it after $triplet_abi is set
>>>     correctly.
>>>     * config/loongarch/t-linux (MULTILIB_OSDIRNAMES): Make the
>>>     multiarch tuple for lp64d "loongarch64-linux-gnu" (without
>>>     "f64" suffix).
>>> ---
>>>   gcc/config.gcc               | 14 +++++++-------
>>>   gcc/config/loongarch/t-linux |  2 +-
>>>   2 files changed, 8 insertions(+), 8 deletions(-)
>>>
>>> diff --git a/gcc/config.gcc b/gcc/config.gcc
>>> index 067720ac795..c070e6ecd2e 100644
>>> --- a/gcc/config.gcc
>>> +++ b/gcc/config.gcc
>>> @@ -4889,20 +4889,16 @@ case "${target}" in
>>>           case ${target} in
>>>           loongarch64-*-*-*f64)
>>>               abi_pattern="lp64d"
>>> -            triplet_abi="f64"
>>>               ;;
>>>           loongarch64-*-*-*f32)
>>>               abi_pattern="lp64f"
>>> -            triplet_abi="f32"
>>>               ;;
>>>           loongarch64-*-*-*sf)
>>>               abi_pattern="lp64s"
>>> -            triplet_abi="sf"
>>>               ;;
>>>           loongarch64-*-*-*)
>>>               abi_pattern="lp64[dfs]"
>>>               abi_default="lp64d"
>>> -            triplet_abi=""
>>>               ;;
>>>           *)
>>>               echo "Unsupported target ${target}." 1>&2
>>> @@ -4923,9 +4919,6 @@ case "${target}" in
>>>                 ;;
>>>           esac
>>>   - la_canonical_triplet="loongarch64-${triplet_os}${triplet_abi}"
>>> -
>>> -
>>>           # Perform initial sanity checks on --with-* options.
>>>           case ${with_arch} in
>>>           "" | loongarch64 | la464) ;; # OK, append here.
>>> @@ -4996,6 +4989,13 @@ case "${target}" in
>>>               ;;
>>>           esac
>>>   +        case ${with_abi} in
>>> +          "lp64d") triplet_abi="";;
>>> +          "lp64f") triplet_abi="f32";;
>>> +          "lp64s") triplet_abi="sf";;
>>> +        esac
>>> + la_canonical_triplet="loongarch64-${triplet_os}${triplet_abi}"
>>> +
>>>           # Set default value for with_abiext (internal)
>>>           case ${with_abiext} in
>>>           "")
>>> diff --git a/gcc/config/loongarch/t-linux 
>>> b/gcc/config/loongarch/t-linux
>>> index 131c45fdced..e40da179203 100644
>>> --- a/gcc/config/loongarch/t-linux
>>> +++ b/gcc/config/loongarch/t-linux
>>> @@ -40,7 +40,7 @@ ifeq ($(filter LA_DISABLE_MULTILIB,$(tm_defines)),)
>>>         MULTILIB_OSDIRNAMES = \
>>>         mabi.lp64d=../lib64$\
>>> -      $(call if_multiarch,:loongarch64-linux-gnuf64)
>>> +      $(call if_multiarch,:loongarch64-linux-gnu)
>>>         MULTILIB_OSDIRNAMES += \
>>>         mabi.lp64f=../lib64/f32$\
>>
>> Thanks for the quick patch; however Revy told me offline yesterday 
>> that this might conflict with things Debian side once this gets 
>> merged. He may have more details to share.
>>
>> Adding him to CC -- you could keep him CC-ed on future changes that 
>> may impact distro packaging.
>
> Thank you for your feedback.
>
> This modification plan is determined by the operating system group. If 
> there is any problem, you can describe it clearly.
>
> If there is no problem, we will combine this patch.
>
> Thanks!


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

end of thread, other threads:[~2023-02-18  8:59 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-13 10:38 [PATCH] LoongArch: Fix multiarch tuple canonization Xi Ruoyao
2023-02-14  3:32 ` Lulu Cheng
2023-02-15  9:32   ` Yujie Yang
2023-02-15 10:42 ` WANG Xuerui
2023-02-17  1:41   ` Lulu Cheng
2023-02-18  8:59     ` [pushed][PATCH] " Lulu Cheng

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).