0002-Remove-Werror.patch 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. Remove -Werror from Makefile
  2. glibc-2.20 includes some changes to the include/features.h file
  3. introduced by this commit:
  4. https://sourceware.org/git/?p=glibc.git;a=commit;h=ade40b10ff5fa59a318cf55b9d8414b758e8df78
  5. Those changes make libsvgtiny fail because some warnings are thrown and
  6. the build system is using the -Werror option. We disable this to be able
  7. to build it, or otherwise we will see errors like this one:
  8. GPERF: src/colors.gperf
  9. COMPILE: build-Linux-Linux-release-lib-static/src_colors.c
  10. In file included from
  11. /br/output/host/usr/mipsel-buildroot-linux-gnu/sysroot/usr/include/string.h:25:0,
  12. from src/colors.gperf:16:
  13. /br/output/host/usr/mipsel-buildroot-linux-gnu/sysroot/usr/include/features.h:148:3:
  14. error: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use
  15. _DEFAULT_SOURCE" [-Werror=cpp]
  16. and this one:
  17. In file included from src/colors.gperf:18:0:
  18. /home/ldap/vriera/work/mips-buildroots/mips32/output/build/libsvgtiny-12121/src/svgtiny_internal.h:71:0:
  19. error: "strndup" redefined [-Werror]
  20. Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
  21. diff -rup a/Makefile b/Makefile
  22. --- a/Makefile 2010-01-03 23:37:39.000000000 +0000
  23. +++ b/Makefile 2014-12-11 11:35:37.241903884 +0000
  24. @@ -13,12 +13,6 @@ TESTRUNNER := $(ECHO)
  25. WARNFLAGS := -Wall -W -Wundef -Wpointer-arith -Wcast-align \
  26. -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes \
  27. -Wmissing-declarations -Wnested-externs -pedantic
  28. -# BeOS/Haiku/AmigaOS4 standard library headers create warnings
  29. -ifneq ($(TARGET),beos)
  30. - ifneq ($(TARGET),AmigaOS)
  31. - WARNFLAGS := $(WARNFLAGS) -Werror
  32. - endif
  33. -endif
  34. CFLAGS := -D_BSD_SOURCE -I$(CURDIR)/include/ \
  35. -I$(CURDIR)/src $(WARNFLAGS) $(CFLAGS)
  36. ifneq ($(GCCVER),2)