Update to 2.0.0 tree from current Fremantle build
[opencv] / debian / patches / 010_fix_optimisations.diff
1 --- a/configure.in      2009-11-29 17:06:39.000000000 +0900
2 +++ b/configure.in      2009-11-29 17:11:10.000000000 +0900
3 @@ -290,42 +290,16 @@
4      # Due to a misconception, until SVN revision r1713, the case statement
5      # used the value of '--target', not of '--host'
6      case $host in
7 -    i386-apple-*)
8 -      # all intel macs have at least prescott instruction set
9 -      OPTIMIZATION_CXXFLAGS="-fast -g"
10 -      ;;
11 -    x86_64-apple-*)
12 -      # all 64bit intel macs have at least nocona instruction set
13 -      OPTIMIZATION_CXXFLAGS="-fast -g -march=nocona"
14 -      ;;
15 -    i?86-*-*)
16 -      # okay, we use this default together with the specification of the target architecture
17 -      # let us just assume, a Pentium 4 would be the minimum platform for OpenCV,
18 -      # then SSE2 instruction set is available also
19 -      OPTIMIZATION_CXXFLAGS="-O3 -g -march=pentium4 -ffast-math -fomit-frame-pointer"
20 -      ;;
21 -    amd64-*-* | x86_64-*-*)
22 -      OPTIMIZATION_CXXFLAGS="-O3 -g -march=x86-64 -ffast-math -fomit-frame-pointer"
23 -      ;;
24 -    powerpc-apple-*)
25 -      # Mac OS X 10.4 runs on CPUs >= G4 only
26 -      OPTIMIZATION_CXXFLAGS="-O3 -falign-loops-max-skip=15 -falign-jumps-max-skip=15 -falign-loops=16 -falign-jumps=16 -falign-functions=16 -ffast-math -fstrict-aliasing -funroll-loops -ftree-loop-linear -ftree-loop-memset -mcpu=G4 -mpowerpc-gpopt -mtune=G5 -fsched-interblock -fgcse-sm -g"
27 -      ;;
28 -    powerpc64-apple-*)
29 -      # There are no 64bit Macs with a CPU that's not a G5
30 -      OPTIMIZATION_CXXFLAGS="-O3 -falign-loops-max-skip=15 -falign-jumps-max-skip=15 -falign-loops=16 -falign-jumps=16 -falign-functions=16 -ffast-math -fstrict-aliasing -funroll-loops -ftree-loop-linear -ftree-loop-memset -mcpu=G5 -mpowerpc-gpopt -fsched-interblock -fgcse-sm -m64 -g"
31 -      ;;
32 -    powerpc-*-*)
33 -      # generic PowerPCs don't have Apple's 'fast' or 'fastf' switch
34 -      OPTIMIZATION_CXXFLAGS="-O3 -g -mcpu=G3 -mtune=G4 -fomit-frame-pointer"
35 +    m68k-*-*)
36 +      OPTIMIZATION_CXXFLAGS="-O2 -fomit-frame-pointer"
37        ;;
38      *-*-*)
39 -      OPTIMIZATION_CXXFLAGS="-O2 -fomit-frame-pointer"
40 +      OPTIMIZATION_CXXFLAGS="-O3 -fomit-frame-pointer"
41        ;;
42      esac
43    fi
44 -  
45 -  OPTIMIZATION_CPPFLAGS="-DNDEBUG"
46
47 +  OPTIMIZATION_CPPFLAGS="$CPPFLAGS -fno-strict-aliasing"
48  else
49    AC_MSG_RESULT([no])
50  fi