[commit: ghc] wip/ghc710-aix: Make GHC aware of OSAIX and AixLD (da67465)
git at git.haskell.org
git at git.haskell.org
Tue Nov 17 22:29:01 UTC 2015
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/ghc710-aix
Link : http://ghc.haskell.org/trac/ghc/changeset/da67465b3102c75693714aaf89da2516588babd0/ghc
>---------------------------------------------------------------
commit da67465b3102c75693714aaf89da2516588babd0
Author: Herbert Valerio Riedel <hvr at gnu.org>
Date: Mon Nov 16 09:40:09 2015 +0100
Make GHC aware of OSAIX and AixLD
>---------------------------------------------------------------
da67465b3102c75693714aaf89da2516588babd0
aclocal.m4 | 10 ++++++++--
compiler/main/DynFlags.hs | 1 +
compiler/main/SysTools.hs | 4 ++++
compiler/utils/Platform.hs | 2 ++
4 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/aclocal.m4 b/aclocal.m4
index 874e190..4242539 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -271,9 +271,12 @@ AC_DEFUN([FPTOOLS_SET_HASKELL_PLATFORM_VARS],
nto-qnx)
test -z "[$]2" || eval "[$]2=OSQNXNTO"
;;
- dragonfly|osf1|hpux|linuxaout|freebsd2|cygwin32|gnu|nextstep2|nextstep3|sunos4|ultrix|irix|aix)
+ dragonfly|osf1|hpux|linuxaout|freebsd2|cygwin32|gnu|nextstep2|nextstep3|sunos4|ultrix|irix)
test -z "[$]2" || eval "[$]2=OSUnknown"
;;
+ aix)
+ test -z "[$]2" || eval "[$]2=OSAIX"
+ ;;
linux-android)
test -z "[$]2" || eval "[$]2=OSAndroid"
;;
@@ -2030,9 +2033,12 @@ case "$1-$2" in
$3="linux"
;;
# As far as I'm aware, none of these have relevant variants
- freebsd|netbsd|openbsd|dragonfly|osf1|osf3|hpux|linuxaout|kfreebsdgnu|freebsd2|solaris2|cygwin32|mingw32|darwin|gnu|nextstep2|nextstep3|sunos4|ultrix|irix|aix|haiku)
+ freebsd|netbsd|openbsd|dragonfly|osf1|osf3|hpux|linuxaout|kfreebsdgnu|freebsd2|solaris2|cygwin32|mingw32|darwin|gnu|nextstep2|nextstep3|sunos4|ultrix|irix|haiku)
$3="$1"
;;
+ aix*) # e.g. powerpc-ibm-aix7.1.3.0
+ $3="aix"
+ ;;
freebsd*) # like i686-gentoo-freebsd7
# i686-gentoo-freebsd8
# i686-gentoo-freebsd8.2
diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs
index 42ac14e..5b23ecc 100644
--- a/compiler/main/DynFlags.hs
+++ b/compiler/main/DynFlags.hs
@@ -4277,6 +4277,7 @@ data LinkerInfo
| GnuGold [Option]
| DarwinLD [Option]
| SolarisLD [Option]
+ | AixLD [Option]
| UnknownLD
deriving Eq
diff --git a/compiler/main/SysTools.hs b/compiler/main/SysTools.hs
index 8c3ab1a..311b45e 100644
--- a/compiler/main/SysTools.hs
+++ b/compiler/main/SysTools.hs
@@ -769,6 +769,7 @@ neededLinkArgs (GnuLD o) = o
neededLinkArgs (GnuGold o) = o
neededLinkArgs (DarwinLD o) = o
neededLinkArgs (SolarisLD o) = o
+neededLinkArgs (AixLD o) = o
neededLinkArgs UnknownLD = []
-- Grab linker info and cache it in DynFlags.
@@ -823,6 +824,9 @@ getLinkerInfo' dflags = do
-- precisely so we assume here, the Solaris linker is
-- used.
return $ SolarisLD []
+ OSAIX ->
+ -- IBM AIX uses its own non-binutils linker as well
+ return $ AixLD []
OSDarwin ->
-- Darwin has neither GNU Gold or GNU LD, but a strange linker
-- that doesn't support --version. We can just assume that's
diff --git a/compiler/utils/Platform.hs b/compiler/utils/Platform.hs
index 8f9a8de..4c3e894 100644
--- a/compiler/utils/Platform.hs
+++ b/compiler/utils/Platform.hs
@@ -83,6 +83,7 @@ data OS
| OSOsf3
| OSQNXNTO
| OSAndroid
+ | OSAIX
deriving (Read, Show, Eq)
-- | ARM Instruction Set Architecture, Extensions and ABI
@@ -127,6 +128,7 @@ osElfTarget OSOsf3 = False -- I don't know if this is right, but as
-- per comment below it's safe
osElfTarget OSQNXNTO = False
osElfTarget OSAndroid = True
+osElfTarget OSAIX = False
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
More information about the ghc-commits
mailing list