Static plugins are compiled with -fPIC in non-Win32 systems

Bug #648071 reported by RedDwarf
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Stellarium
Fix Released
Low
Unassigned

Bug Description

Plugin code is full of

IF(WIN32)
 SET_TARGET_PROPERTIES(CompassMarks-static PROPERTIES COMPILE_FLAGS "-DQT_STATICPLUGIN")
ELSE()
 SET_TARGET_PROPERTIES(CompassMarks-static PROPERTIES COMPILE_FLAGS "-fPIC -DQT_STATICPLUGIN")
ENDIF()

But since those *static* plugins end linked in the final single binary, its positions is known and -fPIC only adds an unneeded overhead.

Patch attached.

Revision history for this message
RedDwarf (cmorve69) wrote :
Revision history for this message
treaves (treaves) wrote :

The patch works fine. I didn't commit it, as there is additional code in the make CMakeLissts.txt file that deal with static vs. dynamic plugins, and that really should be cleaned up too.

Changed in stellarium:
status: New → Confirmed
importance: Undecided → Low
Revision history for this message
Fabien Chéreau (xalioth) wrote :

Thanks,
I suppressed all the -fPIC as you suggested in rev 4807
Fab

Changed in stellarium:
status: Confirmed → Fix Committed
milestone: none → 0.10.6
Changed in stellarium:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.