From 947241b5c67cd72dbbc716ba757e4b383455193b Mon Sep 17 00:00:00 2001 From: Dominik Hassler Date: Sun, 4 Aug 2024 14:50:33 +0000 Subject: [PATCH] aarch64: use clang to cross-compile htop --- build/htop/build.sh | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/build/htop/build.sh b/build/htop/build.sh index 967b7de2d..18f549da0 100755 --- a/build/htop/build.sh +++ b/build/htop/build.sh @@ -23,10 +23,25 @@ SUMMARY="htop" DESC="An interactive process viewer for Unix" set_arch 64 -test_relver '>=' 151041 && set_clangver +set_clangver XFORM_ARGS="-DPREFIX=${PREFIX#/}" +# TODO: if we are going to use clang as a cross-compiler we should +# add support to the framework; this is just a hacky workaround +# to have at least one consumer of clang for cross-compiling +pre_configure() { + typeset arch=$1 + + ! cross_arch $arch && return + + set_clangver + + PATH=$CROSSTOOLS/$arch/bin:$PATH + CC+=" --target=${TRIPLETS[$arch]}" + CFLAGS[$arch]+=" $CTF_CFLAGS" +} + init download_source $PROG $PROG $VER patch_source