Skip to contentSkip to conversation

package/tinycbor: disable -Werror

PATCH Applied Fabrice Fontaine 2 participants 2 messages Jan 12, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/tinycbor: disable -Werror

Disable -Werror to avoid the following build failure with gcc 4.8 raised since bump to version 0.6.0 in commit ee1a2826dcf7ff75f90b0bf9f7aa53d19ce19cf6 and
https://github.com/intel/tinycbor/commit/e2a4ed135c4d9101c4df83f2dd033cd249b6ef07:

/home/buildroot/autobuild/instance-1/output-1/host/bin/arm-none-linux-gnueabi-gcc -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -I./src -std=gnu99 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Werror=incompatible-pointer-types -Werror=implicit-function-declaration -Werror=int-conversion -fPIC -c -o src/cborerrorstrings.pic.o src/cborerrorstrings.c
cc1: error: -Werror=incompatible-pointer-types: no option -Wincompatible-pointer-types
cc1: error: -Werror=int-conversion: no option -Wint-conversion

Fixes:
- http://autobuild.buildroot.org/results/a9fe64c42bb96f9e7b4af3050464f6570c1c00fa

---
 .../0001-Makefile-add-DISABLE_WERROR.patch    | 44 +++++++++++++++++++
 package/tinycbor/tinycbor.mk                  |  2 +-
 2 files changed, 45 insertions(+), 1 deletion(-)
 create mode 100644 package/tinycbor/0001-Makefile-add-DISABLE_WERROR.patch
package/tinycbor/0001-Makefile-add-DISABLE_WERROR.patch new file +44 -0
new file mode 100644
index 0000000000..334bea7eb0
@@ -0,0 +1,44 @@
+From 5f26eaf8d7be760fafe11ef4a6e0f907e7e8c3f0 Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <[email protected]>
+Date: Mon, 10 Jan 2022 23:17:45 +0100
+Subject: [PATCH] Makefile: add DISABLE_WERROR
+
+Allow the user to disable -Werror to avoid the following build failure
+with gcc 4.8 raised since version 0.6.0 and
+https://github.com/intel/tinycbor/commit/e2a4ed135c4d9101c4df83f2dd033cd249b6ef07:
+
+/home/buildroot/autobuild/instance-1/output-1/host/bin/arm-none-linux-gnueabi-gcc -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -I./src -std=gnu99 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -Os -g0 -D_FORTIFY_SOURCE=1 -Werror=incompatible-pointer-types -Werror=implicit-function-declaration -Werror=int-conversion -fPIC  -c -o src/cborerrorstrings.pic.o src/cborerrorstrings.c
+cc1: error: -Werror=incompatible-pointer-types: no option -Wincompatible-pointer-types
+cc1: error: -Werror=int-conversion: no option -Wint-conversion
+
+Fixes:
+ - http://autobuild.buildroot.org/results/a9f/a9fe64c42bb96f9e7b4af3050464f6570c1c00fa
+
+Signed-off-by: Fabrice Fontaine <[email protected]>
+[Retrieved from:
+https://github.com/intel/tinycbor/commit/5f26eaf8d7be760fafe11ef4a6e0f907e7e8c3f0]
+---
+ Makefile | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index 6492ea16..3cde2b3d 100644
+--- a/Makefile
++++ b/Makefile
+@@ -236,10 +236,15 @@ tag: distcheck
+ .SECONDARY:
+ 
+ cflags := $(CPPFLAGS) -I$(SRCDIR)src
+-cflags += -std=gnu99 $(CFLAGS) \
++cflags += -std=gnu99 $(CFLAGS)
++
++ifneq ($(DISABLE_WERROR),1)
++cflags += \
+ 	-Werror=incompatible-pointer-types \
+ 	-Werror=implicit-function-declaration \
+ 	-Werror=int-conversion
++endif
++
+ %.o: %.c
+ 	@test -d $(@D) || $(MKDIR) $(@D)
+ 	$(CC) $(cflags) $($(basename $(notdir $@))_CCFLAGS) -c -o $@ $<
package/tinycbor/tinycbor.mk +1 -1
index bf6e8e4c1e..cad50e633b 100644
@@ -16,7 +16,7 @@ ifeq ($(BR2_PACKAGE_CJSON),y)
 TINYCBOR_DEPENDENCIES += cjson
 endif
 
-TINYCBOR_MAKE_OPTS = $(TARGET_CONFIGURE_OPTS) V=1
+TINYCBOR_MAKE_OPTS = $(TARGET_CONFIGURE_OPTS) DISABLE_WERROR=1 V=1
 
 ifeq ($(BR2_STATIC_LIBS),y)
 TINYCBOR_MAKE_OPTS += BUILD_STATIC=1 BUILD_SHARED=0
Signature · 6 lines
2.34.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw
Quoted 5 lines · Fabrice Fontaine

Disable -Werror to avoid the following build failure with gcc 4.8 raised since bump to version 0.6.0 in commit ee1a2826dcf7ff75f90b0bf9f7aa53d19ce19cf6 and
https://github.com/intel/tinycbor/commit/e2a4ed135c4d9101c4df83f2dd033cd249b6ef07:

Quoted 8 lines

/home/buildroot/autobuild/instance-1/output-1/host/bin/arm-none-linux-gnueabi-gcc -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -I./src -std=gnu99 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -Werror=incompatible-pointer-types -Werror=implicit-function-declaration -Werror=int-conversion -fPIC -c -o src/cborerrorstrings.pic.o src/cborerrorstrings.c
cc1: error: -Werror=incompatible-pointer-types: no option -Wincompatible-pointer-types
cc1: error: -Werror=int-conversion: no option -Wint-conversion

Fixes:
- http://autobuild.buildroot.org/results/a9fe64c42bb96f9e7b4af3050464f6570c1c00fa

Applied to master, thanks.

Regards,
Arnout

Quoted 62 lines
---
  .../0001-Makefile-add-DISABLE_WERROR.patch    | 44 +++++++++++++++++++
  package/tinycbor/tinycbor.mk                  |  2 +-
  2 files changed, 45 insertions(+), 1 deletion(-)

create mode 100644 package/tinycbor/0001-Makefile-add-DISABLE_WERROR.patch

package/tinycbor/0001-Makefile-add-DISABLE_WERROR.patch new file +44 -0
new file mode 100644
index 0000000000..334bea7eb0
@@ -0,0 +1,44 @@
+From 5f26eaf8d7be760fafe11ef4a6e0f907e7e8c3f0 Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <[email protected]>
+Date: Mon, 10 Jan 2022 23:17:45 +0100
+Subject: [PATCH] Makefile: add DISABLE_WERROR
+
+Allow the user to disable -Werror to avoid the following build failure
+with gcc 4.8 raised since version 0.6.0 and
+https://github.com/intel/tinycbor/commit/e2a4ed135c4d9101c4df83f2dd033cd249b6ef07:
+
+/home/buildroot/autobuild/instance-1/output-1/host/bin/arm-none-linux-gnueabi-gcc -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -I./src -std=gnu99 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -Os -g0 -D_FORTIFY_SOURCE=1 -Werror=incompatible-pointer-types -Werror=implicit-function-declaration -Werror=int-conversion -fPIC  -c -o src/cborerrorstrings.pic.o src/cborerrorstrings.c
+cc1: error: -Werror=incompatible-pointer-types: no option -Wincompatible-pointer-types
+cc1: error: -Werror=int-conversion: no option -Wint-conversion
+
+Fixes:
+ - http://autobuild.buildroot.org/results/a9f/a9fe64c42bb96f9e7b4af3050464f6570c1c00fa
+
+Signed-off-by: Fabrice Fontaine <[email protected]>
+[Retrieved from:
+https://github.com/intel/tinycbor/commit/5f26eaf8d7be760fafe11ef4a6e0f907e7e8c3f0]
+---
+ Makefile | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index 6492ea16..3cde2b3d 100644
+--- a/Makefile
++++ b/Makefile
+@@ -236,10 +236,15 @@ tag: distcheck
+ .SECONDARY:
+
+ cflags := $(CPPFLAGS) -I$(SRCDIR)src
+-cflags += -std=gnu99 $(CFLAGS) \
++cflags += -std=gnu99 $(CFLAGS)
++
++ifneq ($(DISABLE_WERROR),1)
++cflags += \
+ 	-Werror=incompatible-pointer-types \
+ 	-Werror=implicit-function-declaration \
+ 	-Werror=int-conversion
++endif
++
+ %.o: %.c
+ 	@test -d $(@D) || $(MKDIR) $(@D)
+ 	$(CC) $(cflags) $($(basename $(notdir $@))_CCFLAGS) -c -o $@ $<
package/tinycbor/tinycbor.mk +0 -0
index bf6e8e4c1e..cad50e633b 100644

package/tinycbor/tinycbor.mk ifeq ($(BR2_PACKAGE_CJSON),y) · line 22

Quoted 8 lines
package/tinycbor/tinycbor.mk +1 -1
@@ -16,7 +16,7 @@ ifeq ($(BR2_PACKAGE_CJSON),y)
  TINYCBOR_DEPENDENCIES += cjson
  endif
 
-TINYCBOR_MAKE_OPTS = $(TARGET_CONFIGURE_OPTS) V=1
+TINYCBOR_MAKE_OPTS = $(TARGET_CONFIGURE_OPTS) DISABLE_WERROR=1 V=1
 
  ifeq ($(BR2_STATIC_LIBS),y)
  TINYCBOR_MAKE_OPTS += BUILD_STATIC=1 BUILD_SHARED=0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot