Skip to content

Commit

Permalink
Merge pull request #1502 from hadfl/aarch64_htop
Browse files Browse the repository at this point in the history
aarch64: use clang to cross-compile htop
  • Loading branch information
citrus-it authored Aug 7, 2024
2 parents b394609 + 947241b commit 7ba2802
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion build/htop/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7ba2802

Please sign in to comment.