[MPlayer-dev-eng] [PATCH] "normal" CFLAGS with -g2 added if .developer
Reimar Döffinger
Reimar.Doeffinger at stud.uni-karlsruhe.de
Sun Nov 26 22:50:56 CET 2006
Hello,
this is a patch I quickly made up because of several things that have
been annoying me very much. Preferably somebody should fix this stuff
properly instead.
It just adds -g2 and the -W... switches to the normal CFLAGS when a
.developer file is present.
Problems I noticed with the --enable-debug in general:
1) CFLAGS env variable is ignored when it is used
2) does unrelated stuff like removing -fomit-frame-pointer so the crash
sometimes suddenly is gone when using it
3) adding -Wall is unrelated, too.
4) why does it not use $_pipe?
5) A wtf? It still has long to go to win a hypothetical "obfuscated bash
contest", but that's about the most conplicated way to do it IMO:
CFLAGS=`echo "$CFLAGS" | sed -e 's/\(-Wall\)/\1 -Wno-unused-parameter/'`
Greetings,
Reimar Döffinger
-------------- next part --------------
Index: configure
===================================================================
--- configure (revision 21284)
+++ configure (working copy)
@@ -1542,6 +1543,13 @@
else
CFLAGS="-O4 $_march $_mcpu $_pipe -ffast-math -fomit-frame-pointer"
fi
+ if test -f .developer ; then
+ if test "$_cc_major" -ge "3" ; then
+ CFLAGS="-Wno-unused-parameter $CFLAGS"
+ fi
+ CFLAGS="-g2 -W -Wall $CFLAGS"
+ _stripbinaries=no
+ fi
else
_warn_CFLAGS=yes
fi
More information about the MPlayer-dev-eng
mailing list