Browse Source

[build] cmake: skip "-Wl,-export-dynamic" Illumos

(thx devnexen)

cmake: do not pass "-Wl,-export-dynamic" to Sun ld on Illumos

x-ref:
  "Solaris build fix proposal"
  https://redmine.lighttpd.net/issues/3130
master
Glenn Strauss 5 months ago
parent
commit
f72de7113f
  1. 7
      src/CMakeLists.txt
  2. 2
      src/meson.build

7
src/CMakeLists.txt

@ -1052,10 +1052,9 @@ if(CMAKE_C_COMPILER_ID MATCHES "GNU" OR CMAKE_C_COMPILER_ID MATCHES "Clang")
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_WITHDEBINFO} -O2")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${WARN_LDFLAGS}")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${WARN_LDFLAGS}")
endif()
if((NOT APPLE) OR CMAKE_C_COMPILER_ID MATCHES "GNU")
add_target_properties(lighttpd LINK_FLAGS "-Wl,-export-dynamic")
if((NOT APPLE) AND (NOT CMAKE_SYSTEM_NAME MATCHES "SunOS"))
add_target_properties(lighttpd LINK_FLAGS "-Wl,-export-dynamic")
endif()
endif()
set_target_properties(lighttpd PROPERTIES CMAKE_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})

2
src/meson.build

@ -815,7 +815,7 @@ if target_machine.system() == 'windows'
endif
endif
if compiler.get_id() == 'gcc' or target_machine.system() != 'darwin'
if (compiler.get_id() == 'gcc' or compiler.get_id() == 'clang') and target_machine.system() != 'darwin' and target_machine.system() != 'sunos'
lighttpd_flags += [ declare_dependency(
link_args: [
'-Wl,-export-dynamic',

Loading…
Cancel
Save