From 9d5415195a856aefd7515ba026136ea186dfc454 Mon Sep 17 00:00:00 2001 From: Cem Keylan Date: Thu, 16 Jan 2020 10:13:27 +0300 Subject: webkit2gtk: totally steal Dylan's hard work --- testing/webkit2gtk/patches/fix-musl.patch | 56 +++++++++++++++---------------- 1 file changed, 28 insertions(+), 28 deletions(-) (limited to 'testing/webkit2gtk/patches/fix-musl.patch') diff --git a/testing/webkit2gtk/patches/fix-musl.patch b/testing/webkit2gtk/patches/fix-musl.patch index be443121..a9479a69 100644 --- a/testing/webkit2gtk/patches/fix-musl.patch +++ b/testing/webkit2gtk/patches/fix-musl.patch @@ -4,59 +4,59 @@ Reason: fixing machine context access for musl libc; reduce stack/heap usage for Updated for latest webkit2gtk. ---- Source/JavaScriptCore/runtime/MachineContext.h -+++ Source/JavaScriptCore/runtime/MachineContext.h +--- a/Source/JavaScriptCore/runtime/MachineContext.h ++++ b/Source/JavaScriptCore/runtime/MachineContext.h @@ -188,7 +188,7 @@ static inline void*& stackPointerImpl(mcontext_t& machineContext) #error Unknown Architecture #endif - + -#elif OS(FUCHSIA) || defined(__GLIBC__) || defined(__BIONIC__) +#elif OS(FUCHSIA) || defined(__linux__) - + #if CPU(X86) return reinterpret_cast((uintptr_t&) machineContext.gregs[REG_ESP]); @@ -335,7 +335,7 @@ static inline void*& framePointerImpl(mcontext_t& machineContext) #error Unknown Architecture #endif - + -#elif OS(FUCHSIA) || defined(__GLIBC__) || defined(__BIONIC__) +#elif OS(FUCHSIA) || defined(__linux__) - + // The following sequence depends on glibc's sys/ucontext.h. #if CPU(X86) @@ -482,7 +482,7 @@ static inline void*& instructionPointerImpl(mcontext_t& machineContext) #error Unknown Architecture #endif - + -#elif OS(FUCHSIA) || defined(__GLIBC__) || defined(__BIONIC__) +#elif OS(FUCHSIA) || defined(__linux__) - + // The following sequence depends on glibc's sys/ucontext.h. #if CPU(X86) @@ -639,7 +639,7 @@ inline void*& argumentPointer<1>(mcontext_t& machineContext) #error Unknown Architecture #endif - + -#elif OS(FUCHSIA) || defined(__GLIBC__) || defined(__BIONIC__) +#elif OS(FUCHSIA) || defined(__linux__) - + // The following sequence depends on glibc's sys/ucontext.h. #if CPU(X86) @@ -756,7 +756,7 @@ inline void*& llintInstructionPointer(mcontext_t& machineContext) #error Unknown Architecture #endif - + -#elif OS(FUCHSIA) || defined(__GLIBC__) || defined(__BIONIC__) +#elif OS(FUCHSIA) || defined(__linux__) - + // The following sequence depends on glibc's sys/ucontext.h. #if CPU(X86) ---- Source/JavaScriptCore/runtime/Options.h -+++ Source/JavaScriptCore/runtime/Options.h +--- a/Source/JavaScriptCore/runtime/Options.h ++++ b/Source/JavaScriptCore/runtime/Options.h @@ -112,6 +112,16 @@ constexpr bool enableWebAssemblyStreamingApi = true; constexpr bool enableWebAssemblyStreamingApi = false; #endif - + +#if defined(__GLIBC__) +constexpr unsigned jscMaxPerThreadStack = 4 * MB; +constexpr unsigned jscSoftReservedZoneSize = 128 * KB; @@ -83,11 +83,11 @@ Updated for latest webkit2gtk. \ v(bool, crashIfCantAllocateJITMemory, false, Normal, nullptr) \ v(unsigned, jitMemoryReservationSize, 0, Normal, "Set this number to change the executable allocation size in ExecutableAllocatorFixedVMPool. (In bytes.)") \ ---- Source/ThirdParty/ANGLE/src/compiler/preprocessor/ExpressionParser.cpp -+++ Source/ThirdParty/ANGLE/src/compiler/preprocessor/ExpressionParser.cpp +--- a/Source/ThirdParty/ANGLE/src/compiler/preprocessor/ExpressionParser.cpp ++++ b/Source/ThirdParty/ANGLE/src/compiler/preprocessor/ExpressionParser.cpp @@ -728,7 +728,7 @@ int yydebug; #if YYERROR_VERBOSE - + # ifndef yystrlen -# if defined __GLIBC__ && defined _STRING_H +# if defined __linux__ && defined _STRING_H @@ -96,29 +96,29 @@ Updated for latest webkit2gtk. /* Return the length of YYSTR. */ @@ -743,7 +743,7 @@ static YYSIZE_T yystrlen(const char *yystr) # endif - + # ifndef yystpcpy -# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE +# if defined __linux__ && defined _STRING_H && defined _GNU_SOURCE # define yystpcpy stpcpy # else /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in ---- Source/WTF/wtf/Platform.h -+++ Source/WTF/wtf/Platform.h +--- a/Source/WTF/wtf/Platform.h ++++ b/Source/WTF/wtf/Platform.h @@ -707,7 +707,7 @@ - + #endif /* OS(DARWIN) */ - + -#if OS(DARWIN) || OS(FUCHSIA) || ((OS(FREEBSD) || defined(__GLIBC__) || defined(__BIONIC__)) && (CPU(X86) || CPU(X86_64) || CPU(ARM) || CPU(ARM64) || CPU(MIPS))) +#if OS(DARWIN) || OS(FUCHSIA) || ((OS(FREEBSD) || defined(__linux__)) && (CPU(X86) || CPU(X86_64) || CPU(ARM) || CPU(ARM64) || CPU(MIPS))) #define HAVE_MACHINE_CONTEXT 1 #endif - ---- Source/WebCore/xml/XPathGrammar.cpp -+++ Source/WebCore/xml/XPathGrammar.cpp + +--- a/Source/WebCore/xml/XPathGrammar.cpp ++++ b/Source/WebCore/xml/XPathGrammar.cpp @@ -966,7 +966,7 @@ #if YYERROR_VERBOSE - + # ifndef yystrlen -# if defined __GLIBC__ && defined _STRING_H +# if defined __linux__ && defined _STRING_H @@ -127,7 +127,7 @@ Updated for latest webkit2gtk. /* Return the length of YYSTR. */ @@ -989,7 +989,7 @@ # endif - + # ifndef yystpcpy -# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE +# if defined __linux__ && defined _STRING_H && defined _GNU_SOURCE -- cgit v1.2.3