From bb32b7db1246544dd2182cdd00cdc785e9f38cf5 Mon Sep 17 00:00:00 2001 From: David Abdurachmanov Date: Mon, 27 Aug 2018 07:59:33 +0300 Subject: [PATCH] Add support for RISC-V (riscv64) Signed-off-by: David Abdurachmanov --- tbb.spec | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/tbb.spec b/tbb.spec index 536daeb..369b6b9 100644 --- a/tbb.spec +++ b/tbb.spec @@ -8,7 +8,7 @@ Name: tbb Summary: The Threading Building Blocks library abstracts low-level threading details Version: %{upver}%{?uprel:.%{uprel}} -Release: 2%{?dist} +Release: 2.0.riscv64%{?dist} License: ASL 2.0 Group: Development/Tools URL: http://threadingbuildingblocks.org/ @@ -133,7 +133,11 @@ mv build.orig build make %{?_smp_mflags} tbb_build_prefix=obj stdver=c++14 \ CXXFLAGS="$RPM_OPT_FLAGS" \ +%ifnarch riscv64 LDFLAGS="-Wl,--as-needed $RPM_LD_FLAGS" +%else + LDFLAGS="-Wl,--as-needed -latomic $RPM_LD_FLAGS" +%endif for file in %{SOURCE6} %{SOURCE7} %{SOURCE8}; do base=$(basename ${file}) sed 's/_FEDORA_VERSION/%{version}/' ${file} > ${base} @@ -146,7 +150,11 @@ pushd python make %{?_smp_mflags} -C rml stdver=c++14 \ CPLUS_FLAGS="%{optflags} -DDO_ITT_NOTIFY -DUSE_PTHREAD" \ PIC_KEY="-fPIC -Wl,--as-needed" \ +%ifnarch riscv64 LDFLAGS="$RPM_LD_FLAGS" +%else + LDFLAGS="-latomic $RPM_LD_FLAGS" +%endif cp -p rml/libirml.so* . %py2_build popd @@ -157,7 +165,11 @@ pushd python3 make %{?_smp_mflags} -C rml stdver=c++14 \ CPLUS_FLAGS="%{optflags} -DDO_ITT_NOTIFY -DUSE_PTHREAD" \ PIC_KEY="-fPIC -Wl,--as-needed" \ +%ifnarch riscv64 LDFLAGS="$RPM_LD_FLAGS" +%else + LDFLAGS="-latomic $RPM_LD_FLAGS" +%endif cp -p rml/libirml.so* . %py3_build popd @@ -264,6 +276,9 @@ rm $RPM_BUILD_ROOT%{_libdir}/cmake/%{name}/README.rst %endif %changelog +* Mon Aug 27 2018 David Abdurachmanov - 2018.5-2.0.riscv64 +- Add support for RISC-V (riscv64) + * Sat Jul 14 2018 Fedora Release Engineering - 2018.5-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild