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