libhid-dont-fiddle-with-debug-flags.patch 1.2 KB

1234567891011121314151617181920212223242526272829
  1. Don't do horrible magic with CFLAGS and CXXFLAGS
  2. The purpose of the lines being removed is to suppress the
  3. -g<something> option from the CFLAGS or CXXFLAGS, when --enable-debug
  4. is not used. This is stupid because it is up to the user to pass these
  5. flags or not.
  6. But it is not only stupid, but utterly broken: if your CFLAGS contains
  7. a flags like -mfloat-gprs=double, then this option gets truncated to
  8. -mfloat simply because the option contained the -g string!
  9. Completely ridiculous piece of code, so get rid of it.
  10. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
  11. Index: libhid-0.2.16/m4/md_conf_debugging.m4
  12. ===================================================================
  13. --- libhid-0.2.16.orig/m4/md_conf_debugging.m4 2004-11-08 18:16:25.000000000 +0100
  14. +++ libhid-0.2.16/m4/md_conf_debugging.m4 2012-12-12 20:24:50.000000000 +0100
  15. @@ -1,7 +1,7 @@
  16. AC_DEFUN([MD_CONF_DEBUGGING],
  17. [
  18. - CFLAGS=$(echo $CFLAGS | sed -e 's,-g[[^[:space:]]]*,,g')
  19. - CXXFLAGS=$(echo $CXXFLAGS | sed -e 's,-g[[^[:space:]]]*,,g')
  20. +# CFLAGS=$(echo $CFLAGS | sed -e 's,-g[[^[:space:]]]*,,g')
  21. +# CXXFLAGS=$(echo $CXXFLAGS | sed -e 's,-g[[^[:space:]]]*,,g')
  22. MD_CHECK_ARG_ENABLE(debug,
  23. [
  24. DEBUG_FLAG=-g