diff options
author | Felix Singer | 2023-05-15 20:58:39 +0000 |
---|---|---|
committer | Felix Singer | 2023-05-16 11:23:08 +0000 |
commit | c09b62d2e2c29e6d4f57cd8f143180226dcb1f01 (patch) | |
tree | 3e871dd208abc2828d4342233bf6e9214141a8dd /PKGBUILD | |
parent | 76e3b3c5393e3ab3ed4712e3cd783515cc6f5422 (diff) | |
download | aur-c09b62d2e2c29e6d4f57cd8f143180226dcb1f01.tar.gz |
PKGBUILD: Separate Clang from GCC target list
Separate the Clang target from the GCC targets to simplify the
distinction between both in the script and to allow the script to be
modular.
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 16 |
1 files changed, 9 insertions, 7 deletions
@@ -1,6 +1,7 @@ # Maintainer: Felix Singer <felixsinger@posteo.net> -_targets="i386 x64 arm aarch64 riscv ppc64 nds32le clang" +_gcc_targets="i386 x64 arm aarch64 riscv ppc64 nds32le" +_is_clang_enabled=1 _commit='465fbbe93ee01b4576689a90b7ddbeec23cdace2' pkgbase='coreboot-toolchain' @@ -22,24 +23,25 @@ sha256sums=( ) -for target in ${_targets}; do +for target in ${_gcc_targets}; do pkgname+=("${pkgbase}-${target}") done +if [ ${_is_clang_enabled} -eq 1 ]; then + pkgname+=("${pkgbase}-clang") +fi + build() { cd coreboot export CFLAGS=${CFLAGS/-Werror=format-security/} export CXXFLAGS=${CXXFLAGS/-Werror=format-security/} - is_clang_enabled=0 - - for target in ${_targets}; do - [ "${target}" = "clang" ] && is_clang_enabled=1 && continue + for target in ${_gcc_targets}; do make crossgcc-${target} CPUS=$(nproc) DEST="${srcdir}/${target}" done - if [ ${is_clang_enabled} -eq 1 ]; then + if [ ${_is_clang_enabled} -eq 1 ]; then for component in "clang iasl nasm"; do make ${component} CPUS=$(nproc) DEST="${srcdir}/${target}" done |