Skip to content
  • Ben Gamari's avatar
    Pass -no-pie to GCC · d421a7e2
    Ben Gamari authored and Ben Gamari's avatar Ben Gamari committed
    Certain distributions (e.g. Debian and Ubuntu) have enabled PIE be
    default in their GCC packaging. This breaks our abuse of GCC as a linker
    which requires that we pass -Wl,-r, which is incompatible with
    PIE (since the former implies that we are generating a relocatable
    object file and the latter an executable).
    
    This is a second attempt at D2691. This attempt constrasts with D2691 in that
    it preserves the "does gcc support -no-pie" flag in settings, allowing this to
    be reconfigured by `configure` during installation of a binary distribution.
    Thanks for @rwbarton for drawing attention to this issue.
    
    Test Plan: Validate
    
    Reviewers: austin, hvr, erikd
    
    Reviewed By: erikd
    
    Subscribers: thomie, rwbarton, erikd
    
    Differential Revision: https://phabricator.haskell.org/D2693
    
    GHC Trac Issues: #12759
    d421a7e2