Skip to content

Commit

Permalink
Merge pull request Cisco-Talos#1387 from micahsnyder/KamathForAIX-gh-…
Browse files Browse the repository at this point in the history
…1383

Build system improvements to support AIX
  • Loading branch information
micahsnyder authored Oct 9, 2024
2 parents 6f7ceb5 + efe8978 commit 52b2017
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 5 deletions.
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
set(C_LINUX 1)
elseif(APPLE OR CMAKE_SYSTEM_NAME MATCHES "BSD")
set(C_BSD 1)
elseif(CMAKE_SYSTEM_NAME MATCHES "AIX")
set(AIX TRUE)
endif()

# Git optionally used to add commit info into build to differentiate in bug reports.
Expand Down
2 changes: 1 addition & 1 deletion libclamav/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ if(ENABLE_SHARED_LIB)
else()
target_link_libraries( clamav PUBLIC Iconv::Iconv )
endif()
if(UNIX AND NOT APPLE)
if(UNIX AND NOT APPLE AND NOT AIX)
target_link_options( clamav PRIVATE "-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/libclamav.map")
endif()
if(WIN32)
Expand Down
2 changes: 1 addition & 1 deletion libclamunrar/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ if(ENABLE_SHARED_LIB)

if(WIN32)
set_target_properties(clamunrar PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS ON)
elseif(UNIX AND NOT APPLE)
elseif(UNIX AND NOT APPLE AND NOT AIX)
target_link_options(clamunrar PRIVATE "-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/libclamunrar.map")
endif()

Expand Down
2 changes: 1 addition & 1 deletion libclamunrar_iface/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ if(ENABLE_UNRAR)

if(WIN32)
set_target_properties(clamunrar_iface PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS ON)
elseif(UNIX AND NOT APPLE)
elseif(UNIX AND NOT APPLE AND NOT AIX)
target_link_options(clamunrar_iface PRIVATE "-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/libclamunrar_iface.map")
endif()

Expand Down
4 changes: 2 additions & 2 deletions libfreshclam/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ if(ENABLE_SHARED_LIB)
target_link_libraries( freshclam
PUBLIC
network )
elseif(UNIX)
elseif(UNIX AND NOT AIX)
if(HAVE_RESOLV_H AND NOT C_BSD) # BSD appears to have libresolv inside libc
target_link_libraries( freshclam
PUBLIC
Expand All @@ -62,7 +62,7 @@ if(ENABLE_SHARED_LIB)

if(WIN32)
set_target_properties(freshclam PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS ON)
elseif(UNIX AND NOT APPLE)
elseif(UNIX AND NOT APPLE AND NOT AIX)
target_link_options(freshclam PRIVATE "-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/libfreshclam.map")
endif()
set_target_properties(freshclam PROPERTIES
Expand Down

0 comments on commit 52b2017

Please sign in to comment.