- enable for global PIE support: - the compiler is built without PIE support due to the bootstrap libraries being non-PIE using BuildIgnore: gcc-PIE - the compiler itself builds -fPIC objects all the time, which should make all ghc compiled binaries be PIE. - ghc-pie.patch: enable default -fPIC on Linux/x86_64 OBS-URL: https://build.opensuse.org/request/show/493191 OBS-URL: https://build.opensuse.org/package/show/devel:languages:haskell/ghc?expand=0&rev=243
13 lines
627 B
Diff
13 lines
627 B
Diff
Index: ghc-8.0.2/compiler/main/DynFlags.hs
|
|
===================================================================
|
|
--- ghc-8.0.2.orig/compiler/main/DynFlags.hs
|
|
+++ ghc-8.0.2/compiler/main/DynFlags.hs
|
|
@@ -3650,6 +3650,7 @@ default_PIC :: Platform -> [GeneralFlag]
|
|
default_PIC platform =
|
|
case (platformOS platform, platformArch platform) of
|
|
(OSDarwin, ArchX86_64) -> [Opt_PIC]
|
|
+ (OSLinux, 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
|