Commit b6e64af3 authored by Erik de Castro Lopo's avatar Erik de Castro Lopo
Browse files

Disable Altivec on host triplet powerpc-unknown-linux-gnuspe.

SPE is incompatible with AltiVec because it shares the same opcode range.

Patch from Sebastian Andrzej Siewior <bigeasy@linutronix.de> via Debian.
parent c08b6792
...@@ -112,6 +112,14 @@ case "$host" in ...@@ -112,6 +112,14 @@ case "$host" in
*) OBJ_FORMAT=elf ;; *) OBJ_FORMAT=elf ;;
esac esac
AC_SUBST(OBJ_FORMAT) AC_SUBST(OBJ_FORMAT)
case "$host" in
*-gnuspe)
abi_spe=true
AC_DEFINE(FLAC__CPU_PPC_SPE)
AH_TEMPLATE(FLAC__CPU_PPC_SPE, [define if building for PowerPC with SPE ABI])
;;
esac
AM_CONDITIONAL(FLaC__CPU_PPC_SPE, test "x$abi_spe" = xtrue)
case "$host" in case "$host" in
*-*-cygwin|*mingw*|*emx*) *-*-cygwin|*mingw*|*emx*)
......
...@@ -40,8 +40,13 @@ if FLaC__SYS_DARWIN ...@@ -40,8 +40,13 @@ if FLaC__SYS_DARWIN
CPUCFLAGS = -faltivec -force_cpusubtype_ALL -DFLAC__NO_ASM CPUCFLAGS = -faltivec -force_cpusubtype_ALL -DFLAC__NO_ASM
else else
# Linux-gcc for PPC does not have -force_cpusubtype_ALL, it is Darwin-specific # Linux-gcc for PPC does not have -force_cpusubtype_ALL, it is Darwin-specific
CPUCFLAGS =
if FLaC__CPU_PPC_SPE
else
CPUCFLAGS += -maltivec -mabi=altivec
endif
#@@@ PPC optimizations temporarily disabled #@@@ PPC optimizations temporarily disabled
CPUCFLAGS = -maltivec -mabi=altivec -DFLAC__NO_ASM CPUCFLAGS += -DFLAC__NO_ASM
endif endif
endif endif
...@@ -58,6 +63,8 @@ endif ...@@ -58,6 +63,8 @@ endif
if FLaC__CPU_PPC if FLaC__CPU_PPC
ARCH_SUBDIRS = ppc ARCH_SUBDIRS = ppc
if FLaC__HAS_AS__TEMPORARILY_DISABLED if FLaC__HAS_AS__TEMPORARILY_DISABLED
if FLaC__CPU_PPC_SPE
else
LOCAL_EXTRA_LIBADD = ppc/as/libFLAC-asm.la LOCAL_EXTRA_LIBADD = ppc/as/libFLAC-asm.la
LOCAL_EXTRA_LDFLAGS = "-Wl,-read_only_relocs,warning" LOCAL_EXTRA_LDFLAGS = "-Wl,-read_only_relocs,warning"
else else
...@@ -68,6 +75,7 @@ endif ...@@ -68,6 +75,7 @@ endif
endif endif
endif endif
endif endif
endif
libFLAC_la_LIBADD = $(LOCAL_EXTRA_LIBADD) @OGG_LIBS@ libFLAC_la_LIBADD = $(LOCAL_EXTRA_LIBADD) @OGG_LIBS@
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment