diff options
author | Moritz Angermann <moritz.angermann@gmail.com> | 2020-10-27 10:52:25 +0800 |
---|---|---|
committer | Moritz Angermann <moritz.angermann@gmail.com> | 2020-10-27 10:52:25 +0800 |
commit | 0f7df369abfd5b17fcde67a4aea11d425baafb65 (patch) | |
tree | b58857532e4629c12220df19f3da5a918793ce08 | |
parent | a71ece1b3fc03eb8bea6cf3e391886abb8e00f15 (diff) | |
download | haskell-0f7df369abfd5b17fcde67a4aea11d425baafb65.tar.gz |
[AArch64] Aarch64 Always PIC
-rw-r--r-- | compiler/GHC/Driver/Session.hs | 7 | ||||
-rw-r--r-- | includes/rts/Flags.h | 2 |
2 files changed, 5 insertions, 4 deletions
diff --git a/compiler/GHC/Driver/Session.hs b/compiler/GHC/Driver/Session.hs index 97b1afe9ba..0801ed52c2 100644 --- a/compiler/GHC/Driver/Session.hs +++ b/compiler/GHC/Driver/Session.hs @@ -3817,8 +3817,10 @@ validHoleFitsImpliedGFlags 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 + (OSDarwin, ArchX86_64) -> [Opt_PIC] + (OSDarwin, ArchAarch64) -> [Opt_PIC] + (OSLinux, ArchAarch64) -> [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 -- always generate PIC. See @@ -5111,4 +5113,3 @@ initSDocContext dflags style = SDC -- | Initialize the pretty-printing options using the default user style initDefaultSDocContext :: DynFlags -> SDocContext initDefaultSDocContext dflags = initSDocContext dflags defaultUserStyle - diff --git a/includes/rts/Flags.h b/includes/rts/Flags.h index 1787124fe1..9455892cdb 100644 --- a/includes/rts/Flags.h +++ b/includes/rts/Flags.h @@ -202,7 +202,7 @@ typedef struct _CONCURRENT_FLAGS { * Note that there is no 32bit darwin system we can realistically expect to * run on or compile for. */ -#if defined(darwin_HOST_OS) +#if defined(darwin_HOST_OS) || defined(aarch64_HOST_ARCH) #define DEFAULT_LINKER_ALWAYS_PIC true #else #define DEFAULT_LINKER_ALWAYS_PIC false |