diff options
| author | Andrew Stitcher <astitcher@apache.org> | 2013-08-22 19:31:18 +0000 |
|---|---|---|
| committer | Andrew Stitcher <astitcher@apache.org> | 2013-08-22 19:31:18 +0000 |
| commit | 8554cddcc01e5e05461b8637a685c5ff6236e680 (patch) | |
| tree | 14e7848f69d0e3602ed77f06d6026fb55ba85aa8 /qpid | |
| parent | efe73050c7faa4f7b19c55bec7dc753d38668d15 (diff) | |
| download | qpid-python-8554cddcc01e5e05461b8637a685c5ff6236e680.tar.gz | |
QPID-5079: Added link map file to cut the number of symbols exported even further
- It seems that the library import/export mechanism isn't sufficient under the
gnu tool chain to really limit the exported symbols
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1516550 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid')
| -rw-r--r-- | qpid/cpp/src/CMakeLists.txt | 15 | ||||
| -rw-r--r-- | qpid/cpp/src/qpid.linkmap | 10 |
2 files changed, 20 insertions, 5 deletions
diff --git a/qpid/cpp/src/CMakeLists.txt b/qpid/cpp/src/CMakeLists.txt index 331e3d13b1..6af73a436b 100644 --- a/qpid/cpp/src/CMakeLists.txt +++ b/qpid/cpp/src/CMakeLists.txt @@ -290,6 +290,11 @@ if (CMAKE_COMPILER_IS_GNUCXX) endif (GCC_VERSION VERSION_EQUAL 4.1.2) endif (CMAKE_COMPILER_IS_GNUCXX) +if (CMAKE_SYSTEM_NAME STREQUAL Linux) + set (QPID_LINKMAP ${CMAKE_CURRENT_SOURCE_DIR}/qpid.linkmap) + set (LINK_VERSION_SCRIPT_FLAG "-Wl,--version-script=${QPID_LINKMAP}") +endif (CMAKE_SYSTEM_NAME STREQUAL Linux) + if (CMAKE_CXX_COMPILER_ID STREQUAL SunPro) set (COMPILER_FLAGS "-library=stlport4 -mt") set (WARNING_FLAGS "+w") @@ -300,9 +305,9 @@ endif (CMAKE_CXX_COMPILER_ID STREQUAL SunPro) if (CMAKE_SYSTEM_NAME STREQUAL Windows) # Allow MSVC user to select 'WinXP-SP3/Windows Server 2003' as build target version set (win32_winnt_default OFF) - if (MSVC) - set (win32_winnt_default ON) - endif (MSVC) + if (MSVC) + set (win32_winnt_default ON) + endif (MSVC) option(SET_WIN32_WINNT "In Windows-MSVC build: define _WIN32_WINNT=0x0502 to select target version: Windows XP with SP3" ${win32_winnt_default}) endif (CMAKE_SYSTEM_NAME STREQUAL Windows) @@ -1104,7 +1109,7 @@ add_msvc_version (qpidtypes library dll) add_library(qpidtypes SHARED ${qpidtypes_SOURCES}) target_link_libraries(qpidtypes ${qpidtypes_platform_LIBS}) set_target_properties (qpidtypes PROPERTIES - LINK_FLAGS "${HIDE_SYMBOL_FLAGS}" + LINK_FLAGS "${HIDE_SYMBOL_FLAGS} ${LINK_VERSION_SCRIPT_FLAG}" VERSION ${qpidtypes_version} SOVERSION ${qpidtypes_version_major}) @@ -1229,7 +1234,7 @@ add_msvc_version (qpidmessaging library dll) add_library (qpidmessaging SHARED ${qpidmessaging_SOURCES}) target_link_libraries (qpidmessaging qpidclient) set_target_properties (qpidmessaging PROPERTIES - LINK_FLAGS "${HIDE_SYMBOL_FLAGS}" + LINK_FLAGS "${HIDE_SYMBOL_FLAGS} ${LINK_VERSION_SCRIPT_FLAG}" VERSION ${qpidmessaging_version} SOVERSION ${qpidmessaging_version_major}) install (TARGETS qpidmessaging diff --git a/qpid/cpp/src/qpid.linkmap b/qpid/cpp/src/qpid.linkmap new file mode 100644 index 0000000000..4556985b1b --- /dev/null +++ b/qpid/cpp/src/qpid.linkmap @@ -0,0 +1,10 @@ +{ + global: + extern "C++" { + typeinfo*qpid::*; + vtable*qpid::*; + qpid::*; + qpid::*operator*qpid::*; + }; + local: *; +}; |
