From 2186bc89486f9f11161b0db280a869c6849c867e Mon Sep 17 00:00:00 2001 From: Siarhei Siamashka Date: Fri, 4 Sep 2009 14:14:00 +0300 Subject: [PATCH] Change CFLAGS order for PPC and ARM configure tests CFLAGS are always appended to the end of gcc options when compiling sources in autotools based projects. Configure tests should do the same. Otherwise build fails on PPC when using CFLAGS="-O2 -mno-altivec" for example. Similar problem affects ARM. --- configure.ac | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index 061a380..fbc73f6 100644 --- a/configure.ac +++ b/configure.ac @@ -318,7 +318,7 @@ fi have_vmx_intrinsics=no AC_MSG_CHECKING(whether to use VMX/Altivec intrinsics) xserver_save_CFLAGS=$CFLAGS -CFLAGS="$CFLAGS $VMX_CFLAGS" +CFLAGS="$VMX_CFLAGS $CFLAGS" AC_COMPILE_IFELSE([ #if defined(__GNUC__) && (__GNUC__ < 3 || (__GNUC__ == 3 && __GNUC_MINOR__ < 4)) error "Need GCC >= 3.4 for sane altivec support" @@ -362,7 +362,7 @@ ARM_SIMD_CFLAGS="-mcpu=arm1136j-s" have_arm_simd=no AC_MSG_CHECKING(whether to use ARM SIMD assembler) xserver_save_CFLAGS=$CFLAGS -CFLAGS="$CFLAGS $ARM_SIMD_CFLAGS" +CFLAGS="$ARM_SIMD_CFLAGS $CFLAGS" AC_COMPILE_IFELSE([ int main () { asm("uqadd8 r1, r1, r2"); @@ -401,7 +401,7 @@ ARM_NEON_CFLAGS="-mfpu=neon -mcpu=cortex-a8" have_arm_neon=no AC_MSG_CHECKING(whether to use ARM NEON) xserver_save_CFLAGS=$CFLAGS -CFLAGS="$CFLAGS $ARM_NEON_CFLAGS" +CFLAGS="$ARM_NEON_CFLAGS $CFLAGS" AC_COMPILE_IFELSE([ #include int main () { -- 2.7.4