BUG: fix shared links for cc on hp
This commit is contained in:
parent
991b551595
commit
73c7caa774
|
@ -427,14 +427,27 @@ void cmUnixMakefileGenerator::OutputLinkLibraries(std::ostream& fout,
|
|||
std::string runtimeSep;
|
||||
std::vector<std::string> runtimeDirs;
|
||||
|
||||
bool cxx = tgt.HasCxx();
|
||||
if(!cxx)
|
||||
bool cxx = tgt.HasCxx();
|
||||
// this may look strange, but the only reason for CXX and C SHLIB flags
|
||||
// is for the hp where ld is used for linking shared libraries
|
||||
// but we still need to use the compiler version of the flags for the hp
|
||||
// So for EXECUTABLE targets we want to use the CXX Flags for run time path stuff
|
||||
if(!cxx )
|
||||
{
|
||||
if(m_Makefile->GetDefinition("CMAKE_SHLIB_RUNTIME_FLAG"))
|
||||
if( tgt.GetType() == cmTarget::EXECUTABLE)
|
||||
{
|
||||
runtimeFlag = m_Makefile->GetDefinition("CMAKE_SHLIB_RUNTIME_FLAG");
|
||||
if(m_Makefile->GetDefinition("CMAKE_C_SHLIB_RUNTIME_FLAG"))
|
||||
{
|
||||
runtimeFlag = m_Makefile->GetDefinition("CMAKE_C_SHLIB_RUNTIME_FLAG");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(m_Makefile->GetDefinition("CMAKE_SHLIB_RUNTIME_FLAG"))
|
||||
{
|
||||
runtimeFlag = m_Makefile->GetDefinition("CMAKE_SHLIB_RUNTIME_FLAG");
|
||||
}
|
||||
}
|
||||
|
||||
if(m_Makefile->GetDefinition("CMAKE_SHLIB_RUNTIME_SEP"))
|
||||
{
|
||||
runtimeSep = m_Makefile->GetDefinition("CMAKE_SHLIB_RUNTIME_SEP");
|
||||
|
@ -759,7 +772,7 @@ void cmUnixMakefileGenerator::OutputExecutableRule(std::ostream& fout,
|
|||
else
|
||||
{
|
||||
command =
|
||||
"$(CMAKE_C_COMPILER) $(CMAKE_SHLIB_LINK_FLAGS) $(CMAKE_C_FLAGS) ";
|
||||
"$(CMAKE_C_COMPILER) $(CMAKE_C_SHLIB_LINK_FLAGS) $(CMAKE_C_FLAGS) ";
|
||||
}
|
||||
command += "$(" + this->CreateMakeVariable(name, "_SRC_OBJS") + ") ";
|
||||
std::strstream linklibs;
|
||||
|
@ -1600,8 +1613,12 @@ void cmUnixMakefileGenerator::OutputMakeVariables(std::ostream& fout)
|
|||
"\n"
|
||||
"CMAKE_SHLIB_BUILD_FLAGS = @CMAKE_SHLIB_BUILD_FLAGS@\n"
|
||||
"CMAKE_SHLIB_LINK_FLAGS = @CMAKE_SHLIB_LINK_FLAGS@\n"
|
||||
"CMAKE_C_SHLIB_LINK_FLAGS = @CMAKE_C_SHLIB_LINK_FLAGS@\n"
|
||||
"CMAKE_MODULE_BUILD_FLAGS = @CMAKE_MODULE_BUILD_FLAGS@\n"
|
||||
"CMAKE_MODULE_LINK_FLAGS = @CMAKE_MODULE_LINK_FLAGS@\n"
|
||||
"CMAKE_C_SHLIB_RUNTIME_FLAG = @CMAKE_C_SHLIB_RUNTIME_FLAG@\n"
|
||||
"CMAKE_SHLIB_RUNTIME_FLAG = @CMAKE_SHLIB_RUNTIME_FLAG@\n"
|
||||
"CMAKE_SHLIB_RUNTIME_SEP = @CMAKE_SHLIB_RUNTIME_SEP@\n"
|
||||
"DL_LIBS = @CMAKE_DL_LIBS@\n"
|
||||
"SHLIB_LD_LIBS = @CMAKE_SHLIB_LD_LIBS@\n"
|
||||
"SHLIB_SUFFIX = @CMAKE_SHLIB_SUFFIX@\n"
|
||||
|
|
|
@ -110,9 +110,20 @@ SET (CMAKE_SIZEOF_DOUBLE @CMAKE_SIZEOF_DOUBLE@ CACHE INTERNAL "Size of doubl
|
|||
|
||||
FIND_PROGRAM(CMAKE_MAKE_PROGRAM NAMES gmake make )
|
||||
|
||||
|
||||
IF(CMAKE_SYSTEM MATCHES "HP-UX.*")E
|
||||
SET (CMAKE_C_SHLIB_LINK_FLAGS "-Wl,+s" CACHE INTERNAL "shared link flags for cc")
|
||||
SET (CMAKE_C_SHLIB_RUNTIME_FLAG "-Wl,+b," CACHE INTERNAL "runtime directory flag for cc")
|
||||
ELSE(CMAKE_SYSTEM MATCHES "HP-UX.*")
|
||||
SET (CMAKE_C_SHLIB_LINK_FLAGS ${CMAKE_SHLIB_LINK_FLAGS} CACHE INTERNAL "shared link flags for cc")
|
||||
SET (CMAKE_C_SHLIB_RUNTIME_FLAG ${CMAKE_SHLIB_RUNTIME_FLAG} CACHE INTERNAL "runtime directory flag for cc")
|
||||
ENDIF(CMAKE_SYSTEM MATCHES "HP-UX.*")
|
||||
|
||||
# The following variables are advanced
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
CMAKE_C_SHLIB_LINK_FLAGS
|
||||
CMAKE_C_SHLIB_RUNTIME_FLAG
|
||||
CMAKE_X_LIBS
|
||||
CMAKE_USE_WIN32_THREADS
|
||||
CMAKE_USE_SPROC
|
||||
|
|
|
@ -1,180 +0,0 @@
|
|||
#
|
||||
# CMakeLocal.make.in should be in the directory where you run configure
|
||||
# in, which need not be the source directory
|
||||
#
|
||||
SET (CMAKE_WORDS_BIGENDIAN @CMAKE_WORDS_BIGENDIAN@ CACHE BOOL
|
||||
"The system uses big endian byte ordering.")
|
||||
|
||||
SET (CMAKE_USE_SPROC @CMAKE_USE_SPROC@ CACHE BOOL
|
||||
"Use sproc libs.")
|
||||
|
||||
SET (CMAKE_USE_PTHREADS @CMAKE_USE_PTHREADS@ CACHE BOOL
|
||||
"Use the pthreads library.")
|
||||
|
||||
IF(WIN32)
|
||||
SET (CMAKE_USE_WIN32_THREADS @CMAKE_USE_WIN32_THREADS@ CACHE BOOL
|
||||
"Use the win32 thread library.")
|
||||
ENDIF(WIN32)
|
||||
|
||||
SET (CMAKE_HP_PTHREADS @CMAKE_HP_PTHREADS@ CACHE BOOL
|
||||
"Use HP pthreads.")
|
||||
|
||||
SET (CMAKE_LIB_EXT @CMAKE_LIB_EXT@ CACHE STRING
|
||||
"Library extension used by this machine.")
|
||||
|
||||
SET (CMAKE_RANLIB "@RANLIB@" CACHE FILEPATH
|
||||
"Library randomizer program used on archive libraries.")
|
||||
|
||||
SET (CMAKE_AR "@CMAKE_AR@" CACHE FILEPATH
|
||||
"Archive program used to make archive libraries.")
|
||||
|
||||
SET (CMAKE_AR_ARGS "@CMAKE_AR_ARGS@" CACHE STRING
|
||||
"Arguments for CMAKE_AR program to create an archive library.")
|
||||
|
||||
SET (CMAKE_CXX_COMPILER "@CXX@" CACHE FILEPATH
|
||||
"Name of C++ compiler used.")
|
||||
|
||||
SET (CMAKE_CXX_FLAGS "@CXXFLAGS@" CACHE STRING
|
||||
"Flags used by CXX compiler.")
|
||||
|
||||
SET (CMAKE_TEMPLATE_FLAGS "@CMAKE_TEMPLATE_FLAGS@" CACHE STRING
|
||||
"CXX template flags used by compiler.")
|
||||
|
||||
SET (CMAKE_C_COMPILER "@CC@" CACHE FILEPATH
|
||||
"Name of C compiler used.")
|
||||
|
||||
SET (CMAKE_C_FLAGS "@CFLAGS@" CACHE STRING
|
||||
"Flags for C compiler.")
|
||||
|
||||
SET (CMAKE_SHLIB_CFLAGS "@CMAKE_SHLIB_CFLAGS@" CACHE STRING
|
||||
"Flag used for building shared library objects.")
|
||||
|
||||
SET (CMAKE_SHLIB_BUILD_FLAGS "@CMAKE_SHLIB_BUILD_FLAGS@" CACHE STRING
|
||||
"Flag used by CXX to build a shared library.")
|
||||
|
||||
SET (CMAKE_MODULE_BUILD_FLAGS "@CMAKE_MODULE_BUILD_FLAGS@" CACHE STRING
|
||||
"Flag used by CXX to build a shared library.")
|
||||
|
||||
SET (CMAKE_INSTALL_PREFIX @prefix@ CACHE PATH
|
||||
"Install path prefix, prepended onto install directories.")
|
||||
|
||||
SET (CMAKE_SHLIB_SUFFIX @CMAKE_SHLIB_SUFFIX@ CACHE STRING
|
||||
"Shared library suffix.")
|
||||
|
||||
SET (CMAKE_MODULE_SUFFIX @CMAKE_MODULE_SUFFIX@ CACHE STRING
|
||||
"Module library suffix.")
|
||||
|
||||
SET (CMAKE_THREAD_LIBS "@CMAKE_THREAD_LIBS@" CACHE STRING
|
||||
"Thread library used.")
|
||||
|
||||
SET (CMAKE_DL_LIBS "@CMAKE_DL_LIBS@" CACHE STRING
|
||||
"Dynamic link library to link in.")
|
||||
|
||||
SET (CMAKE_SHLIB_LINK_FLAGS "@CMAKE_SHLIB_LINK_FLAGS@" CACHE STRING
|
||||
"Flags used to link a shared library.")
|
||||
|
||||
SET (CMAKE_MODULE_LINK_FLAGS "@CMAKE_MODULE_LINK_FLAGS@" CACHE STRING
|
||||
"Flags used to link a shared library.")
|
||||
|
||||
SET (CMAKE_SHLIB_LD_LIBS "@CMAKE_SHLIB_LD_LIBS@" CACHE STRING
|
||||
"Libraries used by LD for shared libraries.")
|
||||
|
||||
SET (CMAKE_SHLIB_RUNTIME_FLAG "@CMAKE_SHLIB_RUNTIME_FLAG@" CACHE STRING
|
||||
"Flag used to specify run-time search paths.")
|
||||
|
||||
SET (CMAKE_SHLIB_RUNTIME_SEP "@CMAKE_SHLIB_RUNTIME_SEP@" CACHE STRING
|
||||
"If null, each runtime path is a separate option. Otherwise, they are all joined, separated by this.")
|
||||
|
||||
SET (CMAKE_SKIP_RPATH "NO" CACHE BOOL
|
||||
"If set, runtime paths are not added when using shared libraries.")
|
||||
|
||||
# support for X11
|
||||
|
||||
SET (CMAKE_X_LIBS "@X_PRE_LIBS@ @X_LIBS@ -lX11 -lXext @X_EXTRA_LIBS@" CACHE STRING
|
||||
"Libraries and options used in X11 programs.")
|
||||
|
||||
SET (CMAKE_X_CFLAGS "@X_CFLAGS@" CACHE STRING
|
||||
"X11 extra flags.")
|
||||
|
||||
SET (CMAKE_HAS_X @CMAKE_HAS_X@ CACHE INTERNAL
|
||||
"Is X11 around.")
|
||||
|
||||
SET (CMAKE_NO_ANSI_STREAM_HEADERS @CMAKE_NO_ANSI_STREAM_HEADERS@ CACHE INTERNAL
|
||||
"Does the compiler support headers like iostream.")
|
||||
|
||||
SET (CMAKE_NO_STD_NAMESPACE @CMAKE_NO_STD_NAMESPACE@ CACHE INTERNAL
|
||||
"Does the compiler support std::.")
|
||||
|
||||
SET (CMAKE_NO_ANSI_FOR_SCOPE @CMAKE_NO_ANSI_FOR_SCOPE@ CACHE INTERNAL
|
||||
"Does the compiler support ansi for scoping.")
|
||||
|
||||
SET (CMAKE_COMPILER_IS_GNUCXX @CMAKE_COMPILER_IS_GNUCXX@ CACHE INTERNAL
|
||||
"Is the compile GNU C++.")
|
||||
|
||||
SET (CMAKE_SYSTEM @CMAKE_SYSTEM@ CACHE INTERNAL
|
||||
"What system is this. Result of uname.")
|
||||
|
||||
SET (CMAKE_BUILD_TOOL make CACHE INTERNAL
|
||||
"What is the target build tool cmake is generating for.")
|
||||
|
||||
SET (CMAKE_ANSI_CFLAGS "@CMAKE_ANSI_CFLAGS@" CACHE INTERNAL
|
||||
"What flags are required by the c++ compiler to make it ansi.")
|
||||
|
||||
SET (CMAKE_ANSI_CXXFLAGS "@CMAKE_ANSI_CXXFLAGS@" CACHE INTERNAL
|
||||
"What flags are required by the c++ compiler to make it ansi.")
|
||||
|
||||
SET (CMAKE_NO_EXPLICIT_TEMPLATE_INSTANTIATION @CMAKE_NO_EXPLICIT_TEMPLATE_INSTANTIATION@ CACHE INTERNAL
|
||||
"Does the compiler not support explicit template instantiation.")
|
||||
|
||||
SET (CMAKE_SIZEOF_INT @CMAKE_SIZEOF_INT@ CACHE INTERNAL "Size of int data type")
|
||||
SET (CMAKE_SIZEOF_LONG @CMAKE_SIZEOF_LONG@ CACHE INTERNAL "Size of long data type")
|
||||
SET (CMAKE_SIZEOF_VOID_P @CMAKE_SIZEOF_VOID_P@ CACHE INTERNAL "Size of void* data type")
|
||||
SET (CMAKE_SIZEOF_CHAR @CMAKE_SIZEOF_CHAR@ CACHE INTERNAL "Size of char data type")
|
||||
SET (CMAKE_SIZEOF_SHORT @CMAKE_SIZEOF_SHORT@ CACHE INTERNAL "Size of short data type")
|
||||
SET (CMAKE_SIZEOF_FLOAT @CMAKE_SIZEOF_FLOAT@ CACHE INTERNAL "Size of float data type")
|
||||
SET (CMAKE_SIZEOF_DOUBLE @CMAKE_SIZEOF_DOUBLE@ CACHE INTERNAL "Size of double data type")
|
||||
|
||||
FIND_PROGRAM(CMAKE_MAKE_PROGRAM NAMES gmake make )
|
||||
|
||||
# The following variables are advanced
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
CMAKE_X_LIBS
|
||||
CMAKE_USE_WIN32_THREADS
|
||||
CMAKE_USE_SPROC
|
||||
CMAKE_USE_PTHREADS
|
||||
CMAKE_OBJECT_FILE_SUFFIX
|
||||
CMAKE_EXECUTABLE_SUFFIX
|
||||
CMAKE_STATICLIB_SUFFIX
|
||||
CMAKE_SHLIB_SUFFIX
|
||||
CMAKE_MODULE_SUFFIX
|
||||
CMAKE_CXX_COMPILER
|
||||
CMAKE_C_COMPILER
|
||||
CMAKE_HP_PTHREADS
|
||||
CMAKE_WORDS_BIGENDIAN
|
||||
CMAKE_LIB_EXT
|
||||
CMAKE_RANLIB
|
||||
CMAKE_AR
|
||||
CMAKE_AR_ARGS
|
||||
CMAKE_TEMPLATE_FLAGS
|
||||
CMAKE_SHLIB_CFLAGS
|
||||
CMAKE_SHLIB_BUILD_FLAGS
|
||||
CMAKE_MODULE_BUILD_FLAGS
|
||||
CMAKE_THREAD_LIBS
|
||||
CMAKE_DL_LIBS
|
||||
CMAKE_SHLIB_LINK_FLAGS
|
||||
CMAKE_MODULE_LINK_FLAGS
|
||||
CMAKE_SHLIB_LD_LIBS
|
||||
CMAKE_SHLIB_RUNTIME_FLAG
|
||||
CMAKE_SHLIB_RUNTIME_SEP
|
||||
CMAKE_SKIP_RPATH
|
||||
CMAKE_X_CFLAGS
|
||||
CMAKE_NO_ANSI_STREAM_HEADERS
|
||||
CMAKE_NO_ANSI_FOR_SCOPE
|
||||
CMAKE_NO_STD_NAMESPACE
|
||||
CMAKE_COMPILER_IS_GNUCXX
|
||||
CMAKE_ANSI_CFLAGS
|
||||
CMAKE_ANSI_CXXFLAGS
|
||||
CMAKE_NO_EXPLICIT_TEMPLATE_INSTANTIATION
|
||||
CMAKE_MAKE_PROGRAM
|
||||
)
|
Loading…
Reference in New Issue