Do not add -fomit-frame-pointer to CFLAGS when optimizations are disabled.
authorGraham Booker <gbooker@tamu.edu>
Thu, 27 Jul 2006 22:10:11 +0000 (22:10 +0000)
committerDiego Biurrun <diego@biurrun.de>
Thu, 27 Jul 2006 22:10:11 +0000 (22:10 +0000)
patch by Graham Booker, ffmpeglist atat cod3r dotdot com

Originally committed as revision 5832 to svn://svn.ffmpeg.org/ffmpeg/trunk

configure

index 405cd4f..a3613b3 100755 (executable)
--- a/configure
+++ b/configure
@@ -1016,22 +1016,25 @@ if test $targetos = Darwin; then
         gcc_version="`$cc -v 2>&1 | grep version | cut -d ' ' -f3-`"
         case "$gcc_version" in
             *2.95*)
-                CFLAGS="$CFLAGS -no-cpp-precomp -pipe -fomit-frame-pointer"
+                CFLAGS="$CFLAGS -no-cpp-precomp -pipe"
                 ;;
             *[34].*)
-                CFLAGS="$CFLAGS -no-cpp-precomp -pipe -fomit-frame-pointer -force_cpusubtype_ALL -Wno-sign-compare"
+                CFLAGS="$CFLAGS -no-cpp-precomp -pipe -force_cpusubtype_ALL -Wno-sign-compare"
                 if test "$lshared" = no; then
                    needmdynamicnopic="yes"
                 fi
                 ;;
             *)
-                CFLAGS="$CFLAGS -no-cpp-precomp -pipe -fomit-frame-pointer"
+                CFLAGS="$CFLAGS -no-cpp-precomp -pipe"
                 if test "$lshared" = no; then
                    needmdynamicnopic="yes"
                 fi
                 ;;
         esac
     fi
+    if test $optimize != "no"; then
+        CFLAGS="$CFLAGS -fomit-frame-pointer"
+    fi
 fi
 
 # Can only do AltiVec on PowerPC