cross/crossdirect: tweak package() variables

* make arches and compilers diff friendly
* order arches alphabetically
* rename _bin to _bin_compilers in preparation for _bin_archivers

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6763
This commit is contained in:
Oliver Smith 2025-07-10 21:35:34 +02:00 committed by Stefan Hansson
parent 0bb036f300
commit 7e4ddbdc55
No known key found for this signature in database
GPG key ID: ACD854892B38D898

View file

@ -48,8 +48,22 @@ build() {
package() {
# Architectures and binaries
_archs="x86_64 armhf armv7 aarch64 riscv64"
_bins="c++ cc cpp g++ gcc clang clang++"
_archs="
aarch64
armhf
armv7
riscv64
x86_64
"
_bin_compilers="
c++
cc
clang
clang++
cpp
g++
gcc
"
# Rust wrappers
install -Dm755 "$srcdir/rust-qemu-linker.sh" \
@ -70,7 +84,7 @@ package() {
cp "$srcdir/crossdirect-$_arch" "./"
# GCC: create compiler symlinks
for _bin in $_bins; do
for _bin in $_bin_compilers; do
ln -s "crossdirect-$_arch" "$_bin"
ln -s "crossdirect-$_arch" "$_hostspec-$_bin"
done