summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-extended/beep
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2023-11-13 17:40:37 -0800
committerKhem Raj <raj.khem@gmail.com>2023-11-13 22:49:05 -0800
commit95e5244055f579ba362fbb1e5c8844628e512eb2 (patch)
tree3e1811f8ca01688f3f05419185ccb551c1fbe84d /meta-oe/recipes-extended/beep
parent612d853087dd71d39bd9a9cc032f32f7a9b570f5 (diff)
downloadmeta-openembedded-95e5244055f579ba362fbb1e5c8844628e512eb2.tar.gz
beep: Upgrade to 1.4.12
Fix build with clang while here, need to disable Werror as newer compilers find more warnings. Do not save intermediate objects and disable ubsan, we do not build runtime for it by defaults Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-extended/beep')
-rw-r--r--meta-oe/recipes-extended/beep/beep_1.4.12.bb (renamed from meta-oe/recipes-extended/beep/beep_1.4.9.bb)19
-rw-r--r--meta-oe/recipes-extended/beep/files/0001-Do-not-use-Werror-as-it-fails-with-newer-clang-11.patch63
-rw-r--r--meta-oe/recipes-extended/beep/files/0001-beep-library-Make-it-compatible-with-c99.patch78
3 files changed, 81 insertions, 79 deletions
diff --git a/meta-oe/recipes-extended/beep/beep_1.4.9.bb b/meta-oe/recipes-extended/beep/beep_1.4.12.bb
index ec62f3187..a4bc10c36 100644
--- a/meta-oe/recipes-extended/beep/beep_1.4.9.bb
+++ b/meta-oe/recipes-extended/beep/beep_1.4.12.bb
@@ -8,24 +8,11 @@ LICENSE = "GPL-2.0-or-later"
8LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" 8LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
9 9
10SRC_URI = "git://github.com/spkr-beep/beep.git;protocol=https;branch=master \ 10SRC_URI = "git://github.com/spkr-beep/beep.git;protocol=https;branch=master \
11 file://0001-Do-not-use-Werror-as-it-fails-with-newer-clang-11.patch \ 11 file://0001-beep-library-Make-it-compatible-with-c99.patch"
12" 12SRCREV = "11453a79f2cea81832329b06ca3a284aa7a0a52e"
13SRCREV = "8b85ddd09f73b9fd7caa5679298781a57af194ac"
14S = "${WORKDIR}/git" 13S = "${WORKDIR}/git"
15 14
16EXTRA_OEMAKE = " \ 15EXTRA_OEMAKE = "prefix='${prefix}' CFLAGS='${CFLAGS}' LDFLAGS='${LDFLAGS}'"
17 COMPILER_gcc='${CC}' \
18 LINKER_gcc='${CC}' \
19 COMPILER_clang=no \
20 LINKER_clang=no \
21"
22
23EXTRA_OEMAKE:toolchain-clang = " \
24 COMPILER_clang='${CC}' \
25 LINKER_clang='${CC}' \
26 COMPILER_gcc=no \
27 LINKER_gcc=no \
28"
29 16
30do_install() { 17do_install() {
31 oe_runmake install DESTDIR='${D}' 18 oe_runmake install DESTDIR='${D}'
diff --git a/meta-oe/recipes-extended/beep/files/0001-Do-not-use-Werror-as-it-fails-with-newer-clang-11.patch b/meta-oe/recipes-extended/beep/files/0001-Do-not-use-Werror-as-it-fails-with-newer-clang-11.patch
deleted file mode 100644
index ba7681b98..000000000
--- a/meta-oe/recipes-extended/beep/files/0001-Do-not-use-Werror-as-it-fails-with-newer-clang-11.patch
+++ /dev/null
@@ -1,63 +0,0 @@
1From 6b33adfa438e35b6a37cfb0364274370ef4f9fc1 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 23 Dec 2020 18:00:59 +0000
4Subject: [PATCH] Do not use -Werror as it fails with newer clang 11+
5
6Upstream-Status: Pending
7Signed-off-by: Khem Raj <raj.khem@gmail.com>
8---
9 GNUmakefile | 1 -
10 1 file changed, 1 deletion(-)
11
12--- a/GNUmakefile
13+++ b/GNUmakefile
14@@ -91,12 +91,13 @@ comma := ,
15 # If supported by COMPILER_gcc, add given flags to CFLAGS_gcc.
16 # Example usage:
17 # $(eval $(call CHECK_CFLAGS_gcc,-fasynchronous-unwind-tables))
18-define CHECK_CFLAGS_gcc
19-CFLAGS_gcc += $$(if $$(shell if $$(COMPILER_gcc) $(1) -x c -o compile-check.gcc-o -c - < /dev/null > /dev/null 2>&1; then echo yes; else :; fi; rm -f compile-check.gcc-o > /dev/null 2>&1),$(1))
20-endef
21
22 COMPILER_gcc = gcc
23 LINKER_gcc = gcc
24+ifneq ($(COMPILER_gcc),no)
25+define CHECK_CFLAGS_gcc
26+CFLAGS_gcc += $$(if $$(shell if $$(COMPILER_gcc) $(1) -x c -o compile-check.gcc-o -c - < /dev/null > /dev/null 2>&1; then echo yes; else :; fi; rm -f compile-check.gcc-o > /dev/null 2>&1),$(1))
27+endef
28 CPPFLAGS_gcc =
29 CFLAGS_gcc =
30 CFLAGS_gcc += -std=gnu99 -pedantic
31@@ -113,30 +114,24 @@ CFLAGS_gcc += -save-temps=obj
32 LDFLAGS_gcc =
33 LIBS_gcc =
34
35-ifneq ($(call pathsearch,$(COMPILER_gcc)),)
36-ifneq ($(COMPILER_gcc)),no)
37 COMPILERS += gcc
38 endif
39-endif
40
41 COMPILER_clang = clang
42 LINKER_clang = clang
43+
44+ifneq ($(COMPILER_clang),no)
45 CPPFLAGS_clang =
46 CFLAGS_clang += -Wall -Wextra
47 CFLAGS_clang += -Weverything
48 CFLAGS_clang += -Wno-padded
49 CFLAGS_clang += -std=gnu99 -pedantic
50-CFLAGS_clang += -Werror
51-CFLAGS_clang += -fsanitize=undefined
52 CFLAGS_clang += -O -g
53 LDFLAGS_clang =
54 LIBS_clang =
55
56-ifneq ($(call pathsearch,$(COMPILER_clang)),)
57-ifneq ($(COMPILER_clang),no)
58 COMPILERS += clang
59 endif
60-endif
61
62
63 ########################################################################
diff --git a/meta-oe/recipes-extended/beep/files/0001-beep-library-Make-it-compatible-with-c99.patch b/meta-oe/recipes-extended/beep/files/0001-beep-library-Make-it-compatible-with-c99.patch
new file mode 100644
index 000000000..240e075a8
--- /dev/null
+++ b/meta-oe/recipes-extended/beep/files/0001-beep-library-Make-it-compatible-with-c99.patch
@@ -0,0 +1,78 @@
1From 66b06e03fc25a168e06c7af5ccccc3162ddbf92a Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Mon, 13 Nov 2023 17:18:55 -0800
4Subject: [PATCH] beep-library: Make it compatible with < c99
5
6Upstream-Status: Pending
7Signed-off-by: Khem Raj <raj.khem@gmail.com>
8---
9 beep-library.c | 9 +++++----
10 1 file changed, 5 insertions(+), 4 deletions(-)
11
12--- a/beep-library.c
13+++ b/beep-library.c
14@@ -44,7 +44,7 @@
15 int open_checked_char_device(const char *const device_name)
16 {
17 struct stat sb;
18-
19+ int fd = -1;
20 if (-1 == stat(device_name, &sb)) {
21 LOG_VERBOSE("could not stat(2) %s: %s",
22 device_name, strerror(errno));
23@@ -57,7 +57,7 @@ int open_checked_char_device(const char
24 return -1;
25 }
26
27- const int fd = open(device_name, O_WRONLY);
28+ fd = open(device_name, O_WRONLY);
29 if (fd == -1) {
30 LOG_VERBOSE("could not open(2) %s: %s",
31 device_name, strerror(errno));
32@@ -90,6 +90,7 @@ void safe_error_exit(const char *const m
33 {
34 const int saved_errno = errno;
35 char strerr_buf[128];
36+ size_t errlen, msglen;
37 const int ret = strerror_r(saved_errno, strerr_buf, sizeof(strerr_buf));
38 if (ret != 0) {
39 if (write(STDERR_FILENO, "strerror_r error\n",
40@@ -98,14 +99,14 @@ void safe_error_exit(const char *const m
41 }
42 _exit(EXIT_FAILURE);
43 }
44- const size_t msglen = strlen(msg);
45+ msglen = strlen(msg);
46 if (write(STDERR_FILENO, msg, msglen)) {
47 /* ignore all write errors */
48 }
49 if (write(STDERR_FILENO, ": ", 2)) {
50 /* ignore all write errors */
51 }
52- const size_t errlen = strlen(strerr_buf);
53+ errlen = strlen(strerr_buf);
54 if (write(STDERR_FILENO, strerr_buf, errlen)) {
55 /* ignore all write errors */
56 }
57--- a/GNUmakefile
58+++ b/GNUmakefile
59@@ -155,7 +155,6 @@ $(eval $(call CHECK_CFLAGS,common_CFLAGS
60 $(eval $(call CHECK_CFLAGS,common_CFLAGS,-Wall))
61 $(eval $(call CHECK_CFLAGS,common_CFLAGS,-Wextra))
62 $(eval $(call CHECK_CFLAGS,common_CFLAGS,-Weverything))
63-$(eval $(call CHECK_CFLAGS,common_CFLAGS,-Werror))
64 $(eval $(call CHECK_CFLAGS,common_CFLAGS,-Wno-padded))
65 $(eval $(call CHECK_CFLAGS,common_CFLAGS,-Werror=format-security))
66 $(eval $(call CHECK_CFLAGS,common_CFLAGS,-Wno-disabled-macro-expansion))
67@@ -169,11 +168,6 @@ $(eval $(call CHECK_CFLAGS,CFLAGS,-fanal
68 $(eval $(call CHECK_CFLAGS,CFLAGS,-fstack-protector-strong))
69 $(eval $(call CHECK_CFLAGS,CFLAGS,-fstack-clash-protection))
70 $(eval $(call CHECK_CFLAGS,CFLAGS,-fcf-protection))
71-$(eval $(call CHECK_CFLAGS,CFLAGS,-fsanitize=undefined))
72-
73-
74-CFLAGS += -save-temps=obj
75-
76
77 $(info # common_CFLAGS=$(common_CFLAGS))
78 $(info # CFLAGS=$(CFLAGS))