diff options
author | Sergei Trofimovich <slyfox@gentoo.org> | 2018-03-17 17:12:04 +0000 |
---|---|---|
committer | Sergei Trofimovich <slyfox@gentoo.org> | 2018-03-17 17:12:04 +0000 |
commit | 0693b0b0500236a3dec933350a13f1b0e8c1cb54 (patch) | |
tree | 5d127a74813b3b7d88842a3c1f584275f9a01183 /compiler/utils | |
parent | 1522cf05c9c3e9afd3ef9c7f3f419460c41488d9 (diff) | |
download | haskell-0693b0b0500236a3dec933350a13f1b0e8c1cb54.tar.gz |
aclocal.m4: add OSHurd (debian patch)
ghc treats OSUnknown (and GNU/Hurd) as non-ELF target.
This causes panic in native codegenerator when trying
to build PIC code:
```
...
-- all other platforms
howToAccessLabel dflags _ _ _ _ _
| not (positionIndependent dflags)
= AccessDirectly
| otherwise
= panic "howToAccessLabel: PIC not defined for this platform"
```
This change declares new 'OSHurd' and marks it as an
ELF target. Fixes building ghc-stage2 on i686-unknown-gnu0.9.
Patch provided by "Pino" via Samuel Thibault and taken from
debian.
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Diffstat (limited to 'compiler/utils')
-rw-r--r-- | compiler/utils/Platform.hs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/utils/Platform.hs b/compiler/utils/Platform.hs index c313870f2f..449a62a5b6 100644 --- a/compiler/utils/Platform.hs +++ b/compiler/utils/Platform.hs @@ -87,6 +87,7 @@ data OS | OSHaiku | OSQNXNTO | OSAIX + | OSHurd deriving (Read, Show, Eq) -- | ARM Instruction Set Architecture, Extensions and ABI @@ -136,6 +137,7 @@ osElfTarget OSKFreeBSD = True osElfTarget OSHaiku = True osElfTarget OSQNXNTO = False osElfTarget OSAIX = False +osElfTarget OSHurd = True osElfTarget OSUnknown = False -- Defaulting to False is safe; it means don't rely on any -- ELF-specific functionality. It is important to have a default for |