Adjust for riscv64

Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
This commit is contained in:
David Abdurachmanov 2023-12-17 16:48:22 +02:00
parent 910e36f48c
commit 92fcfc37df
Signed by: davidlt
GPG Key ID: 7A5F42FAF91FACC3
2 changed files with 18 additions and 5 deletions

View File

@ -93,7 +93,7 @@
%else %else
%global build_libatomic 0 %global build_libatomic 0
%endif %endif
%ifarch %{ix86} x86_64 %{arm} alpha ppc ppc64 ppc64le ppc64p7 s390 s390x aarch64 %ifarch %{ix86} x86_64 %{arm} alpha ppc ppc64 ppc64le ppc64p7 s390 s390x aarch64 riscv64
%global build_libitm 1 %global build_libitm 1
%else %else
%global build_libitm 0 %global build_libitm 0
@ -136,7 +136,7 @@
Summary: Various compilers (C, C++, Objective-C, ...) Summary: Various compilers (C, C++, Objective-C, ...)
Name: gcc Name: gcc
Version: %{gcc_version} Version: %{gcc_version}
Release: %{gcc_release}%{?dist} Release: %{gcc_release}.0.riscv64%{?dist}
# libgcc, libgfortran, libgomp, libstdc++ and crtstuff have # libgcc, libgfortran, libgomp, libstdc++ and crtstuff have
# GCC Runtime Exception. # GCC Runtime Exception.
License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ with exceptions and LGPLv2+ and BSD License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ with exceptions and LGPLv2+ and BSD
@ -988,6 +988,13 @@ ISL_FLAG_PIC=-fPIC
ISL_FLAG_PIC=-fpic ISL_FLAG_PIC=-fpic
%endif %endif
cd isl-build cd isl-build
%ifarch riscv64
# Update config.{sub,guess} scripts for riscv64 (the original ones are too old)
cp -f -v /usr/lib/rpm/%{_vendor}/config.guess ../../isl-%{isl_version}/config.guess
cp -f -v /usr/lib/rpm/%{_vendor}/config.sub ../../isl-%{isl_version}/config.sub
%endif
sed -i 's|libisl\([^-]\)|libgcc13privateisl\1|g' \ sed -i 's|libisl\([^-]\)|libgcc13privateisl\1|g' \
../../isl-%{isl_version}/Makefile.{am,in} ../../isl-%{isl_version}/Makefile.{am,in}
../../isl-%{isl_version}/configure \ ../../isl-%{isl_version}/configure \
@ -2543,6 +2550,9 @@ end
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/htmxlintrin.h %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/htmxlintrin.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/vecintrin.h %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/vecintrin.h
%endif %endif
%ifarch riscv64
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/riscv_vector.h
%endif
%if %{build_libasan} %if %{build_libasan}
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/sanitizer %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/sanitizer
%endif %endif
@ -3459,6 +3469,9 @@ end
%endif %endif
%changelog %changelog
* Sun Dec 17 2023 David Abdurachmanov <davidlt@rivosinc.com> 13.2.1-6.0.riscv64
- Adjust for riscv64
* Tue Dec 5 2023 Jakub Jelinek <jakub@redhat.com> 13.2.1-6 * Tue Dec 5 2023 Jakub Jelinek <jakub@redhat.com> 13.2.1-6
- update from releases/gcc-13 branch - update from releases/gcc-13 branch
- PRs c++/33799, c++/102191, c++/111703, c++/112269, c++/112301, c++/112633, - PRs c++/33799, c++/102191, c++/111703, c++/112269, c++/112301, c++/112633,

View File

@ -5,7 +5,7 @@ libtool sucks.
rpath="$finalize_rpath" rpath="$finalize_rpath"
test "$mode" != relink && rpath="$compile_rpath$rpath" test "$mode" != relink && rpath="$compile_rpath$rpath"
for libdir in $rpath; do for libdir in $rpath; do
+ case "$libdir" in /usr/lib|/usr/lib64|/usr/lib/../lib|/usr/lib/../lib64) continue;; esac + case "$libdir" in /usr/lib|/usr/lib64|/usr/lib/../lib|/usr/lib/../lib64|/usr/lib/../lib64/lp64d) continue;; esac
if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_flag_spec"; then
if test -n "$hardcode_libdir_separator"; then if test -n "$hardcode_libdir_separator"; then
if test -z "$hardcode_libdirs"; then if test -z "$hardcode_libdirs"; then
@ -13,7 +13,7 @@ libtool sucks.
rpath= rpath=
hardcode_libdirs= hardcode_libdirs=
for libdir in $compile_rpath $finalize_rpath; do for libdir in $compile_rpath $finalize_rpath; do
+ case "$libdir" in /usr/lib|/usr/lib64|/usr/lib/../lib|/usr/lib/../lib64) continue;; esac + case "$libdir" in /usr/lib|/usr/lib64|/usr/lib/../lib|/usr/lib/../lib64|/usr/lib/../lib64/lp64d) continue;; esac
if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_flag_spec"; then
if test -n "$hardcode_libdir_separator"; then if test -n "$hardcode_libdir_separator"; then
if test -z "$hardcode_libdirs"; then if test -z "$hardcode_libdirs"; then
@ -21,7 +21,7 @@ libtool sucks.
rpath= rpath=
hardcode_libdirs= hardcode_libdirs=
for libdir in $finalize_rpath; do for libdir in $finalize_rpath; do
+ case "$libdir" in /usr/lib|/usr/lib64|/usr/lib/../lib|/usr/lib/../lib64) continue;; esac + case "$libdir" in /usr/lib|/usr/lib64|/usr/lib/../lib|/usr/lib/../lib64|/usr/lib/../lib64/lp64d) continue;; esac
if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_flag_spec"; then
if test -n "$hardcode_libdir_separator"; then if test -n "$hardcode_libdir_separator"; then
if test -z "$hardcode_libdirs"; then if test -z "$hardcode_libdirs"; then