ports/archivers/unarr/patches/patch-CMakeLists_txt

34 lines
1.1 KiB
Text

Index: CMakeLists.txt
--- CMakeLists.txt.orig
+++ CMakeLists.txt
@@ -191,11 +191,7 @@ if(UNIX
-pedantic
-Wstrict-prototypes
-Wmissing-prototypes
- -Werror-implicit-function-declaration
- $<$<CONFIG:Release>:-fomit-frame-pointer>
- $<$<C_COMPILER_ID:Clang,AppleClang>:
- -Wno-missing-field-initializers>
- -flto)
+ -Werror-implicit-function-declaration)
if(BUILD_FUZZER)
target_compile_options(unarr PUBLIC "${sanitize_opts}")
target_compile_definitions(
@@ -208,17 +204,6 @@ if(UNIX
if(BUILD_FUZZER)
set(linker_opts "${sanitize_opts}")
- else()
- if("${CMAKE_C_COMPILER_ID}" STREQUAL "AppleClang")
- set(linker_opts "-Wl,-undefined,error")
- else()
- set(linker_opts "-Wl,--as-needed -Wl,--no-undefined")
- endif()
- endif()
-
- # Clang linker needs -flto too when doing lto
- if("${CMAKE_C_COMPILER_ID}" MATCHES "Clang")
- set(linker_opts "${linker_opts} -flto")
endif()
set_target_properties(unarr PROPERTIES LINK_FLAGS "${linker_opts}")