[commit: ghc] master: Fix Raspberry Pi (dc3b4af)
git at git.haskell.org
git at git.haskell.org
Tue May 9 02:27:05 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/dc3b4af6d0c38ced4f0becf575474a1c1b08f794/ghc
>---------------------------------------------------------------
commit dc3b4af6d0c38ced4f0becf575474a1c1b08f794
Author: Moritz Angermann <moritz.angermann at gmail.com>
Date: Mon May 8 17:45:18 2017 -0400
Fix Raspberry Pi
This is two fold:
- We did not catch all ARM_ARCH_6 defines. Specifically not `6K` and
`6KZ`, which is what llvm seems to use these days for
`arm-none-linux-gnueabihf` (e.g. the triple that's used for raspbian
as well). Without it, ghc assums we want to compile against some armv7
system, which raspbian is not (it is armv6 for maximum compatibility
across the pi family, compromising on using armv7 and up features).
- We stop forcing the -m and -arch flags on macOS. This is troublesome,
as compiling for a 32bit system (e.g. raspberry pi, on a x86_64 macOS
system results in the `-m64` flag being passed to to clang as well,
which in turn figures out that you likely want 64bit, and rewrites
your taret from `arm-none-linux-gnueabihf` to
`aarch64-none-linux-gnueabihf`, which is definetly not what you want.
Reviewers: austin, hvr, bgamari
Reviewed By: bgamari
Subscribers: rwbarton, thomie, erikd
Differential Revision: https://phabricator.haskell.org/D3546
>---------------------------------------------------------------
dc3b4af6d0c38ced4f0becf575474a1c1b08f794
aclocal.m4 | 14 ++------------
1 file changed, 2 insertions(+), 12 deletions(-)
diff --git a/aclocal.m4 b/aclocal.m4
index dfb7892..d874d41 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -390,6 +390,8 @@ AC_DEFUN([GET_ARM_ISA],
defined(__ARM_ARCH_6T2__) || \
defined(__ARM_ARCH_6Z__) || \
defined(__ARM_ARCH_6ZK__) || \
+ defined(__ARM_ARCH_6K__) || \
+ defined(__ARM_ARCH_6KZ__) || \
defined(__ARM_ARCH_6M__)
return 0;
#else
@@ -585,18 +587,6 @@ AC_DEFUN([FPTOOLS_SET_C_LD_FLAGS],
i386-portbld-freebsd*)
$2="$$2 -march=i686"
;;
- i386-apple-darwin)
- $2="$$2 -m32"
- $3="$$3 -m32"
- $4="$$4 -arch i386"
- $5="$$5 -m32"
- ;;
- x86_64-apple-darwin)
- $2="$$2 -m64"
- $3="$$3 -m64"
- $4="$$4 -arch x86_64"
- $5="$$5 -m64"
- ;;
x86_64-unknown-solaris2)
$2="$$2 -m64"
$3="$$3 -m64"
More information about the ghc-commits
mailing list