Opened 8 years ago

Closed 8 years ago

#1264 closed enhancement (fixed)

switch default use of -fPIC

Reported by: Dimitar Misev Owned by: Dimitar Misev
Priority: minor Milestone: 9.2
Component: build system Version: development
Keywords: Cc: Alex Dumitru, Peter Baumann, Alex Toader
Complexity: Medium

Description

To generate PIC (position independent code) currently —with-pic must be specified to the configure script, which adds -fPIC to the compiler options.

It might make sense for -fPIC to be used by default, and turned off on demand with —disable-pic for example.

It would be good to investigate what are the implications of this, perhaps it's a suitable task for a student to do a small report on. A couple of things I can think of:

  • compiler support for -fPIC (does clang support it?)
  • performance effects with and without -fPIC, a couple of tests should suffice
  • compilation time, executable/library size differences

Change History (4)

comment:1 by Peter Baumann, 8 years ago

Priority: majorminor
Type: defectenhancement

on principle, interesting, but a major interface change (and we too often observe unanticipated impacts from external components), but it works for now. Let us prioritize according to the many other tasks we have on stock.

comment:2 by Dimitar Misev, 8 years ago

So we decided to

  • use fPIC by default,
  • remove —with-pic
  • introduce —disable-pic (disable generation of position independent code)

comment:3 by Peter Baumann, 8 years ago

hasn't this been done already, can we close?

comment:4 by Dimitar Misev, 8 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.