!106 [RISC-V] Adapts to the RISC-V backend construction

From: @eastb233
Reviewed-by: @haijianzhang
Signed-off-by: @haijianzhang
This commit is contained in:
openeuler-ci-bot 2021-08-28 06:53:35 +00:00 committed by Gitee
commit 9ed542c2bd

View File

@ -1,4 +1,4 @@
%global DATE 20210819 %global DATE 20210827
%global gcc_version 10.3.1 %global gcc_version 10.3.1
%global gcc_major 10.3.1 %global gcc_major 10.3.1
@ -55,11 +55,15 @@
%else %else
%global attr_ifunc 0 %global attr_ifunc 0
%endif %endif
%ifarch riscv64
%global _lib lib
%global _smp_mflags -j8
%endif
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: %{DATE}.3 Release: %{DATE}.4
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
URL: https://gcc.gnu.org URL: https://gcc.gnu.org
@ -678,13 +682,14 @@ CC="$CC" CFLAGS="$OPT_FLAGS" \
--with-multilib-list=lp64 --with-multilib-list=lp64
%endif %endif
%ifarch riscv64 %ifarch riscv64
--with-arch=rv64gc --with-abi=lp64d --with-multilib-list=lp64d --with-arch=rv64g --with-abi=lp64d \
--disable-libquadmath --disable-multilib
%endif %endif
%ifarch sparc sparcv9 sparc64 %ifarch sparc sparcv9 sparc64
make -j32 BOOT_CFLAGS="$OPT_FLAGS" bootstrap make %{?_smp_mflags} BOOT_CFLAGS="$OPT_FLAGS" bootstrap
%else %else
make -j32 BOOT_CFLAGS="$OPT_FLAGS" BOOT_LDFLAGS="-pie -Wl,-z,relro,-z,now" make %{?_smp_mflags} BOOT_CFLAGS="$OPT_FLAGS" BOOT_LDFLAGS="-pie -Wl,-z,relro,-z,now"
%endif %endif
# Make generated man pages even if Pod::Man is not new enough # Make generated man pages even if Pod::Man is not new enough
@ -692,14 +697,14 @@ perl -pi -e 's/head3/head2/' ../contrib/texi2pod.pl
for i in ../gcc/doc/*.texi; do for i in ../gcc/doc/*.texi; do
cp -a $i $i.orig; sed 's/ftable/table/' $i.orig > $i cp -a $i $i.orig; sed 's/ftable/table/' $i.orig > $i
done done
make -j -C gcc generated-manpages make %{?_smp_mflags} -C gcc generated-manpages
for i in ../gcc/doc/*.texi; do mv -f $i.orig $i; done for i in ../gcc/doc/*.texi; do mv -f $i.orig $i; done
# Make generated doxygen pages. # Make generated doxygen pages.
%if %{build_libstdcxx_docs} %if %{build_libstdcxx_docs}
cd %{gcc_target_platform}/libstdc++-v3 cd %{gcc_target_platform}/libstdc++-v3
make -j doc-html-doxygen make %{?_smp_mflags} doc-html-doxygen
make -j doc-man-doxygen make %{?_smp_mflags} doc-man-doxygen
cd ../.. cd ../..
%endif %endif
@ -777,7 +782,7 @@ cd obj-%{gcc_target_platform}
TARGET_PLATFORM=%{gcc_target_platform} TARGET_PLATFORM=%{gcc_target_platform}
# There are some MP bugs in libstdc++ Makefiles # There are some MP bugs in libstdc++ Makefiles
make -j -C %{gcc_target_platform}/libstdc++-v3 make %{?_smp_mflags} -C %{gcc_target_platform}/libstdc++-v3
make prefix=%{buildroot}%{_prefix} mandir=%{buildroot}%{_mandir} \ make prefix=%{buildroot}%{_prefix} mandir=%{buildroot}%{_mandir} \
infodir=%{buildroot}%{_infodir} install infodir=%{buildroot}%{_infodir} install
@ -1510,7 +1515,7 @@ cd obj-%{gcc_target_platform}
%if %{build_check} %if %{build_check}
# run the tests. # run the tests.
LC_ALL=C make -j32 -k check ALT_CC_UNDER_TEST=gcc ALT_CXX_UNDER_TEST=g++ \ LC_ALL=C make %{?_smp_mflags} -k check ALT_CC_UNDER_TEST=gcc ALT_CXX_UNDER_TEST=g++ \
RUNTESTFLAGS="--target_board=unix/'{,-fstack-protector-strong}'" || : RUNTESTFLAGS="--target_board=unix/'{,-fstack-protector-strong}'" || :
echo ====================TESTING========================= echo ====================TESTING=========================
( LC_ALL=C ../contrib/test_summary || : ) 2>&1 | sed -n '/^cat.*EOF/,/^EOF/{/^cat.*EOF/d;/^EOF/d;/^LAST_UPDATED:/d;p;}' ( LC_ALL=C ../contrib/test_summary || : ) 2>&1 | sed -n '/^cat.*EOF/,/^EOF/{/^cat.*EOF/d;/^EOF/d;/^LAST_UPDATED:/d;p;}'
@ -2564,6 +2569,12 @@ end
%doc rpm.doc/changelogs/libcc1/ChangeLog* %doc rpm.doc/changelogs/libcc1/ChangeLog*
%changelog %changelog
* Fri Aug 27 2021 eastb233 <xiezhiheng@huawei.com> - 10.3.1-20210827.4
- Type:RISC-V
- ID:NA
- SUG:NA
- DESC:Adapts to the RISC-V backend construction
* Thu Aug 19 2021 eastb233 <xiezhiheng@huawei.com> - 10.3.1-20210819.3 * Thu Aug 19 2021 eastb233 <xiezhiheng@huawei.com> - 10.3.1-20210819.3
- Type:Sync - Type:Sync
- ID:NA - ID:NA