termux-packages/packages/ghc-libs/always-use-pic-on-android-for-dynexec.patch
Aditya Alok 80f7a2a0df refactor(ghc-libs): rename ghc to ghc-libs
- seperate ghc libraries from ghc bins
- enable dynamic libs for ghc
  * ghc-libs is further seperated into static and dynamic packages
  * enabling dynamic support will reduce package size as well as there
    performance  on device.

closes #5973

Signed-off-by: Aditya Alok <dev.aditya.alok@gmail.com>
2022-03-09 10:01:57 +09:00

18 lines
989 B
Diff

diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs
index d222b3b..95a9942 100644
--- a/compiler/main/DynFlags.hs
+++ b/compiler/main/DynFlags.hs
@@ -4662,6 +4662,12 @@ default_PIC platform =
(OSDarwin, ArchAArch64) -> [Opt_PIC]
(OSLinux, ArchAArch64) -> [Opt_PIC, Opt_ExternalDynamicRefs]
(OSLinux, ArchARM {}) -> [Opt_PIC, Opt_ExternalDynamicRefs]
+ (OSLinux, ArchX86) -> [Opt_PIC, Opt_ExternalDynamicRefs]
+ (OSLinux, ArchX86_64) -> [Opt_PIC, Opt_ExternalDynamicRefs]
+ (OSUnknown, ArchARM {}) -> [Opt_PIC, Opt_ExternalDynamicRefs]
+ (OSUnknown, ArchAArch64) -> [Opt_PIC, Opt_ExternalDynamicRefs]
+ (OSUnknown, ArchX86) -> [Opt_PIC, Opt_ExternalDynamicRefs]
+ (OSUnknown, ArchX86_64) -> [Opt_PIC, Opt_ExternalDynamicRefs]
(OSOpenBSD, ArchX86_64) -> [Opt_PIC] -- Due to PIE support in
-- OpenBSD since 5.3 release
-- (1 May 2013) we need to