summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefileExecutableTargetGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2009-10-08 15:56:30 (GMT)
committerBrad King <brad.king@kitware.com>2009-10-08 15:56:30 (GMT)
commit65b6a8f54a90b2eff3dbacc01fbd25675308b77a (patch)
treecf0dc5a1ddd20c68b367eee4c99d1531052cd56a /Source/cmMakefileExecutableTargetGenerator.cxx
parent0653286dc670a77c39851ca8dbbceb85fe1db116 (diff)
downloadCMake-65b6a8f54a90b2eff3dbacc01fbd25675308b77a.zip
CMake-65b6a8f54a90b2eff3dbacc01fbd25675308b77a.tar.gz
CMake-65b6a8f54a90b2eff3dbacc01fbd25675308b77a.tar.bz2
Do not use -fPIC to link executables
The commit "add support for borland run time flag for shared builds" started using the value of CMAKE_SHARED_LIBRARY_CXX_FLAGS to link executables because Borland requires some flags both at compile and link time. This change ended up propagating all the way to the current Makefile generators and the behavior applies on all platforms. In general it is incorrect to use these flags to link executables. The commit "Split Borland compiler information files" re-wrote Borland support to work without this behavior, so we remove it in this commit. Patch from Ben Hutchings. See issue #9659.
Diffstat (limited to 'Source/cmMakefileExecutableTargetGenerator.cxx')
-rw-r--r--Source/cmMakefileExecutableTargetGenerator.cxx5
1 files changed, 0 insertions, 5 deletions
diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx b/Source/cmMakefileExecutableTargetGenerator.cxx
index 16e2266..a20c917 100644
--- a/Source/cmMakefileExecutableTargetGenerator.cxx
+++ b/Source/cmMakefileExecutableTargetGenerator.cxx
@@ -199,11 +199,6 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink)
std::string flags;
std::string linkFlags;
- // Add flags to deal with shared libraries. Any library being
- // linked in might be shared, so always use shared flags for an
- // executable.
- this->LocalGenerator->AddSharedFlags(linkFlags, linkLanguage, true);
-
// Add flags to create an executable.
this->LocalGenerator->
AddConfigVariableFlags(linkFlags, "CMAKE_EXE_LINKER_FLAGS",