diff options
author | Evangelos Foutras <foutrelis@archlinux.org> | 2024-12-25 17:50:50 +0200 |
---|---|---|
committer | Evangelos Foutras <foutrelis@archlinux.org> | 2024-12-25 17:50:50 +0200 |
commit | 3d5e761744fb0e46a9818dd03d113a98e09e1253 (patch) | |
tree | ed03a0d598b0b0973c3ae0b9ae3e7ecbed04be1f /PKGBUILD | |
parent | 46fae3c9e671f56ee3ed8afb99f50fdcb7cbb146 (diff) |
Provide platform/assembly flags per architecture
Trying to be mindful of downstream distros.
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 19 |
1 files changed, 15 insertions, 4 deletions
@@ -20,11 +20,22 @@ prepare() { } build() { + local _platform_flags=() + + case $CARCH in + x86_64) + _platform_flags=(PLATFORM=x64 IS_X64=1 MY_ASM=uasm USE_ASM=1) + ;; + i686) + _platform_flags=(PLATFORM=x86 IS_X86=1 MY_ASM=uasm USE_ASM=1) + ;; + aarch64) + _platform_flags=(PLATFORM=arm64 IS_ARM64=1 MY_ASM=uasm USE_ASM=1) + ;; + esac + for component in Bundles/{Alone,Alone7z,Format7zF,SFXCon} UI/Console; do - make -C CPP/7zip/$component -f ../../cmpl_gcc.mak \ - MY_ASM=uasm \ - USE_ASM=1 \ - IS_X64=1 \ + make -C CPP/7zip/$component -f ../../cmpl_gcc.mak "${_platform_flags[@]}" \ CC="cc $CPPFLAGS $CFLAGS $LDFLAGS" \ CXX="g++ $CPPFLAGS $CXXFLAGS $LDFLAGS" done |