[cmake-developers] [CMake 0014010]: Shared library object files not being compiled as position independent code

Mantis Bug Tracker mantis at public.kitware.com
Wed Mar 13 12:56:21 EDT 2013


The following issue has been SUBMITTED. 
====================================================================== 
http://www.cmake.org/Bug/view.php?id=14010 
====================================================================== 
Reported By:                Kevin Burge
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   14010
Category:                   CMake
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2013-03-13 12:56 EDT
Last Modified:              2013-03-13 12:56 EDT
====================================================================== 
Summary:                    Shared library object files not being compiled as
position independent code
Description: 
It looks like the AIX XL module is missing:

set(CMAKE_C_COMPILE_OPTIONS_PIC "-qpic")
set(CMAKE_CXX_COMPILE_OPTIONS_PIC "-qpic")

Which is required for compiling position independent code.

I'm not sure if CMAKE_C_COMPILE_OPTIONS_PIE needs to be set as well.

I believe this to be the real issue behind the bug I reported as
http://www.cmake.org/Bug/view.php?id=13997.

Example from the documentation:

To compile a shared library libmylib.so, use the following commands:
xlc mylib.c -qpic=small -c -o mylib.o
xlc -qmkshrobj mylib -o libmylib.so.1

====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2013-03-13 12:56 Kevin Burge    New Issue                                    
======================================================================




More information about the cmake-developers mailing list