From 1980de9bba111561be5ad3dde37b6f7a29a80a4e Mon Sep 17 00:00:00 2001 From: Sam Hocevar Date: Wed, 14 Mar 2007 20:40:24 +0000 Subject: [PATCH] * Use -maltivec when building dependencies, or cannot be used. * Do not declare vectors in non-AltiVec files. git-svn-id: svn://svn.videolan.org/x264/trunk@630 df754926-b1dd-0310-bc7b-ec298dee348c --- Makefile | 2 +- common/ppc/quant.h | 6 +++++- configure | 1 + 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 61db07ea..8e81ba04 100644 --- a/Makefile +++ b/Makefile @@ -94,7 +94,7 @@ common/i386/*.o: common/i386/i386inc.asm .depend: config.mak rm -f .depend # Hacky - because gcc 2.9x doesn't have -MT - $(foreach SRC, $(SRCS) $(SRCCLI), ( $(ECHON) "`dirname $(SRC)`/" && $(CC) $(CFLAGS) $(SRC) -MM -g0 ) 1>> .depend;) + $(foreach SRC, $(SRCS) $(SRCCLI), ( $(ECHON) "`dirname $(SRC)`/" && $(CC) $(CFLAGS) $(ALTIVECFLAGS) $(SRC) -MM -g0 ) 1>> .depend;) config.mak: $(wildcard .svn/entries */.svn/entries */*/.svn/entries) ./configure $(CONFIGURE_ARGS) diff --git a/common/ppc/quant.h b/common/ppc/quant.h index 5375ede2..49ab01a5 100644 --- a/common/ppc/quant.h +++ b/common/ppc/quant.h @@ -18,7 +18,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. *****************************************************************************/ -#ifdef SYS_LINUX +#if defined SYS_LINUX && defined NEED_ALTIVEC #include #endif @@ -27,12 +27,16 @@ typedef union { unsigned int s[4]; +#if defined NEED_ALTIVEC vector unsigned int v; +#endif } vect_int_u; typedef union { unsigned short s[8]; +#if defined NEED_ALTIVEC vector unsigned short v; +#endif } vect_ushort_u; void x264_quant_4x4_altivec( int16_t dct[4][4], int quant_mf[4][4], int const i_qbits, int const f ); diff --git a/configure b/configure index 6a5fe262..4b013b09 100755 --- a/configure +++ b/configure @@ -159,6 +159,7 @@ case "${MACHINE%%-*}" in ;; powerpc|powerpc64) ARCH="PPC" + ALTIVECFLAGS="$ALTIVECFLAGS -DNEED_ALTIVEC" if [ $SYS = MACOSX ] then ALTIVECFLAGS="$ALTIVECFLAGS -faltivec -fastf -mcpu=G4" -- 2.47.3