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