Skip to content

Commit 845ded5

Browse files
progersnoyberg
authored andcommitted
get-stack.sh: get_isa to detect armv7l/armv8l
Tested on [a1.xlarge](https://aws.amazon.com/ec2/instance-types/a1/) instance running a Raspbian Buster armhf chroot inside aarch64 Ubuntu. LTS version is 13.11. LLVM version is 7.0.1. Still needs this notorious hack for compilation to work: https://gist.github.com/proger/28b1bf9222828a9cd77a74a480aee5f3 I also needed to re-run `stack setup` with ``` export LD_LIBRARY_PATH=$(echo /home/ubuntu/.stack/programs/arm-linux/ghc-8.6.3/lib/ghc-8.6.3/* | tr ' ' :) ``` because of some weird ld.so behaviour when loading ghc-pkg: ``` # ldd /home/ubuntu/.stack/programs/arm-linux/ghc-8.6.3/lib/ghc-8.6.3/bin/ghc-pkg /usr/lib/arm-linux-gnueabihf/libarmmem-${PLATFORM}.so => /usr/lib/arm-linux-gnueabihf/libarmmem-v8l.so (0xf7ad1000) libm.so.6 => /lib/arm-linux-gnueabihf/libm.so.6 (0xf7a4f000) libHSterminfo-0.4.1.2-ghc8.6.3.so => /home/ubuntu/.stack/programs/arm-linux/ghc-8.6.3/lib/ghc-8.6.3/terminfo-0.4.1.2/libHSterminfo-0.4.1.2-ghc8.6.3.so (0xf7a0b000) libHSghc-boot-8.6.3-ghc8.6.3.so => /home/ubuntu/.stack/programs/arm-linux/ghc-8.6.3/lib/ghc-8.6.3/bin/../ghc-boot-8.6.3/libHSghc-boot-8.6.3-ghc8.6.3.so (0xf7970000) libHSghc-boot-th-8.6.3-ghc8.6.3.so => /home/ubuntu/.stack/programs/arm-linux/ghc-8.6.3/lib/ghc-8.6.3/bin/../ghc-boot-th-8.6.3/libHSghc-boot-th-8.6.3-ghc8.6.3.so (0xf7939000) # strace /home/ubuntu/.stack/programs/arm-linux/ghc-8.6.3/lib/ghc-8.6.3/bin/ghc-pkg 2>&1 | grep libHSghc-boot openat(AT_FDCWD, "/home/ubuntu/.stack/programs/arm-linux/ghc-8.6.3/lib/ghc-8.6.3/terminfo-0.4.1.2/libHSghc-boot-8.6.3-ghc8.6.3.so", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory) ... it goes on to search in the wrong place ```
1 parent bdfd0e6 commit 845ded5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

etc/scripts/get-stack.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ post_install_separator() {
7272

7373
# determines the the CPU's instruction set
7474
get_isa() {
75-
if arch | grep -q armv7 ; then
75+
if arch | grep -Eq 'armv[78]l?' ; then
7676
echo arm
7777
elif arch | grep -q aarch64 ; then
7878
echo aarch64

0 commit comments

Comments
 (0)