Opened 7 months ago

Closed 4 months ago

#13702 closed bug (fixed)

GHC can't produce position independent executables

Reported by: bgamari Owned by: bgamari
Priority: high Milestone: 8.4.1
Component: Compiler Version: 8.0.2
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s): Phab:D3589
Wiki Page:

Description

Due to #12759 we unconditionally pass -no-pie to GCC. However, there are legitimate reasons to want a PIE. We should have a -fPIE flag to match -fPIC, requesting that the compiler produce a position-independent executable.

Change History (5)

comment:1 Changed 7 months ago by bgamari

Differential Rev(s): Phab:D3589
Status: newpatch

comment:2 Changed 6 months ago by bgamari

Owner: set to bgamari

comment:3 Changed 5 months ago by bgamari

Milestone: 8.2.18.4.1

Bumping off to 8.4.

comment:4 Changed 4 months ago by Ben Gamari <ben@…>

In 3625728/ghc:

Add support for producing position-independent executables

Previously due to #12759 we disabled PIE support entirely. However, this
breaks the user's ability to produce PIEs. Add an explicit flag, -fPIE,
allowing the user to build PIEs.

Test Plan: Validate

Reviewers: rwbarton, austin, simonmar

Subscribers: trommler, simonmar, trofi, jrtc27, thomie

GHC Trac Issues: #12759, #13702

Differential Revision: https://phabricator.haskell.org/D3589

comment:5 Changed 4 months ago by bgamari

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