qtwebkit: don't disable JIT on netbsd, declare functions like linux. this works well enough to browse javascript websites with otter-browser, which needed paxctl +m, although I didn't try it without these changes. XXX this package might be crashing from feeding bogus values to posix_memalign.diff -r1.54 -r1.55 pkgsrc/x11/qt5-qtwebkit/Makefile
(maya)
@@ -1,43 +1,44 @@ | @@ -1,43 +1,44 @@ | |||
1 | # $NetBSD: Makefile,v 1.54 2018/07/20 03:34:01 ryoon Exp $ | 1 | # $NetBSD: Makefile,v 1.55 2018/08/01 15:01:08 maya Exp $ | |
2 | 2 | |||
3 | DISTNAME= qtwebkit-${QTWKVERSION} | 3 | DISTNAME= qtwebkit-${QTWKVERSION} | |
4 | PKGNAME= qt5-qtwebkit-${QTWKVERSION:S/-/./} | 4 | PKGNAME= qt5-qtwebkit-${QTWKVERSION:S/-/./} | |
5 | PKGREVISION= 7 | 5 | PKGREVISION= 8 | |
6 | MASTER_SITES= ${MASTER_SITE_GITHUB:=annulen/} | 6 | MASTER_SITES= ${MASTER_SITE_GITHUB:=annulen/} | |
7 | GITHUB_PROJECT= webkit | 7 | GITHUB_PROJECT= webkit | |
8 | GITHUB_RELEASE= ${DISTNAME} | 8 | GITHUB_RELEASE= ${DISTNAME} | |
9 | #MASTER_SITES= https://github.com/annulen/webkit/releases/download/qtwebkit-${QTWKVERSION}/ | 9 | #MASTER_SITES= https://github.com/annulen/webkit/releases/download/qtwebkit-${QTWKVERSION}/ | |
10 | CATEGORIES= x11 | 10 | CATEGORIES= x11 | |
11 | 11 | |||
12 | MAINTAINER= pkgsrc-users@NetBSD.org | 12 | MAINTAINER= pkgsrc-users@NetBSD.org | |
13 | HOMEPAGE= http://qt-project.org/ | 13 | HOMEPAGE= http://qt-project.org/ | |
14 | COMMENT= Qt5 WebView module | 14 | COMMENT= Qt5 WebView module | |
15 | LICENSE= gnu-lgpl-v2.1 AND gnu-gpl-v3 | 15 | LICENSE= gnu-lgpl-v2.1 AND gnu-gpl-v3 | |
16 | EXTRACT_SUFX= .tar.xz | 16 | EXTRACT_SUFX= .tar.xz | |
17 | 17 | |||
18 | QTWKVERSION= 5.212.0-alpha2 | 18 | QTWKVERSION= 5.212.0-alpha2 | |
19 | 19 | |||
20 | PYTHON_VERSIONS_ACCEPTED= 27 # as if 5.212.0-alpha2 | 20 | PYTHON_VERSIONS_ACCEPTED= 27 # as if 5.212.0-alpha2 | |
21 | 21 | |||
22 | .include "../../mk/dlopen.buildlink3.mk" | 22 | .include "../../mk/dlopen.buildlink3.mk" | |
23 | BUILDLINK_TRANSFORM+= opt:-ldl:${BUILDLINK_LDADD.dl:M*} | 23 | BUILDLINK_TRANSFORM+= opt:-ldl:${BUILDLINK_LDADD.dl:M*} | |
24 | 24 | |||
25 | USE_LANGUAGES= c c++11 | 25 | USE_LANGUAGES= c c++11 | |
26 | USE_TOOLS+= gmake perl:build pkg-config bison flex sed | 26 | USE_TOOLS+= gmake perl:build pkg-config bison flex sed | |
27 | USE_CMAKE= yes | 27 | USE_CMAKE= yes | |
28 | CMAKE_ARG_PATH= .. | 28 | CMAKE_ARG_PATH= .. | |
29 | CONFIGURE_DIRS= _build | 29 | CONFIGURE_DIRS= _build | |
30 | CMAKE_INSTALL_PREFIX= ${PREFIX}/qt5 | 30 | CMAKE_INSTALL_PREFIX= ${PREFIX}/qt5 | |
31 | TEST_TARGET= test | |||
31 | 32 | |||
32 | CMAKE_ARGS+= -DPORT=Qt | 33 | CMAKE_ARGS+= -DPORT=Qt | |
33 | CMAKE_ARGS+= -DENABLE_TOOLS=OFF | 34 | CMAKE_ARGS+= -DENABLE_TOOLS=OFF | |
34 | CMAKE_ARGS+= -DCMAKE_BUILD_TYPE=Release | 35 | CMAKE_ARGS+= -DCMAKE_BUILD_TYPE=Release | |
35 | CMAKE_ARGS+= -DSHARED_CORE:BOOL=ON | 36 | CMAKE_ARGS+= -DSHARED_CORE:BOOL=ON | |
36 | CMAKE_ARGS+= -DUSE_SYSTEM_MALLOC:BOOL=ON | 37 | CMAKE_ARGS+= -DUSE_SYSTEM_MALLOC:BOOL=ON | |
37 | CMAKE_ARGS+= -DUSE_LD_GOLD:BOOL=OFF | 38 | CMAKE_ARGS+= -DUSE_LD_GOLD:BOOL=OFF | |
38 | ## requires gcc >= 4.9 | 39 | ## requires gcc >= 4.9 | |
39 | #CMAKE_ARGS+= -DENABLE_FTL_JIT:BOOL=OFF | 40 | #CMAKE_ARGS+= -DENABLE_FTL_JIT:BOOL=OFF | |
40 | #CMAKE_ARGS+= -DENABLE_INDEXED_DATABASE:BOOL=OFF | 41 | #CMAKE_ARGS+= -DENABLE_INDEXED_DATABASE:BOOL=OFF | |
41 | ## needs JIT and ASSEMBLER | 42 | ## needs JIT and ASSEMBLER | |
42 | CMAKE_ARGS+= -DENABLE_SAMPLING_PROFILER:BOOL=OFF | 43 | CMAKE_ARGS+= -DENABLE_SAMPLING_PROFILER:BOOL=OFF | |
43 | 44 |
@@ -1,25 +1,26 @@ | @@ -1,25 +1,26 @@ | |||
1 | $NetBSD: distinfo,v 1.11 2018/01/17 19:37:33 markd Exp $ | 1 | $NetBSD: distinfo,v 1.12 2018/08/01 15:01:08 maya Exp $ | |
2 | 2 | |||
3 | SHA1 (qtwebkit-5.212.0-alpha2.tar.xz) = 6a361cc3f3b7ab1d35955bafe20fbbae61bc80c8 | 3 | SHA1 (qtwebkit-5.212.0-alpha2.tar.xz) = 6a361cc3f3b7ab1d35955bafe20fbbae61bc80c8 | |
4 | RMD160 (qtwebkit-5.212.0-alpha2.tar.xz) = 33c3f7c68090fa16f72950ef85c20978432cc058 | 4 | RMD160 (qtwebkit-5.212.0-alpha2.tar.xz) = 33c3f7c68090fa16f72950ef85c20978432cc058 | |
5 | SHA512 (qtwebkit-5.212.0-alpha2.tar.xz) = b15985aab20c5618dc1f71a0d91f02dbed993516272090a4a12990714bf4c9554ccbdcf9d6a143bf46fcc2c170f691e571114d61686fe49791f8d5c540785758 | 5 | SHA512 (qtwebkit-5.212.0-alpha2.tar.xz) = b15985aab20c5618dc1f71a0d91f02dbed993516272090a4a12990714bf4c9554ccbdcf9d6a143bf46fcc2c170f691e571114d61686fe49791f8d5c540785758 | |
6 | Size (qtwebkit-5.212.0-alpha2.tar.xz) = 12456284 bytes | 6 | Size (qtwebkit-5.212.0-alpha2.tar.xz) = 12456284 bytes | |
7 | SHA1 (patch-Source_JavaScriptCore_API_ObjCCallbackFunction.h) = be77c4b19f5f97c12180c1b7d3b72968364f3229 | 7 | SHA1 (patch-Source_JavaScriptCore_API_ObjCCallbackFunction.h) = be77c4b19f5f97c12180c1b7d3b72968364f3229 | |
8 | SHA1 (patch-Source_JavaScriptCore_assembler_ARMAssembler.h) = 7bbb0a59a0c087abaaddda08fc31aa24809acb70 | 8 | SHA1 (patch-Source_JavaScriptCore_assembler_ARMAssembler.h) = 7bbb0a59a0c087abaaddda08fc31aa24809acb70 | |
9 | SHA1 (patch-Source_JavaScriptCore_assembler_MacroAssemblerARM.cpp) = 79b54cb1d03d976a0629fbd8ee9ac1881951ba10 | 9 | SHA1 (patch-Source_JavaScriptCore_assembler_MacroAssemblerARM.cpp) = 79b54cb1d03d976a0629fbd8ee9ac1881951ba10 | |
10 | SHA1 (patch-Source_JavaScriptCore_dfg_DFGNode.h) = a3eba122c7226a80dacf1b762747fe0a7408b849 | 10 | SHA1 (patch-Source_JavaScriptCore_dfg_DFGNode.h) = a3eba122c7226a80dacf1b762747fe0a7408b849 | |
11 | SHA1 (patch-Source_JavaScriptCore_heap_MachineStackMarker.cpp) = a5815dd5794d9ffbd49e5793198a06535ad89d3c | 11 | SHA1 (patch-Source_JavaScriptCore_heap_MachineStackMarker.cpp) = a5815dd5794d9ffbd49e5793198a06535ad89d3c | |
12 | SHA1 (patch-Source_JavaScriptCore_jit_ThunkGenerators.cpp) = f0ca56e4b4060c0a8d756289d7c25d1ead6b07be | |||
12 | SHA1 (patch-Source_JavaScriptCore_tools_CodeProfiling.cpp) = 94c139413eecb875bba98c7749bba24cfcc16632 | 13 | SHA1 (patch-Source_JavaScriptCore_tools_CodeProfiling.cpp) = 94c139413eecb875bba98c7749bba24cfcc16632 | |
13 | SHA1 (patch-Source_ThirdParty_gtest_include_gtest_internal_gtest-port.h) = 1e4b8cffbd7ec0a6130a0ec2112023bed5c0b78e | 14 | SHA1 (patch-Source_ThirdParty_gtest_include_gtest_internal_gtest-port.h) = 1e4b8cffbd7ec0a6130a0ec2112023bed5c0b78e | |
14 | SHA1 (patch-Source_WTF_wtf_Assertions.cpp) = 15b8ac40e49cfec78d46de634fd6a1edde2d2a96 | 15 | SHA1 (patch-Source_WTF_wtf_Assertions.cpp) = 15b8ac40e49cfec78d46de634fd6a1edde2d2a96 | |
15 | SHA1 (patch-Source_WTF_wtf_InlineASM.h) = 64ea54605fbe787be57f7423e33802def66d6432 | 16 | SHA1 (patch-Source_WTF_wtf_InlineASM.h) = 64ea54605fbe787be57f7423e33802def66d6432 | |
16 | SHA1 (patch-Source_WTF_wtf_MathExtras.h) = 7dac41bf3e50944e49c3e3c29d482d2c3300665d | 17 | SHA1 (patch-Source_WTF_wtf_MathExtras.h) = 7dac41bf3e50944e49c3e3c29d482d2c3300665d | |
17 | SHA1 (patch-Source_WTF_wtf_Platform.h) = cfffb219f1d58d937ae46440aa5395aa066669e4 | 18 | SHA1 (patch-Source_WTF_wtf_Platform.h) = 73e8b07e8d7e718abe986a12b9f0b903dfcc4765 | |
18 | SHA1 (patch-Source_WTF_wtf_ThreadIdentifierDataPthreads.cpp) = bfa570aa20e3508c77bbaebed051821a33f36209 | 19 | SHA1 (patch-Source_WTF_wtf_ThreadIdentifierDataPthreads.cpp) = bfa570aa20e3508c77bbaebed051821a33f36209 | |
19 | SHA1 (patch-Source_WebCore_page_NavigatorBase.cpp) = e8972f4b703a9ff45ce313609d2540f89064b4ff | 20 | SHA1 (patch-Source_WebCore_page_NavigatorBase.cpp) = e8972f4b703a9ff45ce313609d2540f89064b4ff | |
20 | SHA1 (patch-Source_WebCore_platform_graphics_cpu_arm_filters_FELightingNEON.cpp) = dd409929936955ad31b8ec0902067e2f23c054a2 | 21 | SHA1 (patch-Source_WebCore_platform_graphics_cpu_arm_filters_FELightingNEON.cpp) = dd409929936955ad31b8ec0902067e2f23c054a2 | |
21 | SHA1 (patch-Source_WebCore_platform_graphics_surfaces_GraphicsSurface.h) = d1d986afd5525143fc786a959240a72167f03352 | 22 | SHA1 (patch-Source_WebCore_platform_graphics_surfaces_GraphicsSurface.h) = d1d986afd5525143fc786a959240a72167f03352 | |
22 | SHA1 (patch-Source_WebCore_platform_graphics_surfaces_GraphicsSurfaceToken.h) = 838acb2d7ecf41e5f6989d98459d103f4268cdcf | 23 | SHA1 (patch-Source_WebCore_platform_graphics_surfaces_GraphicsSurfaceToken.h) = 838acb2d7ecf41e5f6989d98459d103f4268cdcf | |
23 | SHA1 (patch-Source_WebKit2_Platform_unix_SharedMemoryUnix.cpp) = d18013d0e07d7ad7e9d84cb6ef2d418d9bba4c7e | 24 | SHA1 (patch-Source_WebKit2_Platform_unix_SharedMemoryUnix.cpp) = d18013d0e07d7ad7e9d84cb6ef2d418d9bba4c7e | |
24 | SHA1 (patch-Source_WebKit_PlatformQt.cmake) = 5dfde3b2e3092ffcd11fc6746bed1767b2c3b692 | 25 | SHA1 (patch-Source_WebKit_PlatformQt.cmake) = 5dfde3b2e3092ffcd11fc6746bed1767b2c3b692 | |
25 | SHA1 (patch-Source_cmake_OptionsQt.cmake) = 2527e56468709bd9fd0a98bf754ac9c692cac4dc | 26 | SHA1 (patch-Source_cmake_OptionsQt.cmake) = 2527e56468709bd9fd0a98bf754ac9c692cac4dc |
$NetBSD: patch-Source_JavaScriptCore_jit_ThunkGenerators.cpp,v 1.1 2018/08/01 15:01:08 maya Exp $
Treat netbsd as linux for JIT purposes.
--- Source/JavaScriptCore/jit/ThunkGenerators.cpp.orig 2017-06-04 20:16:05.000000000 +0000
+++ Source/JavaScriptCore/jit/ThunkGenerators.cpp
@@ -633,7 +633,7 @@ MacroAssemblerCodeRef sqrtThunkGenerator
enum MathThunkCallingConvention { };
typedef MathThunkCallingConvention(*MathThunk)(MathThunkCallingConvention);
-#if CPU(X86_64) && COMPILER(GCC_OR_CLANG) && (OS(DARWIN) || OS(LINUX))
+#if CPU(X86_64) && COMPILER(GCC_OR_CLANG) && (OS(DARWIN) || OS(LINUX) || OS(NETBSD))
#define defineUnaryDoubleOpWrapper(function) \
asm( \
@@ -651,7 +651,7 @@ typedef MathThunkCallingConvention(*Math
} \
static MathThunk UnaryDoubleOpWrapper(function) = &function##Thunk;
-#elif CPU(X86) && COMPILER(GCC_OR_CLANG) && OS(LINUX) && defined(__PIC__)
+#elif CPU(X86) && COMPILER(GCC_OR_CLANG) && (OS(LINUX) || OS(NETBSD)) && defined(__PIC__)
#define defineUnaryDoubleOpWrapper(function) \
asm( \
".text\n" \
@@ -675,7 +675,7 @@ typedef MathThunkCallingConvention(*Math
} \
static MathThunk UnaryDoubleOpWrapper(function) = &function##Thunk;
-#elif CPU(X86) && COMPILER(GCC_OR_CLANG) && (OS(DARWIN) || OS(LINUX))
+#elif CPU(X86) && COMPILER(GCC_OR_CLANG) && (OS(DARWIN) || OS(LINUX) || OS(NETBSD))
#define defineUnaryDoubleOpWrapper(function) \
asm( \
".text\n" \
@@ -1,34 +1,23 @@ | @@ -1,34 +1,23 @@ | |||
1 | $NetBSD: patch-Source_WTF_wtf_Platform.h,v 1.3 2018/01/17 19:37:33 markd Exp $ | 1 | $NetBSD: patch-Source_WTF_wtf_Platform.h,v 1.4 2018/08/01 15:01:08 maya Exp $ | |
2 | 2 | |||
3 | * Disable JIT support for NetBSD, fix segfault of qtwebkit consumers | |||
4 | * Use system's malloc for NetBSD, do not use fastmalloc from qt5, | 3 | * Use system's malloc for NetBSD, do not use fastmalloc from qt5, | |
5 | fix segfault of qtwebkit consumers | 4 | fix segfault of qtwebkit consumers | |
6 | 5 | |||
7 | * Disable DISASSEMBLER on Linux. Unresolved symbols as not building | 6 | * Disable DISASSEMBLER on Linux. Unresolved symbols as not building | |
8 | UDis86Disassembler.cpp for some reason. | 7 | UDis86Disassembler.cpp for some reason. | |
9 | 8 | |||
10 | --- Source/WTF/wtf/Platform.h.orig 2017-06-04 20:16:06.000000000 +0000 | 9 | --- Source/WTF/wtf/Platform.h.orig 2017-06-04 20:16:06.000000000 +0000 | |
11 | +++ Source/WTF/wtf/Platform.h | 10 | +++ Source/WTF/wtf/Platform.h | |
12 | @@ -36,6 +36,9 @@ | |||
13 | macros, policy decision macros, and top-level port definitions. ==== */ | |||
14 | #define PLATFORM(WTF_FEATURE) (defined WTF_PLATFORM_##WTF_FEATURE && WTF_PLATFORM_##WTF_FEATURE) | |||
15 | ||||
16 | +#if defined(__NetBSD__) | |||
17 | +#define ENABLE_JIT 0 | |||
18 | +#endif | |||
19 | ||||
20 | /* ==== Platform adaptation macros: these describe properties of the target environment. ==== */ | |||
21 | ||||
22 | @@ -691,6 +694,12 @@ | 11 | @@ -691,6 +694,12 @@ | |
23 | #define USE_SYSTEM_MALLOC 1 | 12 | #define USE_SYSTEM_MALLOC 1 | |
24 | #endif | 13 | #endif | |
25 | 14 | |||
26 | +/* Workaround an issue with fastMalloc on NetBSD */ | 15 | +/* Workaround an issue with fastMalloc on NetBSD */ | |
27 | +#if OS(NETBSD) | 16 | +#if OS(NETBSD) | |
28 | +#define USE_SYSTEM_MALLOC 1 | 17 | +#define USE_SYSTEM_MALLOC 1 | |
29 | +#define ENABLE_ASSEMBLER 1 | 18 | +#define ENABLE_ASSEMBLER 1 | |
30 | +#endif | 19 | +#endif | |
31 | + | 20 | + | |
32 | #define ENABLE_DEBUG_WITH_BREAKPOINT 0 | 21 | #define ENABLE_DEBUG_WITH_BREAKPOINT 0 | |
33 | #define ENABLE_SAMPLING_COUNTERS 0 | 22 | #define ENABLE_SAMPLING_COUNTERS 0 | |
34 | #define ENABLE_SAMPLING_FLAGS 0 | 23 | #define ENABLE_SAMPLING_FLAGS 0 |