cflags.patch 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. Author: hasufell <hasufell@gentoo.org>
  2. Date: Sat Dec 28 23:48:53 2013 +0100
  3. * respect system flags
  4. * remove Werror, it breaks the build
  5. --- a/configure.in
  6. +++ b/configure.in
  7. @@ -194,12 +194,7 @@ AM_CONDITIONAL(X11VDPAU_CORE, test "$enable_x11vdpau" = "yes")
  8. AC_CHECK_HEADERS(linux/compiler.h linux/unistd.h asm/page.h signal.h)
  9. -dnl Clear default CFLAGS
  10. -if test x"$CFLAGS" = x"-g -O2"; then
  11. - CFLAGS=
  12. -fi
  13. -
  14. -CFLAGS="-ffast-math -pipe $CFLAGS"
  15. +CFLAGS="-ffast-math $CFLAGS"
  16. DFB_INTERNAL_CFLAGS="-D_GNU_SOURCE $DFB_INTERNAL_CFLAGS"
  17. @@ -467,7 +462,7 @@ AC_ARG_ENABLE(debug,
  18. [enable debugging @<:@default=no@:>@]),
  19. [], [enable_debug=no])
  20. if test "$enable_debug" = "yes"; then
  21. - CFLAGS="-g3 -O0 -fno-inline -Wno-inline $CFLAGS"
  22. + CFLAGS="-fno-inline -Wno-inline $CFLAGS"
  23. DIRECT_BUILD_DEBUG=1
  24. else
  25. DIRECT_BUILD_DEBUG=0
  26. @@ -483,13 +478,8 @@ AC_ARG_ENABLE(debug-support,
  27. [], [enable_debug_support=yes])
  28. if test "$enable_debug_support" = "yes" || test "$enable_debug" = "yes"; then
  29. enable_debug_support=yes
  30. - if test "$enable_debug" = "no"; then
  31. - CFLAGS="-g2 $CFLAGS"
  32. - fi
  33. - CFLAGS="-O3 $CFLAGS"
  34. DIRECT_BUILD_DEBUGS=1
  35. else
  36. - CFLAGS="-O3 -g0 $CFLAGS"
  37. DIRECT_BUILD_DEBUGS=0
  38. fi
  39. AM_CONDITIONAL(ENABLE_DEBUGS, test "$enable_debug_support" = "yes")
  40. @@ -2750,8 +2750,6 @@
  41. AS_AC_EXPAND(SYSCONFDIR, $sysconfdir)
  42. -CFLAGS="$CFLAGS -Werror-implicit-function-declaration"
  43. -
  44. AC_ARG_ENABLE(extra-warnings,
  45. AC_HELP_STRING([--enable-extra-warnings],
  46. [enable extra warnings @<:@default=no@:>@]),
  47. @@ -2761,7 +2759,7 @@
  48. fi
  49. if test "$GCC" = "yes"; then
  50. - CFLAGS="-Wall -Wstrict-prototypes -Wmissing-prototypes -Wno-strict-aliasing -Werror-implicit-function-declaration $CFLAGS"
  51. + CFLAGS="-Wall -Wstrict-prototypes -Wmissing-prototypes -Wno-strict-aliasing $CFLAGS"
  52. CXXFLAGS="-Wall -Wno-strict-aliasing -std=$CXXSTD $CXXFLAGS"
  53. fi