RISC-V: Install libstdc++/libcc1 etc to /lib64 instead of lib
Sync patch from
84edbc6544
This commit is contained in:
parent
5e68530090
commit
e7fda0dd07
@ -0,0 +1,65 @@
|
|||||||
|
From 84edbc6544ed872aedb3cb6f6d0feb8647ff1d8b Mon Sep 17 00:00:00 2001
|
||||||
|
From: YunQiang Su <yunqiang@isrc.iscas.ac.cn>
|
||||||
|
Date: Mon, 14 Oct 2024 10:09:46 +0800
|
||||||
|
Subject: [PATCH] RISC-V: Install libstdc++/libcc1 etc to /lib64 instead of lib
|
||||||
|
|
||||||
|
The problem is that if we are configured with `--disable-multilib`,
|
||||||
|
gcc -print-multi-os-directory
|
||||||
|
outputs
|
||||||
|
.
|
||||||
|
Thus the dest to install libraries is set to
|
||||||
|
/usr/lib/.
|
||||||
|
While other platforms (x86-64, arm64) it will be
|
||||||
|
/usr/lib/../lib64
|
||||||
|
Let's sync riscv64 with them
|
||||||
|
|
||||||
|
Another problem is that
|
||||||
|
gcc -print-file-name=libzstd.so.1
|
||||||
|
will output
|
||||||
|
/usr/lib64/lp64d/../lib64/libzstd.so.1
|
||||||
|
which is also need to patched.
|
||||||
|
---
|
||||||
|
gcc/config.gcc | 3 +++
|
||||||
|
gcc/config/riscv/linux.h | 2 ++
|
||||||
|
gcc/config/riscv/t-openEuler | 2 ++
|
||||||
|
3 files changed, 7 insertions(+)
|
||||||
|
create mode 100644 gcc/config/riscv/t-openEuler
|
||||||
|
|
||||||
|
diff --git a/gcc/config.gcc b/gcc/config.gcc
|
||||||
|
index 19b21a280..23c5bee2b 100644
|
||||||
|
--- a/gcc/config.gcc
|
||||||
|
+++ b/gcc/config.gcc
|
||||||
|
@@ -2453,6 +2453,9 @@ riscv*-*-linux*)
|
||||||
|
xyes) tmake_file="${tmake_file} riscv/t-linux-multilib" ;;
|
||||||
|
*) echo "Unknown value for enable_multilib"; exit 1
|
||||||
|
esac
|
||||||
|
+ case "x${target_vendor}" in
|
||||||
|
+ xopenEuler) tmake_file="${tmake_file} riscv/t-openEuler"
|
||||||
|
+ esac
|
||||||
|
tmake_file="${tmake_file} riscv/t-riscv riscv/t-linux"
|
||||||
|
gnu_ld=yes
|
||||||
|
gas=yes
|
||||||
|
diff --git a/gcc/config/riscv/linux.h b/gcc/config/riscv/linux.h
|
||||||
|
index b5c6c5027..a8d65f4e0 100644
|
||||||
|
--- a/gcc/config/riscv/linux.h
|
||||||
|
+++ b/gcc/config/riscv/linux.h
|
||||||
|
@@ -62,6 +62,8 @@ along with GCC; see the file COPYING3. If not see
|
||||||
|
#define TARGET_ASM_FILE_END file_end_indicate_exec_stack
|
||||||
|
|
||||||
|
#define STARTFILE_PREFIX_SPEC \
|
||||||
|
+ "/lib" XLEN_SPEC "/ " \
|
||||||
|
+ "/usr/lib" XLEN_SPEC "/ " \
|
||||||
|
"/lib" XLEN_SPEC "/" ABI_SPEC "/ " \
|
||||||
|
"/usr/lib" XLEN_SPEC "/" ABI_SPEC "/ " \
|
||||||
|
"/lib/ " \
|
||||||
|
diff --git a/gcc/config/riscv/t-openEuler b/gcc/config/riscv/t-openEuler
|
||||||
|
new file mode 100644
|
||||||
|
index 000000000..26541dd08
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/gcc/config/riscv/t-openEuler
|
||||||
|
@@ -0,0 +1,2 @@
|
||||||
|
+MULTILIB_OPTIONS = mabi=lp64d
|
||||||
|
+MULTILIB_DIRNAMES = ../lib64
|
||||||
|
--
|
||||||
|
2.39.5 (Apple Git-154)
|
||||||
|
|
||||||
9
gcc.spec
9
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 36
|
%global gcc_release 37
|
||||||
|
|
||||||
%global _unpackaged_files_terminate_build 0
|
%global _unpackaged_files_terminate_build 0
|
||||||
%global _performance_build 1
|
%global _performance_build 1
|
||||||
@ -69,7 +69,6 @@
|
|||||||
%global multilib_32_arch i686
|
%global multilib_32_arch i686
|
||||||
%endif
|
%endif
|
||||||
%ifarch riscv64
|
%ifarch riscv64
|
||||||
%global _lib lib
|
|
||||||
%global _smp_mflags -j8
|
%global _smp_mflags -j8
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
@ -224,6 +223,7 @@ Patch114: 0114-aarch64-Remove-below-hard-fp-saved-regs-size.patch
|
|||||||
Patch115: 0115-aarch64-Make-stack-smash-canary-protect-saved-registers.patch
|
Patch115: 0115-aarch64-Make-stack-smash-canary-protect-saved-registers.patch
|
||||||
Patch116: 0116-aarch64-Fix-return-register-handling-in-untyped_call.patch
|
Patch116: 0116-aarch64-Fix-return-register-handling-in-untyped_call.patch
|
||||||
Patch117: 0117-aarch64-Fix-loose-ldpstp-check.patch
|
Patch117: 0117-aarch64-Fix-loose-ldpstp-check.patch
|
||||||
|
Patch118: 0118-RISC-V-Install-libstdc-libcc1-etc-to-lib64-instead-o.patch
|
||||||
|
|
||||||
# Part 3000 ~ 4999
|
# Part 3000 ~ 4999
|
||||||
%ifarch loongarch64
|
%ifarch loongarch64
|
||||||
@ -915,6 +915,7 @@ not stable, so plugins must be rebuilt any time GCC is updated.
|
|||||||
%patch115 -p1
|
%patch115 -p1
|
||||||
%patch116 -p1
|
%patch116 -p1
|
||||||
%patch117 -p1
|
%patch117 -p1
|
||||||
|
%patch118 -p1
|
||||||
|
|
||||||
|
|
||||||
%ifarch loongarch64
|
%ifarch loongarch64
|
||||||
@ -3318,6 +3319,10 @@ end
|
|||||||
%doc rpm.doc/changelogs/libcc1/ChangeLog*
|
%doc rpm.doc/changelogs/libcc1/ChangeLog*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Oct 31 2024 YunQiang Su <yunqiang@isrc.iscas.ac.cn> - 12.3.1-37
|
||||||
|
- Type: Sync
|
||||||
|
- DESC: RISC-V: Install libstdc++/libcc1 etc to /lib64 instead of lib
|
||||||
|
|
||||||
* Mon Oct 21 2024 wangchunyang <wangchunyang15@huawei.com> - 12.3.1-36
|
* Mon Oct 21 2024 wangchunyang <wangchunyang15@huawei.com> - 12.3.1-36
|
||||||
- Type: Sync
|
- Type: Sync
|
||||||
- DESC: Sync bugfix for CVE-2023-4039
|
- DESC: Sync bugfix for CVE-2023-4039
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user