#1264 closed enhancement (fixed)

switch default use of -fPIC

Reported by: dmisev Owned by: dmisev
Priority: minor Milestone: 9.2
Component: build system Version: development
Keywords: Cc: mdumitru, pbaumann, atoader
Complexity: Medium


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 Changed 19 months ago by pbaumann

  • Priority changed from major to minor
  • Type changed from defect to enhancement

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 Changed 18 months ago by dmisev

So we decided to

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

comment:3 Changed 17 months ago by pbaumann

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

comment:4 Changed 17 months ago by dmisev

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.