ports/archivers/unarr/patches/patch-CMakeLists_txt

35 lines
1.1 KiB
Text
Raw Normal View History

2023-08-16 22:26:55 +00:00
Index: CMakeLists.txt
--- CMakeLists.txt.orig
+++ CMakeLists.txt
2023-09-18 23:08:50 +00:00
@@ -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
2023-08-16 22:26:55 +00:00
2023-09-18 23:08:50 +00:00
if(BUILD_FUZZER)
set(linker_opts "${sanitize_opts}")
2023-08-16 22:26:55 +00:00
- else()
2023-09-18 23:08:50 +00:00
- if("${CMAKE_C_COMPILER_ID}" STREQUAL "AppleClang")
- set(linker_opts "-Wl,-undefined,error")
- else()
- set(linker_opts "-Wl,--as-needed -Wl,--no-undefined")
- endif()
2023-08-16 22:26:55 +00:00
- endif()
2023-09-18 23:08:50 +00:00
-
- # Clang linker needs -flto too when doing lto
- if("${CMAKE_C_COMPILER_ID}" MATCHES "Clang")
- set(linker_opts "${linker_opts} -flto")
endif()
2023-08-16 22:26:55 +00:00
2023-09-18 23:08:50 +00:00
set_target_properties(unarr PROPERTIES LINK_FLAGS "${linker_opts}")