diff --git a/haiku-libs/haikuwebkit/haikuwebkit-1.2.2.recipe b/haiku-libs/haikuwebkit/haikuwebkit-1.2.2.recipe index 18b0d46d8..99a768da3 100644 --- a/haiku-libs/haikuwebkit/haikuwebkit-1.2.2.recipe +++ b/haiku-libs/haikuwebkit/haikuwebkit-1.2.2.recipe @@ -23,6 +23,8 @@ if [ $effectiveTargetArchitecture != x86_gcc2 ]; then fi SECONDARY_ARCHITECTURES="x86" +PATCHES="haikuwebkit-1.2.2.patchset" + PROVIDES=" haikuwebkit$secondaryArchSuffix = $portVersion lib:libWebKit$secondaryArchSuffix = $portVersion diff --git a/haiku-libs/haikuwebkit/patches/haikuwebkit-1.2.2.patchset b/haiku-libs/haikuwebkit/patches/haikuwebkit-1.2.2.patchset new file mode 100644 index 000000000..766eefe2c --- /dev/null +++ b/haiku-libs/haikuwebkit/patches/haikuwebkit-1.2.2.patchset @@ -0,0 +1,31 @@ +From 8a3edba7aa5d5d96531bac23172e924e8619c71d Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Duval?= +Date: Tue, 7 Jan 2014 21:19:15 +0000 +Subject: Haiku: defines cpu options only for x86 + + +diff --git a/Source/cmake/OptionsHaiku.cmake b/Source/cmake/OptionsHaiku.cmake +index fe1ffa8..1135b4c 100644 +--- a/Source/cmake/OptionsHaiku.cmake ++++ b/Source/cmake/OptionsHaiku.cmake +@@ -176,10 +176,13 @@ if (CMAKE_BUILD_TYPE STREQUAL release AND CMAKE_COMPILER_IS_GNUCC AND UNIX AND N + set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--gc-sections ${CMAKE_SHARED_LINKER_FLAGS}") + endif () + +-# i686 is the official requirement for Haiku, let's try to keep this working for everyone +-# Moreover, our stack isn't 16-byte aligned so this avoid crashes where gcc would otherwise use SSE2 instructions. +-set(CMAKE_C_FLAGS "-march=i686 ${CMAKE_C_FLAGS}") +-set(CMAKE_CXX_FLAGS "-march=i686 ${CMAKE_CXX_FLAGS}") ++string(TOLOWER ${CMAKE_HOST_SYSTEM_PROCESSOR} LOWERCASE_CMAKE_HOST_SYSTEM_PROCESSOR) ++if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" AND "${LOWERCASE_CMAKE_HOST_SYSTEM_PROCESSOR}" STREQUAL "x86") ++ # i686 is the official requirement for Haiku, let's try to keep this working for everyone ++ # Moreover, our stack isn't 16-byte aligned so this avoid crashes where gcc would otherwise use SSE2 instructions. ++ set(CMAKE_C_FLAGS "-march=i686 ${CMAKE_C_FLAGS}") ++ set(CMAKE_CXX_FLAGS "-march=i686 ${CMAKE_CXX_FLAGS}") ++endif () + + if (WTF_USE_TILED_BACKING_STORE) + add_definitions(-DWTF_USE_ACCELERATED_COMPOSITING=1) +-- +1.8.3.4 +