LoongArch: Fix osdir name
Signed-off-by: Peng Fan <fanpeng@loongson.cn>
This commit is contained in:
parent
64c9539b9a
commit
80dbb737b0
78
LoongArch-Fix-osdirname.patch
Normal file
78
LoongArch-Fix-osdirname.patch
Normal file
@ -0,0 +1,78 @@
|
|||||||
|
From 297ebfe072777f82bb6a9b7699dde926e589b357 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Peng Fan <fanpeng@loongson.cn>
|
||||||
|
Date: Thu, 13 Jun 2024 01:31:55 +0000
|
||||||
|
Subject: [PATCH] LoongArch: Fix osdirname
|
||||||
|
|
||||||
|
Signed-off-by: Peng Fan <fanpeng@loongson.cn>
|
||||||
|
---
|
||||||
|
gcc/config/loongarch/t-linux | 27 ++++++++++++---------------
|
||||||
|
1 file changed, 12 insertions(+), 15 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/gcc/config/loongarch/t-linux b/gcc/config/loongarch/t-linux
|
||||||
|
index 62a870b66..4d8eb6962 100644
|
||||||
|
--- a/gcc/config/loongarch/t-linux
|
||||||
|
+++ b/gcc/config/loongarch/t-linux
|
||||||
|
@@ -18,42 +18,38 @@
|
||||||
|
|
||||||
|
# Multilib
|
||||||
|
MULTILIB_OPTIONS = mabi=lp64d/mabi=lp64f/mabi=lp64s
|
||||||
|
-MULTILIB_DIRNAMES = base/lp64d base/lp64f base/lp64s
|
||||||
|
+MULTILIB_DIRNAMES = . base/lp64f base/lp64s
|
||||||
|
|
||||||
|
# The GCC driver always gets all abi-related options on the command line.
|
||||||
|
# (see loongarch-driver.c:driver_get_normalized_m_opts)
|
||||||
|
comma=,
|
||||||
|
MULTILIB_REQUIRED = $(foreach mlib,$(subst $(comma), ,$(TM_MULTILIB_CONFIG)),\
|
||||||
|
- $(firstword $(subst /, ,$(mlib))))
|
||||||
|
+ $(firstword $(subst /, ,$(mlib))))
|
||||||
|
|
||||||
|
SPECS = specs.install
|
||||||
|
|
||||||
|
# temporary self_spec when building libraries (e.g. libgcc)
|
||||||
|
gen_mlib_spec = $(if $(word 2,$1),\
|
||||||
|
- %{$(firstword $1):$(patsubst %,-%,$(wordlist 2,$(words $1),$1))})
|
||||||
|
+ %{$(firstword $1):$(patsubst %,-%,$(wordlist 2,$(words $1),$1))})
|
||||||
|
|
||||||
|
# clean up the result of DRIVER_SELF_SPEC to avoid conflict
|
||||||
|
lib_build_self_spec = %<march=* %<mtune=* %<mcmodel=* %<mfpu=* %<msimd=*
|
||||||
|
|
||||||
|
+# build libraries with -mstrict-align by default
|
||||||
|
+lib_build_self_spec += -mstrict-align
|
||||||
|
+
|
||||||
|
# append user-specified build options from --with-multilib-list
|
||||||
|
-lib_build_self_spec += $(foreach mlib,\
|
||||||
|
- $(subst $(comma), ,$(TM_MULTILIB_CONFIG)),\
|
||||||
|
- $(call gen_mlib_spec,$(subst /, ,$(mlib))))
|
||||||
|
+lib_build_self_spec += $(foreach mlib,$(subst $(comma), ,$(TM_MULTILIB_CONFIG)),\
|
||||||
|
+ $(call gen_mlib_spec,$(subst /, ,$(mlib))))
|
||||||
|
|
||||||
|
specs: specs.install
|
||||||
|
- sed '/^*self_spec:$$/{ n;s/^$$/$(lib_build_self_spec)/g; }' $< > $@
|
||||||
|
-
|
||||||
|
-# Do some preparation before regression tests:
|
||||||
|
-# remove lib-build-specs / make symlinks for the toplevel multilib variant
|
||||||
|
+ sed '/^*self_spec:$$/{ n;s/^$$/$(lib_build_self_spec)/g; }' $< > $@
|
||||||
|
|
||||||
|
-LA_DEFAULT_MULTISUBDIR = $(shell $(GCC_FOR_TARGET) --print-multi-dir)
|
||||||
|
+# Remove lib_build_self_specs before regression tests.
|
||||||
|
.PHONY: remove-lib-specs
|
||||||
|
check check-host check-target $(CHECK_TARGETS) $(lang_checks): remove-lib-specs
|
||||||
|
remove-lib-specs:
|
||||||
|
-mv -f specs.install specs 2>/dev/null
|
||||||
|
- -mv $(LA_DEFAULT_MULTISUBDIR)/* ./
|
||||||
|
- -mkdir -p ../$(target_noncanonical)/`dirname $(LA_DEFAULT_MULTISUBDIR)`
|
||||||
|
- -$(LN_S) .. ../$(target_noncanonical)/$(LA_DEFAULT_MULTISUBDIR)
|
||||||
|
|
||||||
|
# Multiarch
|
||||||
|
ifneq ($(call if_multiarch,yes),yes)
|
||||||
|
@@ -79,5 +75,6 @@ ifeq ($(filter LA_DISABLE_MULTILIB,$(tm_defines)),)
|
||||||
|
MULTILIB_OSDIRNAMES += \
|
||||||
|
mabi.lp64s=../lib64/sf$\
|
||||||
|
$(call if_multiarch,:loongarch64-linux-gnusf)
|
||||||
|
-
|
||||||
|
+else
|
||||||
|
+ MULTILIB_OSDIRNAMES := ../lib64
|
||||||
|
endif
|
||||||
|
--
|
||||||
|
2.41.1
|
||||||
|
|
||||||
10
gcc.spec
10
gcc.spec
@ -2,7 +2,7 @@
|
|||||||
%global gcc_major 12
|
%global gcc_major 12
|
||||||
# Note, gcc_release must be integer, if you want to add suffixes to
|
# Note, gcc_release must be integer, if you want to add suffixes to
|
||||||
# %%{release}, append them after %%{gcc_release} on Release: line.
|
# %%{release}, append them after %%{gcc_release} on Release: line.
|
||||||
%global gcc_release 30
|
%global gcc_release 31
|
||||||
|
|
||||||
%global _unpackaged_files_terminate_build 0
|
%global _unpackaged_files_terminate_build 0
|
||||||
%global _performance_build 1
|
%global _performance_build 1
|
||||||
@ -72,9 +72,6 @@
|
|||||||
%global _lib lib
|
%global _lib lib
|
||||||
%global _smp_mflags -j8
|
%global _smp_mflags -j8
|
||||||
%endif
|
%endif
|
||||||
%ifarch loongarch64
|
|
||||||
%global _lib lib
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%global isl_enable 1
|
%global isl_enable 1
|
||||||
%global check_enable 0
|
%global check_enable 0
|
||||||
@ -338,6 +335,7 @@ Patch3127: LoongArch-Use-finer-grained-DBAR-hints.patch
|
|||||||
Patch3128: LoongArch-Add-LA664-support.patch
|
Patch3128: LoongArch-Add-LA664-support.patch
|
||||||
Patch3129: LoongArch-Fix-internal-error-running-gcc-march-nativ.patch
|
Patch3129: LoongArch-Fix-internal-error-running-gcc-march-nativ.patch
|
||||||
Patch3130: LoongArch-Fix-lsx-vshuf.c-and-lasx-xvshuf_b.c-tests-.patch
|
Patch3130: LoongArch-Fix-lsx-vshuf.c-and-lasx-xvshuf_b.c-tests-.patch
|
||||||
|
Patch3131: LoongArch-Fix-osdirname.patch
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
# On ARM EABI systems, we do want -gnueabi to be part of the
|
# On ARM EABI systems, we do want -gnueabi to be part of the
|
||||||
@ -1004,6 +1002,7 @@ not stable, so plugins must be rebuilt any time GCC is updated.
|
|||||||
%patch3128 -p1
|
%patch3128 -p1
|
||||||
%patch3129 -p1
|
%patch3129 -p1
|
||||||
%patch3130 -p1
|
%patch3130 -p1
|
||||||
|
%patch3131 -p1
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
echo '%{_vendor} %{version}-%{release}' > gcc/DEV-PHASE
|
echo '%{_vendor} %{version}-%{release}' > gcc/DEV-PHASE
|
||||||
@ -3268,6 +3267,9 @@ end
|
|||||||
%doc rpm.doc/changelogs/libcc1/ChangeLog*
|
%doc rpm.doc/changelogs/libcc1/ChangeLog*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Jun 13 2024 Peng Fan <fanpeng@loongson.cn> - 12.3.1-31
|
||||||
|
- DESC: Fix LoongArch osdir name
|
||||||
|
|
||||||
* Fri May 17 2024 Zhenyu Zhao <zhaozhenyu17@huawei.com> - 12.3.1-30
|
* Fri May 17 2024 Zhenyu Zhao <zhaozhenyu17@huawei.com> - 12.3.1-30
|
||||||
- Type: Sync
|
- Type: Sync
|
||||||
- DESC: Sync bug fix patch from openeuler/gcc
|
- DESC: Sync bug fix patch from openeuler/gcc
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user