pmaports/cross/gcc-x86/0037-loongarch-disable-multilib-support.patch
2024-03-12 22:44:04 +00:00

61 lines
1.9 KiB
Diff

From c4f484f465a32e796ae384aa3f90e79fa218b4e9 Mon Sep 17 00:00:00 2001
From: Jingyun Hua <huajingyun@loongson.cn>
Date: Mon, 7 Aug 2023 15:25:58 +0800
Subject: [PATCH] loongarch disable multilib support
Signed-off-by: Jingyun Hua <huajingyun@loongson.cn>
---
gcc/config/loongarch/linux.h | 10 +---------
gcc/config/loongarch/t-linux | 18 +++---------------
3 files changed, 5 insertions(+), 25 deletions(-)
diff --git a/gcc/config/loongarch/linux.h b/gcc/config/loongarch/linux.h
index 9059d2441..23eaff0cc 100644
--- a/gcc/config/loongarch/linux.h
+++ b/gcc/config/loongarch/linux.h
@@ -22,15 +22,7 @@ along with GCC; see the file COPYING3. If not see
* can work in a multilib environment. */
#if defined(LA_DISABLE_MULTILIB) && defined(LA_DISABLE_MULTIARCH)
-
- #if DEFAULT_ABI_BASE == ABI_BASE_LP64D
- #define ABI_LIBDIR "lib64"
- #elif DEFAULT_ABI_BASE == ABI_BASE_LP64F
- #define ABI_LIBDIR "lib64/f32"
- #elif DEFAULT_ABI_BASE == ABI_BASE_LP64S
- #define ABI_LIBDIR "lib64/sf"
- #endif
-
+ #define ABI_LIBDIR "lib"
#endif
#ifndef ABI_LIBDIR
diff --git a/gcc/config/loongarch/t-linux b/gcc/config/loongarch/t-linux
index e40da1792..f72c6e878 100644
--- a/gcc/config/loongarch/t-linux
+++ b/gcc/config/loongarch/t-linux
@@ -36,18 +36,6 @@ else
endif
# Don't define MULTILIB_OSDIRNAMES if multilib is disabled.
-ifeq ($(filter LA_DISABLE_MULTILIB,$(tm_defines)),)
-
- MULTILIB_OSDIRNAMES = \
- mabi.lp64d=../lib64$\
- $(call if_multiarch,:loongarch64-linux-gnu)
-
- MULTILIB_OSDIRNAMES += \
- mabi.lp64f=../lib64/f32$\
- $(call if_multiarch,:loongarch64-linux-gnuf32)
-
- MULTILIB_OSDIRNAMES += \
- mabi.lp64s=../lib64/sf$\
- $(call if_multiarch,:loongarch64-linux-gnusf)
-
-endif
+ MULTILIB_OSDIRNAMES = mabi.lp64d=../lib
+ MULTILIB_OSDIRNAMES += mabi.lp64f=../lib
+ MULTILIB_OSDIRNAMES += mabi.lp64s=../lib
--
2.41.0