[Buildroot] [PATCH v2 3/3] package/flac: Configure powerpc vector extensions

Joel Stanley joel at jms.id.au
Thu Apr 7 00:56:08 UTC 2022


Remove the hard coded disabling of altivec and vsx, and instead use the
BR2_POWERPC_CPU_HAS_VSX and BR2_POWERPC_CPU_HAS_ALTIVEC variables to
control the flags.

Signed-off-by: Joel Stanley <joel at jms.id.au>
---
 package/flac/flac.mk | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/package/flac/flac.mk b/package/flac/flac.mk
index 3a18d81591e6..d1cc42f352f2 100644
--- a/package/flac/flac.mk
+++ b/package/flac/flac.mk
@@ -19,9 +19,15 @@ FLAC_AUTORECONF = YES
 FLAC_CONF_OPTS = \
 	$(if $(BR2_INSTALL_LIBSTDCPP),--enable-cpplibs,--disable-cpplibs) \
 	--disable-xmms-plugin \
-	--disable-altivec \
-	--disable-stack-smash-protection \
-	--disable-vsx
+	--disable-stack-smash-protection
+
+ifeq ($(BR2_POWERPC_CPU_HAS_VSX),)
+FLAC_CONF_OPTS += --disable-vsx
+endif
+
+ifeq ($(BR2_POWERPC_CPU_HAS_ALTIVEC),)
+FLAC_CONF_OPTS += --disable-altivec
+endif
 
 ifeq ($(BR2_PACKAGE_LIBOGG),y)
 FLAC_CONF_OPTS += --with-ogg=$(STAGING_DIR)/usr
-- 
2.35.1




More information about the buildroot mailing list