[Git][ghc/ghc][wip/T17856] configure: Work around Raspbian's silly packaging decisions
Ben Gamari
gitlab at gitlab.haskell.org
Thu Jun 11 02:53:02 UTC 2020
Ben Gamari pushed to branch wip/T17856 at Glasgow Haskell Compiler / GHC
Commits:
3dbf0181 by Ben Gamari at 2020-06-10T22:52:56-04:00
configure: Work around Raspbian's silly packaging decisions
See #17856.
- - - - -
1 changed file:
- aclocal.m4
Changes:
=====================================
aclocal.m4
=====================================
@@ -438,25 +438,37 @@ AC_DEFUN([GET_ARM_ISA],
#endif]
)],
[AC_DEFINE(arm_HOST_ARCH_PRE_ARMv7, 1, [ARM pre v7])
- ARM_ISA=ARMv6
- AC_COMPILE_IFELSE([
- AC_LANG_PROGRAM(
- [],
- [#if defined(__VFP_FP__)
- return 0;
- #else
- no vfp
- #endif]
- )],
- [changequote(, )dnl
- ARM_ISA_EXT="[VFPv2]"
- changequote([, ])dnl
- ],
- [changequote(, )dnl
- ARM_ISA_EXT="[]"
- changequote([, ])dnl
- ]
- )],
+ if grep -q Raspbian /etc/issue && uname -m | grep -q armv7; then
+ # Raspbian unfortunately makes some extremely questionable
+ # packaging decisions, configuring gcc to compile for ARMv6
+ # despite the fact that the RPi4 is ARMv8. As ARMv8 doesn't
+ # support all instructions supported by ARMv6 this can
+ # break. Work around this by checking uname to verify
+ # that we aren't running on armv7.
+ # See #17856.
+ AC_MSG_NOTICE([Found compiler which claims to target ARMv6 running on ARMv7, assuming this is ARMv7 on Raspbian (see T17856)])
+ ARM_ISA=ARMv7
+ else
+ ARM_ISA=ARMv6
+ AC_COMPILE_IFELSE([
+ AC_LANG_PROGRAM(
+ [],
+ [#if defined(__VFP_FP__)
+ return 0;
+ #else
+ no vfp
+ #endif]
+ )],
+ [changequote(, )dnl
+ ARM_ISA_EXT="[VFPv2]"
+ changequote([, ])dnl
+ ],
+ [changequote(, )dnl
+ ARM_ISA_EXT="[]"
+ changequote([, ])dnl
+ ]
+ )
+ fi],
[changequote(, )dnl
ARM_ISA=ARMv7
ARM_ISA_EXT="[VFPv3,NEON]"
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/3dbf01816dee31b497489c73871581b8c9e11910
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/3dbf01816dee31b497489c73871581b8c9e11910
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20200610/251f98ae/attachment-0001.html>
More information about the ghc-commits
mailing list