Commit dc3b4af6 authored by Moritz Angermann's avatar Moritz Angermann Committed by Ben Gamari

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:
parent ff7a3c4f
......@@ -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__) || \
return 0;
......@@ -585,18 +587,6 @@ AC_DEFUN([FPTOOLS_SET_C_LD_FLAGS],
$2="$$2 -march=i686"
$2="$$2 -m32"
$3="$$3 -m32"
$4="$$4 -arch i386"
$5="$$5 -m32"
$2="$$2 -m64"
$3="$$3 -m64"
$4="$$4 -arch x86_64"
$5="$$5 -m64"
$2="$$2 -m64"
$3="$$3 -m64"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment