From c4aa9c615e83500cf79944e7c649a4854b66d0fa Mon Sep 17 00:00:00 2001 From: Sergey Fedorov Date: Wed, 8 Jul 2026 21:25:57 +0800 Subject: [PATCH 1/5] build/make update --- build/make/Makefile | 2 ++ build/make/configure.sh | 6 ++++++ build/make/rtcd.pl | 4 ++-- configure | 1 + 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/build/make/Makefile b/build/make/Makefile index 39dff825b..a260dd44a 100644 --- a/build/make/Makefile +++ b/build/make/Makefile @@ -156,6 +156,8 @@ $(BUILD_PFX)%_sve2.c.o: CFLAGS += -march=armv9-a+i8mm+sve2 # POWER $(BUILD_PFX)%_vsx.c.d: CFLAGS += -maltivec -mvsx $(BUILD_PFX)%_vsx.c.o: CFLAGS += -maltivec -mvsx +$(BUILD_PFX)%_altivec.c.d: CFLAGS += -maltivec +$(BUILD_PFX)%_altivec.c.o: CFLAGS += -maltivec # MIPS $(BUILD_PFX)%_msa.c.d: CFLAGS += -mmsa diff --git a/build/make/configure.sh b/build/make/configure.sh index ebaec96a5..542f2f51c 100644 --- a/build/make/configure.sh +++ b/build/make/configure.sh @@ -895,6 +895,12 @@ process_common_toolchain() { ;; ppc*) enable_feature ppc + case ${tgt_os} in + darwin*) + # Enable AltiVec for macOS PPC (10.5+) + check_cflags -maltivec && soft_enable altivec + ;; + esac ;; loongarch*) soft_enable lsx diff --git a/build/make/rtcd.pl b/build/make/rtcd.pl index 7c876fc9d..502600731 100755 --- a/build/make/rtcd.pl +++ b/build/make/rtcd.pl @@ -459,7 +459,7 @@ my @PRIORITY_ARCH = qw/ mmx sse sse2 sse3 ssse3 sse4_1 sse4_2 avx avx2 avx512 arm_crc32 neon neon_dotprod neon_i8mm sve sve2 rvv - vsx + altivec vsx dspr2 msa /; my %PRIORITY_INDEX; @@ -525,7 +525,7 @@ if ($opts{arch} eq 'x86') { } arm; } elsif ($opts{arch} =~ /^ppc/ ) { - @ALL_ARCHS = filter(qw/vsx/); + @ALL_ARCHS = filter(qw/altivec vsx/); ppc; } elsif ($opts{arch} =~ /loongarch/ ) { @ALL_ARCHS = filter(qw/lsx lasx/); diff --git a/configure b/configure index 9e9d80bba..d42f24d16 100755 --- a/configure +++ b/configure @@ -301,6 +301,7 @@ ARCH_EXT_LIST=" x86_asm ${ARCH_EXT_LIST_X86} + altivec vsx ${ARCH_EXT_LIST_LOONGSON}