Commit Graph

4 Commits

Author SHA1 Message Date
Stephen Kelly 31d7a0f2e3 Add platform variables for position independent code flags
Store in new platform variables

  CMAKE_${lang}_COMPILE_OPTIONS_PIC
  CMAKE_${lang}_COMPILE_OPTIONS_PIE

flags for position independent code generation.

In almost all cases, this means duplication of the
CMAKE_SHARED_LIBRARY_${lang}_FLAGS for the _PIC case and using the
assumed pie equivalent for the _PIE case.  Note that the GNU compiler
has supported -fPIE since 3.4 and that there is no -fPIC on GNU for
Windows or Cygwin.

There is a possibility that the _PIE variables are not correct.
However, as there is no backwards compatibility to be concerned about
(as the POSITION_INDEPENDENT_CODE property is not used anywhere yet),
the current state suffices.
2012-06-12 15:37:53 -04:00
Brad King 5720e1f634 HP: Drive shared library linking with compiler front end
Previously we linked C, Fortran, and ASM shared libraries compiled with
the HP compiler using a direct invocation of the linker (ld).  This
behavior was left historically from support for an ancient HP C compiler
that did not know how to create shared libraries.  Fortran shared
libraries need to be linked with the compiler to get the language
runtime library dependencies as is already done for C++.

Update the HP-UX-HP* platform information to use the compiler front end
when linking shared libraries.  This works on modern HP tools and
produces correct behavior.  If there is a need to support older tools
again we can add a special case for them.
2011-12-14 09:32:27 -05:00
Brad King d0f71e2545 Add ASM platform information for HP compiler on HP
Among other flags this sets RPATH flags correctly so that CMake knows
how to treat CMAKE_PLATFORM_REQUIRED_RUNTIME_PATH for the ASM language.
2011-03-02 17:49:17 -05:00
Brad King 5f0a25955f Factor HP compiler flags into per-platform/per-compiler files
Move HP flags out of Platform/HP-UX.cmake into platform-specific
compiler information files "Platform/HP-UX-HP-<lang>.cmake".  Factor
common values into "Platform/HP-UX-HP.cmake" and load it from the
per-language files.
2011-03-02 17:24:36 -05:00