From a02086c073f4018b05a68f267a3ca5b3ff330774 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sigrid=20Solveig=20Hafl=C3=ADnud=C3=B3ttir?= Date: Thu, 17 Mar 2022 22:50:33 +0100 Subject: [PATCH] ghc, ghc-bin: add aarch64-musl support --- srcpkgs/ghc-bin/template | 7 ++++++- srcpkgs/ghc/template | 8 ++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/srcpkgs/ghc-bin/template b/srcpkgs/ghc-bin/template index 3949ee3fa1aa..9c9ee4e1729c 100644 --- a/srcpkgs/ghc-bin/template +++ b/srcpkgs/ghc-bin/template @@ -2,7 +2,7 @@ pkgname=ghc-bin version=8.10.7 revision=1 -archs="i686 x86_64* ppc64le* ppc64" +archs="i686 x86_64* ppc64le* ppc64 aarch64-musl" wrksrc="ghc-${version%[!0-9]}" hostmakedepends="perl libffi libnuma" depends="ncurses perl gcc libffi-devel gmp-devel" @@ -39,6 +39,11 @@ ppc64) distfiles="https://alpha.de.repo.voidlinux.org/distfiles/ghc-${version}-powerpc64-void-linux.tar.xz" checksum=b8578e602abd4b453845303fb9cfed0b2186f86f60e3aa45869026ea833726c8 ;; +aarch64-musl) + distfiles="https://alpha.de.repo.voidlinux.org/distfiles/ghc-${version}-aarch64-void-linux-musl.tar.xz" + checksum=f2c37a5ed028eebd3e69a22ce989f5cdf6f84a408871ff0933ac532414c6c273 + depends+=" llvm" + ;; *) broken="No distfiles available for this target" ;; diff --git a/srcpkgs/ghc/template b/srcpkgs/ghc/template index b8b16f67b433..807e7603a4e7 100644 --- a/srcpkgs/ghc/template +++ b/srcpkgs/ghc/template @@ -54,6 +54,14 @@ elif [ "${XBPS_MACHINE%-*}" != "${XBPS_TARGET_MACHINE%-*}" ]; then configure_args+=" --host=${XBPS_TRIPLET} --target=${XBPS_CROSS_TRIPLET}" fi +case "$XBPS_TARGET_MACHINE" in +aarch64*) + # GHC uses LLVM to generate code on aarch64 + hostmakedepends+=" llvm" + depends+=" llvm" + ;; +esac + # Recent safe to use tarball # GHC's bundled tarball is from 2017, buggy on some archs _ffi_rev=4d6d2866ae43e55325e8ee96561221804602cd7a