Add support for riscv64

Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
This commit is contained in:
David Abdurachmanov 2023-04-05 10:25:14 +03:00
parent e41996e42c
commit eafccd0cf9
Signed by: davidlt
GPG Key ID: 8B7F1DA0E2C9FDBB
1 changed files with 16 additions and 3 deletions

View File

@ -18,7 +18,7 @@
Name: qt5-%{qt_module}
Version: 5.212.0
Release: 0.74%{?prerel}%{?dist}
Release: 0.74%{?prerel}.0.riscv64%{?dist}
Summary: Qt5 - QtWebKit components
License: LGPL-2.0-only AND BSD-3-Clause
@ -36,6 +36,8 @@ Patch6: qtwebkit-icu68.patch
Patch7: webkit-offlineasm-warnings-ruby27.patch
Patch8: qtwebkit-cstdint.patch
Patch10: qtwebkit-5.212.0-alpha4-add-riscv64.patch
BuildRequires: make
BuildRequires: bison
BuildRequires: cmake
@ -148,7 +150,7 @@ test -f Source/WebCore/Resources/textAreaResizeCorner.png
# Decrease debuginfo even on ix86 because of:
# https://bugs.webkit.org/show_bug.cgi?id=140176
%ifarch s390 s390x %{arm} %{ix86} ppc %{power64} %{mips}
%ifarch s390 s390x %{arm} %{ix86} ppc %{power64} %{mips} riscv64
# Decrease debuginfo verbosity to reduce memory consumption even more
%global optflags %(echo %{optflags} | sed 's/-g /-g1 /')
%endif
@ -161,6 +163,11 @@ test -f Source/WebCore/Resources/textAreaResizeCorner.png
CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ;
CXXFLAGS="${CXXFLAGS:-%optflags} -fpermissive" ; export CXXFLAGS ;
%{?__global_ldflags:LDFLAGS="${LDFLAGS:-%__global_ldflags}" ; export LDFLAGS ;}
%ifarch riscv64
export LDFLAGS="${LDFLAGS} -latomic"
%endif
# We cannot use default cmake macro here as it overwrites some settings queried
# by qtwebkit cmake from qmake
%cmake \
@ -170,11 +177,14 @@ CXXFLAGS="${CXXFLAGS:-%optflags} -fpermissive" ; export CXXFLAGS ;
-DCMAKE_C_FLAGS_RELEASE:STRING="-DNDEBUG" \
-DCMAKE_CXX_FLAGS_RELEASE:STRING="-DNDEBUG" \
-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \
%ifarch s390 s390x ppc %{power64}
%ifarch s390 s390x ppc %{power64} riscv64
-DENABLE_JIT=OFF \
%endif
%ifarch s390 s390x ppc %{power64}
-DUSE_SYSTEM_MALLOC=ON \
%endif
%ifarch riscv64
-DTHREADS_PREFER_PTHREAD_FLAG:BOOL=YES \
%endif
%{?docs:-DGENERATE_DOCUMENTATION=ON} \
-DPYTHON_EXECUTABLE:PATH="%{__python3}"
@ -252,6 +262,9 @@ test -z "$(pkg-config --cflags Qt5WebKit | grep Qt5WebKit)"
%changelog
* Wed Apr 06 2023 David Abdurachmanov <davidlt@rivosinc.com> - 5.212.0-0.74alpha4.0.riscv64
- Add support for riscv64
* Mon Feb 20 2023 Than Ngo <than@redhat.com> - 5.212.0-0.74alpha4
- migrated to SPDX license
- fixed FTBFS