freebsd-ports/net/iwnet/files/patch-src_CMakeLists.txt
Alexey Dokuchaev 4a22b45b87 net/iwnet: attempt to fix the port's build on -CURRENT
Lack of MALLOC_PRODUCTION exposed forgotten uninitialized pointer in
hash table generator which caused segmentation fault during the build.
Pull another upstream patch which might mitigate the races of CMake's
custom commands.

While here, don't forcibly insert our CFLAGS, they would get appended
at the later stage automagically.

Reported by:	pkg-fallout
2022-05-08 07:33:58 +00:00

26 lines
910 B
Plaintext

--- src/CMakeLists.txt.orig 2022-02-23 09:48:00 UTC
+++ src/CMakeLists.txt
@@ -52,7 +52,7 @@ endif()
set(CMAKE_C_FLAGS_DEBUG
"${CMAKE_C_ASAN} -O0 -g -ggdb -Werror -DDEBUG -D_DEBUG -UNDEBUG -Wno-unused-variable"
)
-set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_ASAN} -O3 -DNDEBUG")
+set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_ASAN} -DNDEBUG")
set(CMAKE_EXE_LINKER_FLAGS_RELEASE "-Wl,-s")
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELEASE} -g")
set(CMAKE_C_FLAGS_RELEASEWITHDEBINFO ${CMAKE_C_FLAGS_RELWITHDEBINFO})
@@ -174,13 +174,6 @@ if(BUILD_SHARED_LIBS)
SOVERSION ${PROJECT_VERSION_MAJOR}
PUBLIC_HEADER "${PUB_HDRS}"
DEFINE_SYMBOL IW_API_EXPORTS)
-
- if(CMAKE_BUILD_TYPE STREQUAL "Release")
- add_custom_command(
- TARGET iwnet
- POST_BUILD
- COMMAND ${STRIP_CMD} $<TARGET_FILE:iwnet>)
- endif()
set_target_properties(
iwnet_s