
#12759: Latest Debian GCC breaks GHC
-----------------------------+----------------------------------------
Reporter: erikd | Owner:
Type: bug | Status: new
Priority: normal | Milestone: 8.0.2
Component: Compiler | Version: 8.0.1
Resolution: | Keywords:
Operating System: Linux | Architecture: Unknown/Multiple
Type of failure: Other | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-----------------------------+----------------------------------------
Comment (by erikd):
The Debian package for GHC 8.0 now carries two patches:
{{{
--- a/compiler/main/DynFlags.hs
+++ b/compiler/main/DynFlags.hs
@@ -3631,14 +3631,8 @@
default_PIC :: Platform -> [GeneralFlag]
default_PIC platform =
case (platformOS platform, platformArch platform) of
- (OSDarwin, ArchX86_64) -> [Opt_PIC]
- (OSOpenBSD, ArchX86_64) -> [Opt_PIC] -- Due to PIE support in
- -- OpenBSD since 5.3 release
- -- (1 May 2013) we need to
- -- always generate PIC. See
- -- #10597 for more
- -- information.
- _ -> []
+ (OSLinux, ArchPPC) -> []
+ _ -> [Opt_PIC]
-- General flags that are switched on/off when other general flags are
switched
-- on
}}}
and
{{{
Description: Pass -no-pie along with -Wl,-r
GHC uncoditionally passes `-Wl,-r' to gcc in
`compiler/main/DriverPipeline.hs'.
This fails in cases where PIE is enabled by default with the following
error:
.
/usr/bin/ld: -r and -pie may not be used together
.
Fix the above error by passing `-no-pie' along with `-Wl,-r' to the
compiler.
Author: Ilias Tsitsimpis