# HG changeset patch # User Sebastien Jodogne # Date 1515007535 -3600 # Node ID cbb8deaacdf7aed7d4db067ab256546e9a74192b # Parent 6b3c0d5f65afa386eb5200471ecf20eb104dbb7c Fix static build on CentOS 6 diff -r 6b3c0d5f65af -r cbb8deaacdf7 NEWS --- a/NEWS Wed Jan 03 16:56:52 2018 +0100 +++ b/NEWS Wed Jan 03 20:25:35 2018 +0100 @@ -16,6 +16,7 @@ * Upgrade to curl 7.57.0 for static and Windows builds * Support of Linux Standard Base * Static linking against libuuid (from e2fsprogs) +* Fix static build on CentOS 6 Version 1.3.1 (2017-11-29) diff -r 6b3c0d5f65af -r cbb8deaacdf7 Resources/CMake/Compiler.cmake --- a/Resources/CMake/Compiler.cmake Wed Jan 03 16:56:52 2018 +0100 +++ b/Resources/CMake/Compiler.cmake Wed Jan 03 20:25:35 2018 +0100 @@ -195,6 +195,16 @@ endif() +if (CMAKE_COMPILER_IS_GNUCXX) + # "When creating a static library using binutils (ar) and there + # exist a duplicate object name (e.g. a/Foo.cpp.o, b/Foo.cpp.o), the + # resulting static library can end up having only one of the + # duplicate objects. [...] This bug only happens if there are many + # objects." https://cmake.org/Bug/view.php?id=14874 + set(CMAKE_CXX_ARCHIVE_APPEND " q ") +endif() + + if (STATIC_BUILD) add_definitions(-DORTHANC_STATIC=1) else()