Compare commits

...

7 Commits

Author SHA1 Message Date
David Abdurachmanov 1a21789b92
Add support for riscv64
Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
2023-11-10 10:30:05 +02:00
Jan Grulich 960dd8639a Include more webkitgtk optimizations 2023-10-11 08:53:18 +02:00
Jan Grulich c47bc9ac67 Require 8GB of RAM per vCPU for debuginfo processing 2023-10-10 18:14:14 +02:00
Jan Grulich 0f720fcfe1 Rebuild (qt5) 2023-10-08 18:04:34 +02:00
Fedora Release Engineering 4bdb5e0a41 Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-07-21 16:09:31 +00:00
František Zatloukal 25215d15f2 Rebuilt for ICU 73.2 2023-07-12 00:32:07 +02:00
Jan Grulich d1ad1555d6 Rebuild (qt5) 2023-06-14 08:48:52 +02:00
2 changed files with 167 additions and 6 deletions

View File

@ -18,7 +18,7 @@
Name: qt5-%{qt_module}
Version: 5.212.0
Release: 0.75%{?prerel}%{?dist}
Release: 0.79%{?prerel}.0.riscv64%{?dist}
Summary: Qt5 - QtWebKit components
License: LGPL-2.0-only AND BSD-3-Clause
@ -36,6 +36,9 @@ Patch6: qtwebkit-icu68.patch
Patch7: webkit-offlineasm-warnings-ruby27.patch
Patch8: qtwebkit-cstdint.patch
# riscv64
Patch10: qtwebkit-5.212.0-alpha4-add-riscv64.patch
BuildRequires: make
BuildRequires: bison
BuildRequires: cmake
@ -141,14 +144,21 @@ test -f Source/WebCore/Resources/textAreaResizeCorner.png
# The following changes of optflags ietc. are adapted from webkitgtk4 package, which
# is mostly similar to this one...
#
# Increase the DIE limit so our debuginfo packages could be size optimized.
# Decreases the size for x86_64 from ~5G to ~1.1G.
# Increase the DIE limit so our debuginfo packages can be size-optimized.
# This previously decreased the size for x86_64 from ~5G to ~1.1G, but as of
# 2022 it's more like 850 MB -> 675 MB. This requires lots of RAM on the
# builders, so only do this for x86_64 and aarch64 to avoid overwhelming
# builders with less RAM.
# https://bugzilla.redhat.com/show_bug.cgi?id=1456261
%global _dwz_max_die_limit 250000000
%global _dwz_max_die_limit_x86_64 250000000
%global _dwz_max_die_limit_aarch64 250000000
# Require 32 GB of RAM per vCPU for debuginfo processing. 16 GB is not enough.
%global _find_debuginfo_opts %limit_build -m 32768
# 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
@ -170,11 +180,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 +265,21 @@ test -z "$(pkg-config --cflags Qt5WebKit | grep Qt5WebKit)"
%changelog
* Fri Nov 10 2023 David Abdurachmanov <davidlt@rivosinc.com> - 5.212.0-0.79alpha4.0.riscv64
- Add support for riscv64
* Sun Oct 08 2023 Jan Grulich <jgrulich@redhat.com> - 5.212.0-0.79alpha4
- Rebuild (qt5)
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 5.212.0-0.78alpha4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Tue Jul 11 2023 František Zatloukal <fzatlouk@redhat.com> - 5.212.0-0.77alpha4
- Rebuilt for ICU 73.2
* Wed Jun 14 2023 Jan Grulich <jgrulich@redhat.com> - 5.212.0-0.76alpha4
- Rebuild (qt5)
* Wed Apr 12 2023 Jan Grulich <jgrulich@redhat.com> - 5.212.0-0.75alpha4
- Rebuild (qt5)

View File

@ -0,0 +1,133 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index db54eb4..ef22473 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -88,6 +88,8 @@ elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "s390")
set(WTF_CPU_S390 1)
elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "s390x")
set(WTF_CPU_S390X 1)
+elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "riscv64")
+ set(WTF_CPU_RISCV64 1)
else ()
message(FATAL_ERROR "Unknown CPU '${LOWERCASE_CMAKE_SYSTEM_PROCESSOR}'")
endif ()
diff --git a/Source/JavaScriptCore/CMakeLists.txt b/Source/JavaScriptCore/CMakeLists.txt
index afd76ca..3fca6e0 100644
--- a/Source/JavaScriptCore/CMakeLists.txt
+++ b/Source/JavaScriptCore/CMakeLists.txt
@@ -1289,6 +1289,7 @@ elseif (WTF_CPU_MIPS)
elseif (WTF_CPU_SH4)
elseif (WTF_CPU_X86)
elseif (WTF_CPU_X86_64)
+elseif (WTF_CPU_RISCV64)
if (MSVC AND ENABLE_JIT)
add_custom_command(
OUTPUT ${DERIVED_SOURCES_DIR}/JITStubsMSVC64.obj
diff --git a/Source/ThirdParty/brotli/dec/port.h b/Source/ThirdParty/brotli/dec/port.h
index 6b3d735..d1c8c14 100644
--- a/Source/ThirdParty/brotli/dec/port.h
+++ b/Source/ThirdParty/brotli/dec/port.h
@@ -56,10 +56,15 @@
#define BROTLI_TARGET_POWERPC64
#endif
+#if defined(__riscv) && defined(__riscv_xlen) && __riscv_xlen == 64
+#define BROTLI_TARGET_RISCV64
+#endif
+
#ifdef BROTLI_BUILD_PORTABLE
#define BROTLI_ALIGNED_READ (!!1)
#elif defined(BROTLI_TARGET_X86) || defined(BROTLI_TARGET_X64) || \
- defined(BROTLI_TARGET_ARMV7) || defined(BROTLI_TARGET_ARMV8)
+ defined(BROTLI_TARGET_ARMV7) || defined(BROTLI_TARGET_ARMV8) || \
+ defined(BROTLI_TARGET_RISCV64)
/* Allow unaligned read only for white-listed CPUs. */
#define BROTLI_ALIGNED_READ (!!0)
#else
@@ -96,7 +101,7 @@ static BROTLI_INLINE void BrotliDump(const char* f, int l, const char* fn) {
#elif defined(BROTLI_BUILD_32_BIT)
#define BROTLI_64_BITS 0
#elif defined(BROTLI_TARGET_X64) || defined(BROTLI_TARGET_ARMV8) || \
- defined(BROTLI_TARGET_POWERPC64)
+ defined(BROTLI_TARGET_POWERPC64) || defined(BROTLI_TARGET_RISCV64)
#define BROTLI_64_BITS 1
#else
#define BROTLI_64_BITS 0
diff --git a/Source/WTF/wtf/CMakeLists.txt b/Source/WTF/wtf/CMakeLists.txt
index 297589b..2c29fcb 100644
--- a/Source/WTF/wtf/CMakeLists.txt
+++ b/Source/WTF/wtf/CMakeLists.txt
@@ -251,6 +251,9 @@ list(APPEND WTF_SOURCES
set(WTF_SYSTEM_INCLUDE_DIRECTORIES
${ICU_INCLUDE_DIRS}
)
+
+list(APPEND WTF_LIBRARIES atomic)
+
list(APPEND WTF_LIBRARIES
${ICU_I18N_LIBRARIES}
${ICU_LIBRARIES}
diff --git a/Source/WTF/wtf/Platform.h b/Source/WTF/wtf/Platform.h
index 5717f3e..7aefa1b 100644
--- a/Source/WTF/wtf/Platform.h
+++ b/Source/WTF/wtf/Platform.h
@@ -176,6 +176,11 @@
#define WTF_CPU_X86_SSE2 1
#endif
+/* CPU(RISCV64) - RISCV64 */
+#if defined(__riscv) && defined(__riscv_xlen) && __riscv_xlen == 64
+#define WTF_CPU_RISCV64 1
+#endif
+
/* CPU(ARM64) - Apple */
#if (defined(__arm64__) && defined(__APPLE__)) || defined(__aarch64__)
#define WTF_CPU_ARM64 1
@@ -707,7 +712,8 @@
|| CPU(S390X) \
|| CPU(MIPS64) \
|| CPU(PPC64) \
- || CPU(PPC64LE)
+ || CPU(PPC64LE) \
+ || CPU(RISCV64)
#define USE_JSVALUE64 1
#else
#define USE_JSVALUE32_64 1
diff --git a/Source/WTF/wtf/dtoa/utils.h b/Source/WTF/wtf/dtoa/utils.h
index 889642c..176d590 100644
--- a/Source/WTF/wtf/dtoa/utils.h
+++ b/Source/WTF/wtf/dtoa/utils.h
@@ -49,7 +49,7 @@
defined(__ARMEL__) || \
defined(_MIPS_ARCH_MIPS32R2)
#define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1
-#elif CPU(MIPS) || CPU(MIPS64) || CPU(PPC) || CPU(PPC64) || CPU(PPC64LE) || CPU(SH4) || CPU(S390) || CPU(S390X) || CPU(IA64) || CPU(ALPHA) || CPU(ARM64) || CPU(HPPA)
+#elif CPU(MIPS) || CPU(MIPS64) || CPU(PPC) || CPU(PPC64) || CPU(PPC64LE) || CPU(SH4) || CPU(S390) || CPU(S390X) || CPU(IA64) || CPU(ALPHA) || CPU(ARM64) || CPU(HPPA) || CPU(RISCV64)
#define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1
#elif defined(_M_IX86) || defined(__i386__)
#if defined(_WIN32)
diff --git a/Tools/Scripts/webkitdirs.pm b/Tools/Scripts/webkitdirs.pm
index 45b6649..1b32756 100755
--- a/Tools/Scripts/webkitdirs.pm
+++ b/Tools/Scripts/webkitdirs.pm
@@ -1264,6 +1264,11 @@ sub isARM()
return ($Config{archname} =~ /^arm[v\-]/) || ($Config{archname} =~ /^aarch64[v\-]/);
}
+sub isRISCV()
+{
+ return ($Config{archname} =~ /^riscv(|32|64)\-/);
+}
+
sub isX86_64()
{
return (architecture() eq "x86_64") || 0;
@@ -2069,7 +2074,7 @@ sub generateBuildSystemFromCMakeProject
# Compiler options to keep floating point values consistent
# between 32-bit and 64-bit architectures.
determineArchitecture();
- if ($architecture ne "x86_64" && !isARM() && !isCrossCompilation() && !isAnyWindows()) {
+ if ($architecture ne "x86_64" && !isARM() && !isRISCV && !isCrossCompilation() && !isAnyWindows()) {
$ENV{'CXXFLAGS'} = "-march=pentium4 -msse2 -mfpmath=sse " . ($ENV{'CXXFLAGS'} || "");
}