ENH: add -Wl,-relax to the default linker flags for BlueGene, otherwise you can get "relocation truncated to fit" errors

Alex
This commit is contained in:
Alexander Neundorf 2007-08-16 15:02:14 -04:00
parent a7213b3e63
commit 6b0e5745ab
2 changed files with 3 additions and 7 deletions

View File

@ -108,6 +108,7 @@ MACRO(PYTHON_ADD_MODULE _NAME )
ENDIF(PYTHON_MODULE_${_NAME}_BUILD_SHARED)
SET(PY_MODULES_LIST ${PY_MODULES_LIST} ${_NAME} CACHE STRING "Collect a list of all added python modules" FORCE)
message(STATUS "modules: ${PY_MODULES_LIST}")
ADD_LIBRARY(${_NAME} ${PY_MODULE_TYPE} ${ARGN})
# TARGET_LINK_LIBRARIES(${_NAME} ${PYTHON_LIBRARIES})
ENDIF(PYTHON_ENABLE_MODULE_${_NAME})

View File

@ -23,15 +23,10 @@ INCLUDE(Platform/UnixPaths)
IF(CMAKE_COMPILER_IS_GNUCC)
SET(CMAKE_C_LINK_EXECUTABLE
"<CMAKE_C_COMPILER> <FLAGS> <CMAKE_C_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES> -Wl,-lgcc,-lc -lnss_files -lnss_dns -lresolv")
"<CMAKE_C_COMPILER> -Wl,-relax <FLAGS> <CMAKE_C_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES> -Wl,-lgcc,-lc -lnss_files -lnss_dns -lresolv")
ENDIF(CMAKE_COMPILER_IS_GNUCC)
IF(CMAKE_COMPILER_IS_GNUCXX)
SET(CMAKE_CXX_LINK_EXECUTABLE
"<CMAKE_CXX_COMPILER> <FLAGS> <CMAKE_CXX_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES> -Wl,-lstdc++,-lgcc,-lc -lnss_files -lnss_dns -lresolv")
"<CMAKE_CXX_COMPILER> -Wl,-relax <FLAGS> <CMAKE_CXX_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES> -Wl,-lstdc++,-lgcc,-lc -lnss_files -lnss_dns -lresolv")
ENDIF(CMAKE_COMPILER_IS_GNUCXX)
SET(CMAKE_CXX_LINK_SHARED_LIBRARY)
SET(CMAKE_CXX_LINK_MODULE_LIBRARY)
SET(CMAKE_C_LINK_SHARED_LIBRARY)
SET(CMAKE_C_LINK_MODULE_LIBRARY)