ports/devel/wasm3/files/patch-CMakeLists.txt
Daniel Engberg b62fdebf66 devel/wasm3: Fix compilation and clean up port.
Rephrase COMMENT and pkg-descr to sound less like a sales pitch
Disable -march=native as this overrides settings by the framework and fails on multiple non x86 platforms
Remove GitHub related variables that are already defined
Replace += with = for GH_TUPLE
Remove forced O3 optimization

PR:		259701
Approved by:	portmgr (build fix blanket)
Differential Revision:	https://reviews.freebsd.org/D32883
2021-11-14 08:34:25 +01:00

49 lines
1.9 KiB
Text

--- CMakeLists.txt.orig 2021-06-02 10:40:14 UTC
+++ CMakeLists.txt
@@ -166,18 +166,18 @@ else()
endif()
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -ggdb -O0")
- set(CMAKE_C_FLAGS_RELEASE "-O3 -Wfatal-errors -fomit-frame-pointer -fno-stack-check -fno-stack-protector") #-fno-inline
+ set(CMAKE_C_FLAGS_RELEASE "-Wfatal-errors -fomit-frame-pointer -fno-stack-check -fno-stack-protector") #-fno-inline
if(BUILD_NATIVE)
if(APPLE AND CMAKE_C_COMPILER_ID MATCHES "Clang" AND CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "arm64")
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -mcpu=native")
else()
- set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -march=native")
+ set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -mcpu=native")
endif()
endif()
set(CMAKE_EXE_LINKER_FLAGS_DEBUG "-O0")
- set(CMAKE_EXE_LINKER_FLAGS_RELEASE "-O3")
+# set(CMAKE_EXE_LINKER_FLAGS_RELEASE "-O3")
target_link_libraries(${OUT_FILE} m)
@@ -188,21 +188,10 @@ if(BUILD_WASI MATCHES "simple")
elseif(BUILD_WASI MATCHES "metawasi")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Dd_m3HasMetaWASI")
elseif(BUILD_WASI MATCHES "uvwasi")
- include(FetchContent)
- FetchContent_Declare(
- uvwasi
- GIT_REPOSITORY https://github.com/vshymanskyy/uvwasi.git
- GIT_TAG b063d686848c32a26119513056874f051c74258a
- )
-
- FetchContent_GetProperties(uvwasi)
- if(NOT uvwasi_POPULATED)
- FetchContent_Populate(uvwasi)
- include_directories("${uvwasi_SOURCE_DIR}/include")
- add_subdirectory(${uvwasi_SOURCE_DIR} ${uvwasi_BINARY_DIR} EXCLUDE_FROM_ALL)
- endif()
+ add_subdirectory("_deps/uvwasi-src")
+ include_directories("_deps/uvwasi-src/include")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Dd_m3HasUVWASI")
- target_link_libraries(${OUT_FILE} uvwasi_a uv_a)
+ target_link_libraries(${OUT_FILE} uvwasi_a)
endif()
check_ipo_supported(RESULT result)