All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-oe][PATCH v3] beep: Update to 1.4.9 in new repository
@ 2020-12-24  6:59 Khem Raj
  2020-12-24  6:59 ` [meta-oe][PATCH v3] xrdp: Upgrade to 0.9.14 Khem Raj
  2021-01-09 17:02 ` [meta-oe][PATCH v3] beep: Update to 1.4.9 in new repository Mark Jonas
  0 siblings, 2 replies; 6+ messages in thread
From: Khem Raj @ 2020-12-24  6:59 UTC (permalink / raw)
  To: openembedded-devel; +Cc: Mark Jonas, Khem Raj

From: Mark Jonas <toertel@gmail.com>

The previous version 1.2.2 of beep was provided by
http://johnath.com/beep and was released in 2002. The latest version 1.3
was released 2010-07-13. On https://github.com/johnath/beep the
development stopped 2013-02-07.

In 2018 a developer worked on fixing CVE-2018-1000532 and realized that
fixing this would be more than just a simple patch. Because the original
repository was unmaintained for several years he created
https://github.com/spkr-beep/beep as the new home for beep.

Debian switched to the new beep with Buster.
    https://packages.debian.org/buster/beep

Alpine 3.11, Arch Linux, Fedora, and Ubuntu 20.04 also switched to the
same new beep.

Fix build with clang

Signed-off-by: Mark Jonas <toertel@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
v2: Fix build with clang
v3: Do not build with both clang and gcc

 meta-oe/recipes-extended/beep/beep_1.2.2.bb   | 25 --------
 meta-oe/recipes-extended/beep/beep_1.4.9.bb   | 32 ++++++++++
 ...rror-as-it-fails-with-newer-clang-11.patch | 63 +++++++++++++++++++
 3 files changed, 95 insertions(+), 25 deletions(-)
 delete mode 100644 meta-oe/recipes-extended/beep/beep_1.2.2.bb
 create mode 100644 meta-oe/recipes-extended/beep/beep_1.4.9.bb
 create mode 100644 meta-oe/recipes-extended/beep/files/0001-Do-not-use-Werror-as-it-fails-with-newer-clang-11.patch

diff --git a/meta-oe/recipes-extended/beep/beep_1.2.2.bb b/meta-oe/recipes-extended/beep/beep_1.2.2.bb
deleted file mode 100644
index cafc869645..0000000000
--- a/meta-oe/recipes-extended/beep/beep_1.2.2.bb
+++ /dev/null
@@ -1,25 +0,0 @@
-DESCRIPTION = "beep is a command line tool for linux that beeps the PC speaker"
-LICENSE = "GPL-2.0"
-LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3"
-
-SRC_URI = "\
-    http://johnath.com/beep/beep-${PV}.tar.gz \
-    file://linux-input.patch \
-"
-
-SRC_URI[sha256sum] = "5c0445dac43950b7c7c3f235c6fb21f620ab3fd2f3aafaf09896e5730fcf49a1"
-
-S = "${WORKDIR}/${BPN}-${PV}"
-
-EXTRA_OEMAKE += 'CC="${CC}"'
-EXTRA_OEMAKE += 'FLAGS="${CFLAGS} ${LDFLAGS}"'
-
-do_configure[noexec] = "1"
-
-do_compile() {
-   oe_runmake
-}
-
-do_install() {
-	install -Dm 0755 ${B}/${PN} ${D}${bindir}/${PN}
-}
diff --git a/meta-oe/recipes-extended/beep/beep_1.4.9.bb b/meta-oe/recipes-extended/beep/beep_1.4.9.bb
new file mode 100644
index 0000000000..8d332b2faf
--- /dev/null
+++ b/meta-oe/recipes-extended/beep/beep_1.4.9.bb
@@ -0,0 +1,32 @@
+SUMMARY = "beep allows you to have the PC speaker issue beeps and beep patterns"
+DESCRIPTION = "beep allows you to have the PC speaker issue beeps and beep \
+patterns with given frequencies, durations, and spacing."
+HOMEPAGE = "https://github.com/spkr-beep/beep"
+BUGTRACKER = "https://github.com/spkr-beep/beep/issues"
+
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
+
+SRC_URI = "git://github.com/spkr-beep/beep.git;protocol=https \
+           file://0001-Do-not-use-Werror-as-it-fails-with-newer-clang-11.patch \
+"
+SRCREV = "8b85ddd09f73b9fd7caa5679298781a57af194ac"
+S = "${WORKDIR}/git"
+
+EXTRA_OEMAKE = " \
+    COMPILER_gcc='${CC}' \
+    LINKER_gcc='${CC}' \
+    COMPILER_clang=no \
+    LINKER_clang=no \
+"
+
+EXTRA_OEMAKE_toolchain-clang = " \
+    COMPILER_clang='${CC}' \
+    LINKER_clang='${CC}' \
+    COMPILER_gcc=no \
+    LINKER_gcc=no \
+"
+
+do_install() {
+    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
new file mode 100644
index 0000000000..ba7681b983
--- /dev/null
+++ b/meta-oe/recipes-extended/beep/files/0001-Do-not-use-Werror-as-it-fails-with-newer-clang-11.patch
@@ -0,0 +1,63 @@
+From 6b33adfa438e35b6a37cfb0364274370ef4f9fc1 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 23 Dec 2020 18:00:59 +0000
+Subject: [PATCH] Do not use -Werror as it fails with newer clang 11+
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ GNUmakefile | 1 -
+ 1 file changed, 1 deletion(-)
+
+--- a/GNUmakefile
++++ b/GNUmakefile
+@@ -91,12 +91,13 @@ comma := ,
+ # If supported by COMPILER_gcc, add given flags to CFLAGS_gcc.
+ # Example usage:
+ #   $(eval $(call CHECK_CFLAGS_gcc,-fasynchronous-unwind-tables))
+-define CHECK_CFLAGS_gcc
+-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))
+-endef
+ 
+ COMPILER_gcc = gcc
+ LINKER_gcc = gcc
++ifneq ($(COMPILER_gcc),no)
++define CHECK_CFLAGS_gcc
++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))
++endef
+ CPPFLAGS_gcc =
+ CFLAGS_gcc =
+ CFLAGS_gcc += -std=gnu99 -pedantic
+@@ -113,30 +114,24 @@ CFLAGS_gcc += -save-temps=obj
+ LDFLAGS_gcc =
+ LIBS_gcc =
+ 
+-ifneq ($(call pathsearch,$(COMPILER_gcc)),)
+-ifneq ($(COMPILER_gcc)),no)
+ COMPILERS += gcc
+ endif
+-endif
+ 
+ COMPILER_clang = clang
+ LINKER_clang = clang
++
++ifneq ($(COMPILER_clang),no)
+ CPPFLAGS_clang =
+ CFLAGS_clang += -Wall -Wextra
+ CFLAGS_clang += -Weverything
+ CFLAGS_clang += -Wno-padded
+ CFLAGS_clang += -std=gnu99 -pedantic
+-CFLAGS_clang += -Werror
+-CFLAGS_clang += -fsanitize=undefined
+ CFLAGS_clang += -O -g
+ LDFLAGS_clang =
+ LIBS_clang =
+ 
+-ifneq ($(call pathsearch,$(COMPILER_clang)),)
+-ifneq ($(COMPILER_clang),no)
+ COMPILERS += clang
+ endif
+-endif
+ 
+ 
+ ########################################################################
-- 
2.29.2


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [meta-oe][PATCH v3] xrdp: Upgrade to 0.9.14
  2020-12-24  6:59 [meta-oe][PATCH v3] beep: Update to 1.4.9 in new repository Khem Raj
@ 2020-12-24  6:59 ` Khem Raj
  2021-01-09 17:02 ` [meta-oe][PATCH v3] beep: Update to 1.4.9 in new repository Mark Jonas
  1 sibling, 0 replies; 6+ messages in thread
From: Khem Raj @ 2020-12-24  6:59 UTC (permalink / raw)
  To: openembedded-devel; +Cc: Khem Raj

Drop redundant setting of PV in recipe
Fix build on riscv and musl
Do not install xrdp.sh, it does not exist anymore
Fix build with gcc 9+

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
v2: Fix build with riscv/musl
v3: Fix build with gcc9+

 ...-warnings-about-snprintf-truncations.patch | 28 +++++++++++++++++
 ...0001-correct-the-location-of-errno.h.patch | 30 +++++++++++++++++++
 ...esn-t-require-pointers-to-be-aligned.patch | 28 +++++++++++++++++
 .../xrdp/{xrdp_0.9.11.bb => xrdp_0.9.14.bb}   | 19 ++++++------
 4 files changed, 95 insertions(+), 10 deletions(-)
 create mode 100644 meta-oe/recipes-support/xrdp/xrdp/0001-Fixed-compiler-warnings-about-snprintf-truncations.patch
 create mode 100644 meta-oe/recipes-support/xrdp/xrdp/0001-correct-the-location-of-errno.h.patch
 create mode 100644 meta-oe/recipes-support/xrdp/xrdp/0001-riscv-doesn-t-require-pointers-to-be-aligned.patch
 rename meta-oe/recipes-support/xrdp/{xrdp_0.9.11.bb => xrdp_0.9.14.bb} (88%)

diff --git a/meta-oe/recipes-support/xrdp/xrdp/0001-Fixed-compiler-warnings-about-snprintf-truncations.patch b/meta-oe/recipes-support/xrdp/xrdp/0001-Fixed-compiler-warnings-about-snprintf-truncations.patch
new file mode 100644
index 0000000000..5b9315cfb4
--- /dev/null
+++ b/meta-oe/recipes-support/xrdp/xrdp/0001-Fixed-compiler-warnings-about-snprintf-truncations.patch
@@ -0,0 +1,28 @@
+From 9de23a9199d26e64ab6b5be2bb74f260200b2dc5 Mon Sep 17 00:00:00 2001
+From: matt335672 <30179339+matt335672@users.noreply.github.com>
+Date: Fri, 21 Aug 2020 12:20:31 +0100
+Subject: [PATCH] Fixed compiler warnings about snprintf truncations
+
+Upstream-Status: Backport [https://github.com/neutrinolabs/xrdp/pull/1659]
+---
+ common/log.c | 4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+diff --git a/common/log.c b/common/log.c
+index 4a0bd2f3..8686789d 100644
+--- a/common/log.c
++++ b/common/log.c
+@@ -555,9 +555,7 @@ log_message(const enum logLevels lvl, const char *msg, ...)
+     now_t = time(&now_t);
+     now = localtime(&now_t);
+ 
+-    snprintf(buff, 21, "[%.4d%.2d%.2d-%.2d:%.2d:%.2d] ", now->tm_year + 1900,
+-             now->tm_mon + 1, now->tm_mday, now->tm_hour, now->tm_min,
+-             now->tm_sec);
++    strftime(buff, 21, "[%Y%m%d-%H:%M:%S] ", now);
+ 
+     internal_log_lvl2str(lvl, buff + 20);
+ 
+-- 
+2.29.2
+
diff --git a/meta-oe/recipes-support/xrdp/xrdp/0001-correct-the-location-of-errno.h.patch b/meta-oe/recipes-support/xrdp/xrdp/0001-correct-the-location-of-errno.h.patch
new file mode 100644
index 0000000000..b06077bf02
--- /dev/null
+++ b/meta-oe/recipes-support/xrdp/xrdp/0001-correct-the-location-of-errno.h.patch
@@ -0,0 +1,30 @@
+From c8d3df40ece7d659ccc8212b18de916d28f4398a Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 22 Dec 2020 23:10:52 -0800
+Subject: [PATCH] correct the location of errno.h
+
+Fixes build on musl
+
+Upstream-Status: Submitted [https://github.com/neutrinolabs/xrdp/pull/1761]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ sesman/chansrv/sound.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/sesman/chansrv/sound.c b/sesman/chansrv/sound.c
+index b0480d33..45e17307 100644
+--- a/sesman/chansrv/sound.c
++++ b/sesman/chansrv/sound.c
+@@ -23,7 +23,7 @@
+ #include <stdio.h>
+ #include <sys/types.h>
+ #include <sys/socket.h>
+-#include <sys/errno.h>
++#include <errno.h>
+ #include <signal.h>
+ #include <sys/un.h>
+ 
+-- 
+2.29.2
+
diff --git a/meta-oe/recipes-support/xrdp/xrdp/0001-riscv-doesn-t-require-pointers-to-be-aligned.patch b/meta-oe/recipes-support/xrdp/xrdp/0001-riscv-doesn-t-require-pointers-to-be-aligned.patch
new file mode 100644
index 0000000000..4cd26df04c
--- /dev/null
+++ b/meta-oe/recipes-support/xrdp/xrdp/0001-riscv-doesn-t-require-pointers-to-be-aligned.patch
@@ -0,0 +1,28 @@
+From 229206aa5e55a6e26a074a54a1b50139ab794b36 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 22 Dec 2020 23:01:13 -0800
+Subject: [PATCH] riscv doesn't require pointers to be aligned
+
+Upstream-Status: Submitted [https://github.com/neutrinolabs/xrdp/pull/1761]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ common/arch.h | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/common/arch.h b/common/arch.h
+index ccccfa5a..8c2ac1a4 100644
+--- a/common/arch.h
++++ b/common/arch.h
+@@ -84,7 +84,8 @@ typedef int bool_t;
+ #define NEED_ALIGN
+ #elif defined(__x86__) || defined(__x86_64__) || \
+       defined(__AMD64__) || defined(_M_IX86) || defined (_M_AMD64) || \
+-      defined(__i386__) || defined(__aarch64__)
++      defined(__i386__) || defined(__aarch64__) || \
++      defined(__riscv)
+ #define NO_NEED_ALIGN
+ #else
+ #warning unknown arch
+-- 
+2.29.2
+
diff --git a/meta-oe/recipes-support/xrdp/xrdp_0.9.11.bb b/meta-oe/recipes-support/xrdp/xrdp_0.9.14.bb
similarity index 88%
rename from meta-oe/recipes-support/xrdp/xrdp_0.9.11.bb
rename to meta-oe/recipes-support/xrdp/xrdp_0.9.14.bb
index deda0fd1b5..078e23c6ed 100644
--- a/meta-oe/recipes-support/xrdp/xrdp_0.9.11.bb
+++ b/meta-oe/recipes-support/xrdp/xrdp_0.9.14.bb
@@ -10,15 +10,15 @@ DEPENDS = "openssl virtual/libx11 libxfixes libxrandr libpam nasm-native"
 
 REQUIRED_DISTRO_FEATURES = "x11 pam"
 
-SRC_URI = "git://github.com/neutrinolabs/xrdp.git \
+SRC_URI = "git://github.com/neutrinolabs/xrdp.git;branch=devel \
            file://xrdp.sysconfig \
            file://0001-Added-req_distinguished_name-in-etc-xrdp-openssl.con.patch \
            file://0001-Fix-the-compile-error.patch \
+           file://0001-riscv-doesn-t-require-pointers-to-be-aligned.patch \
+           file://0001-correct-the-location-of-errno.h.patch \
+           file://0001-Fixed-compiler-warnings-about-snprintf-truncations.patch \
            "
-
-SRCREV = "1e4b03eb3c9aa7173de251a328c93c073dcc0fca"
-
-PV = "0.9.11"
+SRCREV = "1469d659dbccd6d042ac44f0afc4e1309788dc9d"
 
 S = "${WORKDIR}/git"
 
@@ -52,15 +52,15 @@ do_compile_prepend() {
 
 
 do_install_append() {
-	install -d ${D}${sysconfdir} 
+	install -d ${D}${sysconfdir}
 	install -d ${D}${sysconfdir}/xrdp
 	install -d ${D}${sysconfdir}/xrdp/pam.d
 	install -d ${D}${sysconfdir}/sysconfig/xrdp
-   
+
 	# deal with systemd unit files
 	install -d ${D}${systemd_unitdir}/system
 	install -m 0644 ${S}/instfiles/xrdp.service.in ${D}${systemd_unitdir}/system/xrdp.service
-	install -m 0644 ${S}/instfiles/xrdp-sesman.service.in ${D}${systemd_unitdir}/system/xrdp-sesman.service 
+	install -m 0644 ${S}/instfiles/xrdp-sesman.service.in ${D}${systemd_unitdir}/system/xrdp-sesman.service
 	sed -i -e 's,@localstatedir@,${localstatedir},g' ${D}${systemd_unitdir}/system/xrdp.service ${D}${systemd_unitdir}/system/xrdp-sesman.service
 	sed -i -e 's,@sysconfdir@,${sysconfdir},g' ${D}${systemd_unitdir}/system/xrdp.service ${D}${systemd_unitdir}/system/xrdp-sesman.service
 	sed -i -e 's,@sbindir@,${sbindir},g' ${D}${systemd_unitdir}/system/xrdp.service ${D}${systemd_unitdir}/system/xrdp-sesman.service
@@ -70,7 +70,6 @@ do_install_append() {
 	install -m 0644 ${S}/sesman/startwm.sh ${D}${sysconfdir}/xrdp/
 	install -m 0644 ${S}/xrdp/xrdp.ini.in ${D}${sysconfdir}/xrdp/
 	install -m 0644 ${S}/xrdp/xrdp_keyboard.ini ${D}${sysconfdir}/xrdp/
-	install -m 0644 ${S}/instfiles/xrdp.sh ${D}${sysconfdir}/xrdp/
 	install -m 0644 ${S}/keygen/openssl.conf ${D}${sysconfdir}/xrdp/
 	install -m 0644 ${WORKDIR}/xrdp.sysconfig ${D}${sysconfdir}/sysconfig/xrdp/
 	chown xrdp:xrdp ${D}${sysconfdir}/xrdp
@@ -92,6 +91,6 @@ pkg_postinst_${PN}() {
 			-out ${sysconfdir}/xrdp/cert.pem \
 			-config ${sysconfdir}/xrdp/openssl.conf >/dev/null 2>&1
 			chmod 400 ${sysconfdir}/xrdp/key.pem
-		fi			
+		fi
         fi
 }
-- 
2.29.2


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [meta-oe][PATCH v3] beep: Update to 1.4.9 in new repository
  2020-12-24  6:59 [meta-oe][PATCH v3] beep: Update to 1.4.9 in new repository Khem Raj
  2020-12-24  6:59 ` [meta-oe][PATCH v3] xrdp: Upgrade to 0.9.14 Khem Raj
@ 2021-01-09 17:02 ` Mark Jonas
  2021-01-09 18:40   ` Khem Raj
  1 sibling, 1 reply; 6+ messages in thread
From: Mark Jonas @ 2021-01-09 17:02 UTC (permalink / raw)
  To: Khem Raj; +Cc: openembeded-devel

Hi Khem,

I wanted to create a patch for beep's mainline so it could be used in
meta-openembedded without your patch. That is, what hinders
compilation with Clang 11 and -Werror. To my astonishment the
unmodified beep v1.4.9 compiles just fine with clang-11 from
https://apt.llvm.org/ on Ubuntu 20.04. And it definitely fails when
building with meta-clang without your patch.

What is the difference between the two Clangs?

I have to admit that this is the first time I used clang.

$ clang-11 --version
Ubuntu clang version
11.0.1-++20201218093155+43ff75f2c3fe-1~exp1~20201218203809.158
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin

$ make COMPILER_gcc=no COMPILER_clang=clang-11 LINKER_clang=clang-11
/bin/sed  -e s/@PACKAGE_TARNAME@/beep/g -e s/@PACKAGE_VERSION@/1.4.9/g
-e s/@DEFAULT_FREQ@/440/g -e s/@DEFAULT_LENGTH@/200/g -e
s/@DEFAULT_DELAY@/100/g -e 's|[@]pkgdocdir@|/usr/share/doc/beep|g' <
beep-config.h.in > beep-config.h.new
mv -f beep-config.h.new beep-config.h
clang-11 -MT beep-main.clang-o -MMD -MP -MF
.deps/beep-main.clang-o.dep   -DPACKAGE_TARNAME='"beep"'
-DPACKAGE_VERSION='"1.4.9"'    -Wall -Wextra -Weverything -Wno-padded
-std=gnu99 -pedantic -Werror -fsanitize=undefined -O -g -o
beep-main.clang-o -c beep-main.c
/bin/sed  -e s/@PACKAGE_TARNAME@/beep/g -e s/@PACKAGE_VERSION@/1.4.9/g
-e s/@DEFAULT_FREQ@/440/g -e s/@DEFAULT_LENGTH@/200/g -e
s/@DEFAULT_DELAY@/100/g -e 's|[@]pkgdocdir@|/usr/share/doc/beep|g' <
beep-usage.txt.in > beep-usage.txt.new
mv -f beep-usage.txt.new beep-usage.txt
echo '/* Auto-generated from `beep-usage.txt`. Modify that file
instead. */' > beep-usage.c
echo '#include "beep-usage.h"' >> beep-usage.c
echo 'char beep_usage[] =' >> beep-usage.c
set -e; IFS=""; while read line; do \
    printf '  "%s\\n"\n' "${line}" >> beep-usage.c; \
done < beep-usage.txt
echo '  ;' >> beep-usage.c
clang-11 -MT beep-usage.clang-o -MMD -MP -MF
.deps/beep-usage.clang-o.dep   -DPACKAGE_TARNAME='"beep"'
-DPACKAGE_VERSION='"1.4.9"'    -Wall -Wextra -Weverything -Wno-padded
-std=gnu99 -pedantic -Werror -fsanitize=undefined -O -g -o
beep-usage.clang-o -c beep-usage.c
clang-11  -Wall -Wextra -Weverything -Wno-padded -std=gnu99 -pedantic
-Werror -fsanitize=undefined -O -g   -o beep.clang beep-log.clang-o
beep-main.clang-o beep-library.clang-o beep-usage.clang-o
beep-drivers.clang-o beep-driver-console.clang-o
beep-driver-evdev.clang-o
cp -f beep.clang beep
/bin/sed  -e s/@PACKAGE_TARNAME@/beep/g -e s/@PACKAGE_VERSION@/1.4.9/g
-e s/@DEFAULT_FREQ@/440/g -e s/@DEFAULT_LENGTH@/200/g -e
s/@DEFAULT_DELAY@/100/g -e 's|[@]pkgdocdir@|/usr/share/doc/beep|g' <
beep.1.in > beep.1.new
mv -f beep.1.new beep.1

Cheers,
Mark

On Thu, Dec 24, 2020 at 7:59 AM Khem Raj <raj.khem@gmail.com> wrote:
>
> From: Mark Jonas <toertel@gmail.com>
>
> The previous version 1.2.2 of beep was provided by
> http://johnath.com/beep and was released in 2002. The latest version 1.3
> was released 2010-07-13. On https://github.com/johnath/beep the
> development stopped 2013-02-07.
>
> In 2018 a developer worked on fixing CVE-2018-1000532 and realized that
> fixing this would be more than just a simple patch. Because the original
> repository was unmaintained for several years he created
> https://github.com/spkr-beep/beep as the new home for beep.
>
> Debian switched to the new beep with Buster.
>     https://packages.debian.org/buster/beep
>
> Alpine 3.11, Arch Linux, Fedora, and Ubuntu 20.04 also switched to the
> same new beep.
>
> Fix build with clang
>
> Signed-off-by: Mark Jonas <toertel@gmail.com>
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> ---
> v2: Fix build with clang
> v3: Do not build with both clang and gcc
>
>  meta-oe/recipes-extended/beep/beep_1.2.2.bb   | 25 --------
>  meta-oe/recipes-extended/beep/beep_1.4.9.bb   | 32 ++++++++++
>  ...rror-as-it-fails-with-newer-clang-11.patch | 63 +++++++++++++++++++
>  3 files changed, 95 insertions(+), 25 deletions(-)
>  delete mode 100644 meta-oe/recipes-extended/beep/beep_1.2.2.bb
>  create mode 100644 meta-oe/recipes-extended/beep/beep_1.4.9.bb
>  create mode 100644 meta-oe/recipes-extended/beep/files/0001-Do-not-use-Werror-as-it-fails-with-newer-clang-11.patch
>
> diff --git a/meta-oe/recipes-extended/beep/beep_1.2.2.bb b/meta-oe/recipes-extended/beep/beep_1.2.2.bb
> deleted file mode 100644
> index cafc869645..0000000000
> --- a/meta-oe/recipes-extended/beep/beep_1.2.2.bb
> +++ /dev/null
> @@ -1,25 +0,0 @@
> -DESCRIPTION = "beep is a command line tool for linux that beeps the PC speaker"
> -LICENSE = "GPL-2.0"
> -LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3"
> -
> -SRC_URI = "\
> -    http://johnath.com/beep/beep-${PV}.tar.gz \
> -    file://linux-input.patch \
> -"
> -
> -SRC_URI[sha256sum] = "5c0445dac43950b7c7c3f235c6fb21f620ab3fd2f3aafaf09896e5730fcf49a1"
> -
> -S = "${WORKDIR}/${BPN}-${PV}"
> -
> -EXTRA_OEMAKE += 'CC="${CC}"'
> -EXTRA_OEMAKE += 'FLAGS="${CFLAGS} ${LDFLAGS}"'
> -
> -do_configure[noexec] = "1"
> -
> -do_compile() {
> -   oe_runmake
> -}
> -
> -do_install() {
> -       install -Dm 0755 ${B}/${PN} ${D}${bindir}/${PN}
> -}
> diff --git a/meta-oe/recipes-extended/beep/beep_1.4.9.bb b/meta-oe/recipes-extended/beep/beep_1.4.9.bb
> new file mode 100644
> index 0000000000..8d332b2faf
> --- /dev/null
> +++ b/meta-oe/recipes-extended/beep/beep_1.4.9.bb
> @@ -0,0 +1,32 @@
> +SUMMARY = "beep allows you to have the PC speaker issue beeps and beep patterns"
> +DESCRIPTION = "beep allows you to have the PC speaker issue beeps and beep \
> +patterns with given frequencies, durations, and spacing."
> +HOMEPAGE = "https://github.com/spkr-beep/beep"
> +BUGTRACKER = "https://github.com/spkr-beep/beep/issues"
> +
> +LICENSE = "GPLv2+"
> +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
> +
> +SRC_URI = "git://github.com/spkr-beep/beep.git;protocol=https \
> +           file://0001-Do-not-use-Werror-as-it-fails-with-newer-clang-11.patch \
> +"
> +SRCREV = "8b85ddd09f73b9fd7caa5679298781a57af194ac"
> +S = "${WORKDIR}/git"
> +
> +EXTRA_OEMAKE = " \
> +    COMPILER_gcc='${CC}' \
> +    LINKER_gcc='${CC}' \
> +    COMPILER_clang=no \
> +    LINKER_clang=no \
> +"
> +
> +EXTRA_OEMAKE_toolchain-clang = " \
> +    COMPILER_clang='${CC}' \
> +    LINKER_clang='${CC}' \
> +    COMPILER_gcc=no \
> +    LINKER_gcc=no \
> +"
> +
> +do_install() {
> +    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
> new file mode 100644
> index 0000000000..ba7681b983
> --- /dev/null
> +++ b/meta-oe/recipes-extended/beep/files/0001-Do-not-use-Werror-as-it-fails-with-newer-clang-11.patch
> @@ -0,0 +1,63 @@
> +From 6b33adfa438e35b6a37cfb0364274370ef4f9fc1 Mon Sep 17 00:00:00 2001
> +From: Khem Raj <raj.khem@gmail.com>
> +Date: Wed, 23 Dec 2020 18:00:59 +0000
> +Subject: [PATCH] Do not use -Werror as it fails with newer clang 11+
> +
> +Upstream-Status: Pending
> +Signed-off-by: Khem Raj <raj.khem@gmail.com>
> +---
> + GNUmakefile | 1 -
> + 1 file changed, 1 deletion(-)
> +
> +--- a/GNUmakefile
> ++++ b/GNUmakefile
> +@@ -91,12 +91,13 @@ comma := ,
> + # If supported by COMPILER_gcc, add given flags to CFLAGS_gcc.
> + # Example usage:
> + #   $(eval $(call CHECK_CFLAGS_gcc,-fasynchronous-unwind-tables))
> +-define CHECK_CFLAGS_gcc
> +-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))
> +-endef
> +
> + COMPILER_gcc = gcc
> + LINKER_gcc = gcc
> ++ifneq ($(COMPILER_gcc),no)
> ++define CHECK_CFLAGS_gcc
> ++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))
> ++endef
> + CPPFLAGS_gcc =
> + CFLAGS_gcc =
> + CFLAGS_gcc += -std=gnu99 -pedantic
> +@@ -113,30 +114,24 @@ CFLAGS_gcc += -save-temps=obj
> + LDFLAGS_gcc =
> + LIBS_gcc =
> +
> +-ifneq ($(call pathsearch,$(COMPILER_gcc)),)
> +-ifneq ($(COMPILER_gcc)),no)
> + COMPILERS += gcc
> + endif
> +-endif
> +
> + COMPILER_clang = clang
> + LINKER_clang = clang
> ++
> ++ifneq ($(COMPILER_clang),no)
> + CPPFLAGS_clang =
> + CFLAGS_clang += -Wall -Wextra
> + CFLAGS_clang += -Weverything
> + CFLAGS_clang += -Wno-padded
> + CFLAGS_clang += -std=gnu99 -pedantic
> +-CFLAGS_clang += -Werror
> +-CFLAGS_clang += -fsanitize=undefined
> + CFLAGS_clang += -O -g
> + LDFLAGS_clang =
> + LIBS_clang =
> +
> +-ifneq ($(call pathsearch,$(COMPILER_clang)),)
> +-ifneq ($(COMPILER_clang),no)
> + COMPILERS += clang
> + endif
> +-endif
> +
> +
> + ########################################################################
> --
> 2.29.2
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [meta-oe][PATCH v3] beep: Update to 1.4.9 in new repository
  2021-01-09 17:02 ` [meta-oe][PATCH v3] beep: Update to 1.4.9 in new repository Mark Jonas
@ 2021-01-09 18:40   ` Khem Raj
  2021-01-09 19:12     ` Mark Jonas
  0 siblings, 1 reply; 6+ messages in thread
From: Khem Raj @ 2021-01-09 18:40 UTC (permalink / raw)
  To: Mark Jonas; +Cc: openembeded-devel

[-- Attachment #1: Type: text/plain, Size: 9748 bytes --]

This patch itself should be first upstreamed

On Sat, Jan 9, 2021 at 9:02 AM Mark Jonas <toertel@gmail.com> wrote:

> Hi Khem,
>
> I wanted to create a patch for beep's mainline so it could be used in
> meta-openembedded without your patch. That is, what hinders
> compilation with Clang 11 and -Werror. To my astonishment the
> unmodified beep v1.4.9 compiles just fine with clang-11 from
> https://apt.llvm.org/ on Ubuntu 20.04. And it definitely fails when
> building with meta-clang without your patch.
>
> What is the difference between the two Clangs?
>
> I have to admit that this is the first time I used clang.
>
> $ clang-11 --version
> Ubuntu clang version
> 11.0.1-++20201218093155+43ff75f2c3fe-1~exp1~20201218203809.158
> Target: x86_64-pc-linux-gnu
> Thread model: posix
> InstalledDir: /usr/bin
>
> $ make COMPILER_gcc=no COMPILER_clang=clang-11 LINKER_clang=clang-11
> /bin/sed  -e s/@PACKAGE_TARNAME@/beep/g -e s/@PACKAGE_VERSION@/1.4.9/g
> -e s/@DEFAULT_FREQ@/440/g -e s/@DEFAULT_LENGTH@/200/g -e
> s/@DEFAULT_DELAY@/100/g -e 's|[@]pkgdocdir@|/usr/share/doc/beep|g' <
> beep-config.h.in > beep-config.h.new
> mv -f beep-config.h.new beep-config.h
> clang-11 -MT beep-main.clang-o -MMD -MP -MF
> .deps/beep-main.clang-o.dep   -DPACKAGE_TARNAME='"beep"'
> -DPACKAGE_VERSION='"1.4.9"'    -Wall -Wextra -Weverything -Wno-padded
> -std=gnu99 -pedantic -Werror -fsanitize=undefined -O -g -o
> beep-main.clang-o -c beep-main.c
> /bin/sed  -e s/@PACKAGE_TARNAME@/beep/g -e s/@PACKAGE_VERSION@/1.4.9/g
> -e s/@DEFAULT_FREQ@/440/g -e s/@DEFAULT_LENGTH@/200/g -e
> s/@DEFAULT_DELAY@/100/g -e 's|[@]pkgdocdir@|/usr/share/doc/beep|g' <
> beep-usage.txt.in > beep-usage.txt.new
> mv -f beep-usage.txt.new beep-usage.txt
> echo '/* Auto-generated from `beep-usage.txt`. Modify that file
> instead. */' > beep-usage.c
> echo '#include "beep-usage.h"' >> beep-usage.c
> echo 'char beep_usage[] =' >> beep-usage.c
> set -e; IFS=""; while read line; do \
>     printf '  "%s\\n"\n' "${line}" >> beep-usage.c; \
> done < beep-usage.txt
> echo '  ;' >> beep-usage.c
> clang-11 -MT beep-usage.clang-o -MMD -MP -MF
> .deps/beep-usage.clang-o.dep   -DPACKAGE_TARNAME='"beep"'
> -DPACKAGE_VERSION='"1.4.9"'    -Wall -Wextra -Weverything -Wno-padded
> -std=gnu99 -pedantic -Werror -fsanitize=undefined -O -g -o
> beep-usage.clang-o -c beep-usage.c
> clang-11  -Wall -Wextra -Weverything -Wno-padded -std=gnu99 -pedantic
> -Werror -fsanitize=undefined -O -g   -o beep.clang beep-log.clang-o
> beep-main.clang-o beep-library.clang-o beep-usage.clang-o
> beep-drivers.clang-o beep-driver-console.clang-o
> beep-driver-evdev.clang-o
> cp -f beep.clang beep
> /bin/sed  -e s/@PACKAGE_TARNAME@/beep/g -e s/@PACKAGE_VERSION@/1.4.9/g
> -e s/@DEFAULT_FREQ@/440/g -e s/@DEFAULT_LENGTH@/200/g -e
> s/@DEFAULT_DELAY@/100/g -e 's|[@]pkgdocdir@|/usr/share/doc/beep|g' <
> beep.1.in > beep.1.new
> mv -f beep.1.new beep.1
>
> Cheers,
> Mark
>
> On Thu, Dec 24, 2020 at 7:59 AM Khem Raj <raj.khem@gmail.com> wrote:
> >
> > From: Mark Jonas <toertel@gmail.com>
> >
> > The previous version 1.2.2 of beep was provided by
> > http://johnath.com/beep and was released in 2002. The latest version 1.3
> > was released 2010-07-13. On https://github.com/johnath/beep the
> > development stopped 2013-02-07.
> >
> > In 2018 a developer worked on fixing CVE-2018-1000532 and realized that
> > fixing this would be more than just a simple patch. Because the original
> > repository was unmaintained for several years he created
> > https://github.com/spkr-beep/beep as the new home for beep.
> >
> > Debian switched to the new beep with Buster.
> >     https://packages.debian.org/buster/beep
> >
> > Alpine 3.11, Arch Linux, Fedora, and Ubuntu 20.04 also switched to the
> > same new beep.
> >
> > Fix build with clang
> >
> > Signed-off-by: Mark Jonas <toertel@gmail.com>
> > Signed-off-by: Khem Raj <raj.khem@gmail.com>
> > ---
> > v2: Fix build with clang
> > v3: Do not build with both clang and gcc
> >
> >  meta-oe/recipes-extended/beep/beep_1.2.2.bb   | 25 --------
> >  meta-oe/recipes-extended/beep/beep_1.4.9.bb   | 32 ++++++++++
> >  ...rror-as-it-fails-with-newer-clang-11.patch | 63 +++++++++++++++++++
> >  3 files changed, 95 insertions(+), 25 deletions(-)
> >  delete mode 100644 meta-oe/recipes-extended/beep/beep_1.2.2.bb
> >  create mode 100644 meta-oe/recipes-extended/beep/beep_1.4.9.bb
> >  create mode 100644
> meta-oe/recipes-extended/beep/files/0001-Do-not-use-Werror-as-it-fails-with-newer-clang-11.patch
> >
> > diff --git a/meta-oe/recipes-extended/beep/beep_1.2.2.bb
> b/meta-oe/recipes-extended/beep/beep_1.2.2.bb
> > deleted file mode 100644
> > index cafc869645..0000000000
> > --- a/meta-oe/recipes-extended/beep/beep_1.2.2.bb
> > +++ /dev/null
> > @@ -1,25 +0,0 @@
> > -DESCRIPTION = "beep is a command line tool for linux that beeps the PC
> speaker"
> > -LICENSE = "GPL-2.0"
> > -LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3"
> > -
> > -SRC_URI = "\
> > -    http://johnath.com/beep/beep-${PV}.tar.gz \
> > -    file://linux-input.patch \
> > -"
> > -
> > -SRC_URI[sha256sum] =
> "5c0445dac43950b7c7c3f235c6fb21f620ab3fd2f3aafaf09896e5730fcf49a1"
> > -
> > -S = "${WORKDIR}/${BPN}-${PV}"
> > -
> > -EXTRA_OEMAKE += 'CC="${CC}"'
> > -EXTRA_OEMAKE += 'FLAGS="${CFLAGS} ${LDFLAGS}"'
> > -
> > -do_configure[noexec] = "1"
> > -
> > -do_compile() {
> > -   oe_runmake
> > -}
> > -
> > -do_install() {
> > -       install -Dm 0755 ${B}/${PN} ${D}${bindir}/${PN}
> > -}
> > diff --git a/meta-oe/recipes-extended/beep/beep_1.4.9.bb
> b/meta-oe/recipes-extended/beep/beep_1.4.9.bb
> > new file mode 100644
> > index 0000000000..8d332b2faf
> > --- /dev/null
> > +++ b/meta-oe/recipes-extended/beep/beep_1.4.9.bb
> > @@ -0,0 +1,32 @@
> > +SUMMARY = "beep allows you to have the PC speaker issue beeps and beep
> patterns"
> > +DESCRIPTION = "beep allows you to have the PC speaker issue beeps and
> beep \
> > +patterns with given frequencies, durations, and spacing."
> > +HOMEPAGE = "https://github.com/spkr-beep/beep"
> > +BUGTRACKER = "https://github.com/spkr-beep/beep/issues"
> > +
> > +LICENSE = "GPLv2+"
> > +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
> > +
> > +SRC_URI = "git://github.com/spkr-beep/beep.git;protocol=https \
> > +
>  file://0001-Do-not-use-Werror-as-it-fails-with-newer-clang-11.patch \
> > +"
> > +SRCREV = "8b85ddd09f73b9fd7caa5679298781a57af194ac"
> > +S = "${WORKDIR}/git"
> > +
> > +EXTRA_OEMAKE = " \
> > +    COMPILER_gcc='${CC}' \
> > +    LINKER_gcc='${CC}' \
> > +    COMPILER_clang=no \
> > +    LINKER_clang=no \
> > +"
> > +
> > +EXTRA_OEMAKE_toolchain-clang = " \
> > +    COMPILER_clang='${CC}' \
> > +    LINKER_clang='${CC}' \
> > +    COMPILER_gcc=no \
> > +    LINKER_gcc=no \
> > +"
> > +
> > +do_install() {
> > +    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
> > new file mode 100644
> > index 0000000000..ba7681b983
> > --- /dev/null
> > +++
> b/meta-oe/recipes-extended/beep/files/0001-Do-not-use-Werror-as-it-fails-with-newer-clang-11.patch
> > @@ -0,0 +1,63 @@
> > +From 6b33adfa438e35b6a37cfb0364274370ef4f9fc1 Mon Sep 17 00:00:00 2001
> > +From: Khem Raj <raj.khem@gmail.com>
> > +Date: Wed, 23 Dec 2020 18:00:59 +0000
> > +Subject: [PATCH] Do not use -Werror as it fails with newer clang 11+
> > +
> > +Upstream-Status: Pending
> > +Signed-off-by: Khem Raj <raj.khem@gmail.com>
> > +---
> > + GNUmakefile | 1 -
> > + 1 file changed, 1 deletion(-)
> > +
> > +--- a/GNUmakefile
> > ++++ b/GNUmakefile
> > +@@ -91,12 +91,13 @@ comma := ,
> > + # If supported by COMPILER_gcc, add given flags to CFLAGS_gcc.
> > + # Example usage:
> > + #   $(eval $(call CHECK_CFLAGS_gcc,-fasynchronous-unwind-tables))
> > +-define CHECK_CFLAGS_gcc
> > +-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))
> > +-endef
> > +
> > + COMPILER_gcc = gcc
> > + LINKER_gcc = gcc
> > ++ifneq ($(COMPILER_gcc),no)
> > ++define CHECK_CFLAGS_gcc
> > ++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))
> > ++endef
> > + CPPFLAGS_gcc =
> > + CFLAGS_gcc =
> > + CFLAGS_gcc += -std=gnu99 -pedantic
> > +@@ -113,30 +114,24 @@ CFLAGS_gcc += -save-temps=obj
> > + LDFLAGS_gcc =
> > + LIBS_gcc =
> > +
> > +-ifneq ($(call pathsearch,$(COMPILER_gcc)),)
> > +-ifneq ($(COMPILER_gcc)),no)
> > + COMPILERS += gcc
> > + endif
> > +-endif
> > +
> > + COMPILER_clang = clang
> > + LINKER_clang = clang
> > ++
> > ++ifneq ($(COMPILER_clang),no)
> > + CPPFLAGS_clang =
> > + CFLAGS_clang += -Wall -Wextra
> > + CFLAGS_clang += -Weverything
> > + CFLAGS_clang += -Wno-padded
> > + CFLAGS_clang += -std=gnu99 -pedantic
> > +-CFLAGS_clang += -Werror
> > +-CFLAGS_clang += -fsanitize=undefined
> > + CFLAGS_clang += -O -g
> > + LDFLAGS_clang =
> > + LIBS_clang =
> > +
> > +-ifneq ($(call pathsearch,$(COMPILER_clang)),)
> > +-ifneq ($(COMPILER_clang),no)
> > + COMPILERS += clang
> > + endif
> > +-endif
> > +
> > +
> > +
> ########################################################################
> > --
> > 2.29.2
> >
>

[-- Attachment #2: Type: text/html, Size: 13594 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [meta-oe][PATCH v3] beep: Update to 1.4.9 in new repository
  2021-01-09 18:40   ` Khem Raj
@ 2021-01-09 19:12     ` Mark Jonas
  2021-01-09 20:16       ` Khem Raj
  0 siblings, 1 reply; 6+ messages in thread
From: Mark Jonas @ 2021-01-09 19:12 UTC (permalink / raw)
  To: Khem Raj; +Cc: openembeded-devel

Hi Khem,

> This patch itself should be first upstreamed

I had some doubts that removing -Werror would find love upstream.
That's why I started investigating which warning caused the
compilation to break. And then I realized that the upstream already
compiles just fine with Clang 11 from https://apt.llvm.org/ on Ubuntu
20.04.

Additionally, the removal of
    ifneq ($(call pathsearch,$(COMPILER_clang)),)
breaks the use of make without additional parameters and
auto-detection of the installed compilers. That's what I experienced
on Ubuntu with gcc before installing clang.

> On Sat, Jan 9, 2021 at 9:02 AM Mark Jonas <toertel@gmail.com> wrote:
>>
>> Hi Khem,
>>
>> I wanted to create a patch for beep's mainline so it could be used in
>> meta-openembedded without your patch. That is, what hinders
>> compilation with Clang 11 and -Werror. To my astonishment the
>> unmodified beep v1.4.9 compiles just fine with clang-11 from
>> https://apt.llvm.org/ on Ubuntu 20.04. And it definitely fails when
>> building with meta-clang without your patch.
>>
>> What is the difference between the two Clangs?
>>
>> I have to admit that this is the first time I used clang.
>>
>> $ clang-11 --version
>> Ubuntu clang version
>> 11.0.1-++20201218093155+43ff75f2c3fe-1~exp1~20201218203809.158
>> Target: x86_64-pc-linux-gnu
>> Thread model: posix
>> InstalledDir: /usr/bin
>>
>> $ make COMPILER_gcc=no COMPILER_clang=clang-11 LINKER_clang=clang-11
>> /bin/sed  -e s/@PACKAGE_TARNAME@/beep/g -e s/@PACKAGE_VERSION@/1.4.9/g
>> -e s/@DEFAULT_FREQ@/440/g -e s/@DEFAULT_LENGTH@/200/g -e
>> s/@DEFAULT_DELAY@/100/g -e 's|[@]pkgdocdir@|/usr/share/doc/beep|g' <
>> beep-config.h.in > beep-config.h.new
>> mv -f beep-config.h.new beep-config.h
>> clang-11 -MT beep-main.clang-o -MMD -MP -MF
>> .deps/beep-main.clang-o.dep   -DPACKAGE_TARNAME='"beep"'
>> -DPACKAGE_VERSION='"1.4.9"'    -Wall -Wextra -Weverything -Wno-padded
>> -std=gnu99 -pedantic -Werror -fsanitize=undefined -O -g -o
>> beep-main.clang-o -c beep-main.c
>> /bin/sed  -e s/@PACKAGE_TARNAME@/beep/g -e s/@PACKAGE_VERSION@/1.4.9/g
>> -e s/@DEFAULT_FREQ@/440/g -e s/@DEFAULT_LENGTH@/200/g -e
>> s/@DEFAULT_DELAY@/100/g -e 's|[@]pkgdocdir@|/usr/share/doc/beep|g' <
>> beep-usage.txt.in > beep-usage.txt.new
>> mv -f beep-usage.txt.new beep-usage.txt
>> echo '/* Auto-generated from `beep-usage.txt`. Modify that file
>> instead. */' > beep-usage.c
>> echo '#include "beep-usage.h"' >> beep-usage.c
>> echo 'char beep_usage[] =' >> beep-usage.c
>> set -e; IFS=""; while read line; do \
>>     printf '  "%s\\n"\n' "${line}" >> beep-usage.c; \
>> done < beep-usage.txt
>> echo '  ;' >> beep-usage.c
>> clang-11 -MT beep-usage.clang-o -MMD -MP -MF
>> .deps/beep-usage.clang-o.dep   -DPACKAGE_TARNAME='"beep"'
>> -DPACKAGE_VERSION='"1.4.9"'    -Wall -Wextra -Weverything -Wno-padded
>> -std=gnu99 -pedantic -Werror -fsanitize=undefined -O -g -o
>> beep-usage.clang-o -c beep-usage.c
>> clang-11  -Wall -Wextra -Weverything -Wno-padded -std=gnu99 -pedantic
>> -Werror -fsanitize=undefined -O -g   -o beep.clang beep-log.clang-o
>> beep-main.clang-o beep-library.clang-o beep-usage.clang-o
>> beep-drivers.clang-o beep-driver-console.clang-o
>> beep-driver-evdev.clang-o
>> cp -f beep.clang beep
>> /bin/sed  -e s/@PACKAGE_TARNAME@/beep/g -e s/@PACKAGE_VERSION@/1.4.9/g
>> -e s/@DEFAULT_FREQ@/440/g -e s/@DEFAULT_LENGTH@/200/g -e
>> s/@DEFAULT_DELAY@/100/g -e 's|[@]pkgdocdir@|/usr/share/doc/beep|g' <
>> beep.1.in > beep.1.new
>> mv -f beep.1.new beep.1
>>
>> Cheers,
>> Mark
>>
>> On Thu, Dec 24, 2020 at 7:59 AM Khem Raj <raj.khem@gmail.com> wrote:
>> >
>> > From: Mark Jonas <toertel@gmail.com>
>> >
>> > The previous version 1.2.2 of beep was provided by
>> > http://johnath.com/beep and was released in 2002. The latest version 1.3
>> > was released 2010-07-13. On https://github.com/johnath/beep the
>> > development stopped 2013-02-07.
>> >
>> > In 2018 a developer worked on fixing CVE-2018-1000532 and realized that
>> > fixing this would be more than just a simple patch. Because the original
>> > repository was unmaintained for several years he created
>> > https://github.com/spkr-beep/beep as the new home for beep.
>> >
>> > Debian switched to the new beep with Buster.
>> >     https://packages.debian.org/buster/beep
>> >
>> > Alpine 3.11, Arch Linux, Fedora, and Ubuntu 20.04 also switched to the
>> > same new beep.
>> >
>> > Fix build with clang
>> >
>> > Signed-off-by: Mark Jonas <toertel@gmail.com>
>> > Signed-off-by: Khem Raj <raj.khem@gmail.com>
>> > ---
>> > v2: Fix build with clang
>> > v3: Do not build with both clang and gcc
>> >
>> >  meta-oe/recipes-extended/beep/beep_1.2.2.bb   | 25 --------
>> >  meta-oe/recipes-extended/beep/beep_1.4.9.bb   | 32 ++++++++++
>> >  ...rror-as-it-fails-with-newer-clang-11.patch | 63 +++++++++++++++++++
>> >  3 files changed, 95 insertions(+), 25 deletions(-)
>> >  delete mode 100644 meta-oe/recipes-extended/beep/beep_1.2.2.bb
>> >  create mode 100644 meta-oe/recipes-extended/beep/beep_1.4.9.bb
>> >  create mode 100644 meta-oe/recipes-extended/beep/files/0001-Do-not-use-Werror-as-it-fails-with-newer-clang-11.patch
>> >
>> > diff --git a/meta-oe/recipes-extended/beep/beep_1.2.2.bb b/meta-oe/recipes-extended/beep/beep_1.2.2.bb
>> > deleted file mode 100644
>> > index cafc869645..0000000000
>> > --- a/meta-oe/recipes-extended/beep/beep_1.2.2.bb
>> > +++ /dev/null
>> > @@ -1,25 +0,0 @@
>> > -DESCRIPTION = "beep is a command line tool for linux that beeps the PC speaker"
>> > -LICENSE = "GPL-2.0"
>> > -LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3"
>> > -
>> > -SRC_URI = "\
>> > -    http://johnath.com/beep/beep-${PV}.tar.gz \
>> > -    file://linux-input.patch \
>> > -"
>> > -
>> > -SRC_URI[sha256sum] = "5c0445dac43950b7c7c3f235c6fb21f620ab3fd2f3aafaf09896e5730fcf49a1"
>> > -
>> > -S = "${WORKDIR}/${BPN}-${PV}"
>> > -
>> > -EXTRA_OEMAKE += 'CC="${CC}"'
>> > -EXTRA_OEMAKE += 'FLAGS="${CFLAGS} ${LDFLAGS}"'
>> > -
>> > -do_configure[noexec] = "1"
>> > -
>> > -do_compile() {
>> > -   oe_runmake
>> > -}
>> > -
>> > -do_install() {
>> > -       install -Dm 0755 ${B}/${PN} ${D}${bindir}/${PN}
>> > -}
>> > diff --git a/meta-oe/recipes-extended/beep/beep_1.4.9.bb b/meta-oe/recipes-extended/beep/beep_1.4.9.bb
>> > new file mode 100644
>> > index 0000000000..8d332b2faf
>> > --- /dev/null
>> > +++ b/meta-oe/recipes-extended/beep/beep_1.4.9.bb
>> > @@ -0,0 +1,32 @@
>> > +SUMMARY = "beep allows you to have the PC speaker issue beeps and beep patterns"
>> > +DESCRIPTION = "beep allows you to have the PC speaker issue beeps and beep \
>> > +patterns with given frequencies, durations, and spacing."
>> > +HOMEPAGE = "https://github.com/spkr-beep/beep"
>> > +BUGTRACKER = "https://github.com/spkr-beep/beep/issues"
>> > +
>> > +LICENSE = "GPLv2+"
>> > +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
>> > +
>> > +SRC_URI = "git://github.com/spkr-beep/beep.git;protocol=https \
>> > +           file://0001-Do-not-use-Werror-as-it-fails-with-newer-clang-11.patch \
>> > +"
>> > +SRCREV = "8b85ddd09f73b9fd7caa5679298781a57af194ac"
>> > +S = "${WORKDIR}/git"
>> > +
>> > +EXTRA_OEMAKE = " \
>> > +    COMPILER_gcc='${CC}' \
>> > +    LINKER_gcc='${CC}' \
>> > +    COMPILER_clang=no \
>> > +    LINKER_clang=no \
>> > +"
>> > +
>> > +EXTRA_OEMAKE_toolchain-clang = " \
>> > +    COMPILER_clang='${CC}' \
>> > +    LINKER_clang='${CC}' \
>> > +    COMPILER_gcc=no \
>> > +    LINKER_gcc=no \
>> > +"
>> > +
>> > +do_install() {
>> > +    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
>> > new file mode 100644
>> > index 0000000000..ba7681b983
>> > --- /dev/null
>> > +++ b/meta-oe/recipes-extended/beep/files/0001-Do-not-use-Werror-as-it-fails-with-newer-clang-11.patch
>> > @@ -0,0 +1,63 @@
>> > +From 6b33adfa438e35b6a37cfb0364274370ef4f9fc1 Mon Sep 17 00:00:00 2001
>> > +From: Khem Raj <raj.khem@gmail.com>
>> > +Date: Wed, 23 Dec 2020 18:00:59 +0000
>> > +Subject: [PATCH] Do not use -Werror as it fails with newer clang 11+
>> > +
>> > +Upstream-Status: Pending
>> > +Signed-off-by: Khem Raj <raj.khem@gmail.com>
>> > +---
>> > + GNUmakefile | 1 -
>> > + 1 file changed, 1 deletion(-)
>> > +
>> > +--- a/GNUmakefile
>> > ++++ b/GNUmakefile
>> > +@@ -91,12 +91,13 @@ comma := ,
>> > + # If supported by COMPILER_gcc, add given flags to CFLAGS_gcc.
>> > + # Example usage:
>> > + #   $(eval $(call CHECK_CFLAGS_gcc,-fasynchronous-unwind-tables))
>> > +-define CHECK_CFLAGS_gcc
>> > +-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))
>> > +-endef
>> > +
>> > + COMPILER_gcc = gcc
>> > + LINKER_gcc = gcc
>> > ++ifneq ($(COMPILER_gcc),no)
>> > ++define CHECK_CFLAGS_gcc
>> > ++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))
>> > ++endef
>> > + CPPFLAGS_gcc =
>> > + CFLAGS_gcc =
>> > + CFLAGS_gcc += -std=gnu99 -pedantic
>> > +@@ -113,30 +114,24 @@ CFLAGS_gcc += -save-temps=obj
>> > + LDFLAGS_gcc =
>> > + LIBS_gcc =
>> > +
>> > +-ifneq ($(call pathsearch,$(COMPILER_gcc)),)
>> > +-ifneq ($(COMPILER_gcc)),no)
>> > + COMPILERS += gcc
>> > + endif
>> > +-endif
>> > +
>> > + COMPILER_clang = clang
>> > + LINKER_clang = clang
>> > ++
>> > ++ifneq ($(COMPILER_clang),no)
>> > + CPPFLAGS_clang =
>> > + CFLAGS_clang += -Wall -Wextra
>> > + CFLAGS_clang += -Weverything
>> > + CFLAGS_clang += -Wno-padded
>> > + CFLAGS_clang += -std=gnu99 -pedantic
>> > +-CFLAGS_clang += -Werror
>> > +-CFLAGS_clang += -fsanitize=undefined
>> > + CFLAGS_clang += -O -g
>> > + LDFLAGS_clang =
>> > + LIBS_clang =
>> > +
>> > +-ifneq ($(call pathsearch,$(COMPILER_clang)),)
>> > +-ifneq ($(COMPILER_clang),no)
>> > + COMPILERS += clang
>> > + endif
>> > +-endif
>> > +
>> > +
>> > + ########################################################################
>> > --
>> > 2.29.2
>> >

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [meta-oe][PATCH v3] beep: Update to 1.4.9 in new repository
  2021-01-09 19:12     ` Mark Jonas
@ 2021-01-09 20:16       ` Khem Raj
  0 siblings, 0 replies; 6+ messages in thread
From: Khem Raj @ 2021-01-09 20:16 UTC (permalink / raw)
  To: Mark Jonas; +Cc: openembeded-devel

[-- Attachment #1: Type: text/plain, Size: 11585 bytes --]

On Sat, Jan 9, 2021 at 11:12 AM Mark Jonas <toertel@gmail.com> wrote:

> Hi Khem,
>
> > This patch itself should be first upstreamed
>
> I had some doubts that removing -Werror would find love upstream.
> That's why I started investigating which warning caused the
> compilation to break. And then I realized that the upstream already
> compiles just fine with Clang 11 from https://apt.llvm.org/ on Ubuntu
> 20.04.
>
> Additionally, the removal of
>     ifneq ($(call pathsearch,$(COMPILER_clang)),)
> breaks the use of make without additional parameters and
> auto-detection of the installed compilers. That's what I experienced
> on Ubuntu with gcc before installing clang.



It will compile fine for native builds because it does not consider cross
compiling this patch mainly makes it use compiler from environment firstly

Because I might have gcc and clang installed on my build host but only have
clang cross compiler and no gcc cross compiler it will break in such cases

Warnings happen because it then tries to use gcc specific options which
clang rejects and warns as unknown options

>
>
> > On Sat, Jan 9, 2021 at 9:02 AM Mark Jonas <toertel@gmail.com> wrote:
> >>
> >> Hi Khem,
> >>
> >> I wanted to create a patch for beep's mainline so it could be used in
> >> meta-openembedded without your patch. That is, what hinders
> >> compilation with Clang 11 and -Werror. To my astonishment the
> >> unmodified beep v1.4.9 compiles just fine with clang-11 from
> >> https://apt.llvm.org/ on Ubuntu 20.04. And it definitely fails when
> >> building with meta-clang without your patch.
> >>
> >> What is the difference between the two Clangs?
> >>
> >> I have to admit that this is the first time I used clang.
> >>
> >> $ clang-11 --version
> >> Ubuntu clang version
> >> 11.0.1-++20201218093155+43ff75f2c3fe-1~exp1~20201218203809.158
> >> Target: x86_64-pc-linux-gnu
> >> Thread model: posix
> >> InstalledDir: /usr/bin
> >>
> >> $ make COMPILER_gcc=no COMPILER_clang=clang-11 LINKER_clang=clang-11
> >> /bin/sed  -e s/@PACKAGE_TARNAME@/beep/g -e s/@PACKAGE_VERSION@/1.4.9/g
> >> -e s/@DEFAULT_FREQ@/440/g -e s/@DEFAULT_LENGTH@/200/g -e
> >> s/@DEFAULT_DELAY@/100/g -e 's|[@]pkgdocdir@|/usr/share/doc/beep|g' <
> >> beep-config.h.in > beep-config.h.new
> >> mv -f beep-config.h.new beep-config.h
> >> clang-11 -MT beep-main.clang-o -MMD -MP -MF
> >> .deps/beep-main.clang-o.dep   -DPACKAGE_TARNAME='"beep"'
> >> -DPACKAGE_VERSION='"1.4.9"'    -Wall -Wextra -Weverything -Wno-padded
> >> -std=gnu99 -pedantic -Werror -fsanitize=undefined -O -g -o
> >> beep-main.clang-o -c beep-main.c
> >> /bin/sed  -e s/@PACKAGE_TARNAME@/beep/g -e s/@PACKAGE_VERSION@/1.4.9/g
> >> -e s/@DEFAULT_FREQ@/440/g -e s/@DEFAULT_LENGTH@/200/g -e
> >> s/@DEFAULT_DELAY@/100/g -e 's|[@]pkgdocdir@|/usr/share/doc/beep|g' <
> >> beep-usage.txt.in > beep-usage.txt.new
> >> mv -f beep-usage.txt.new beep-usage.txt
> >> echo '/* Auto-generated from `beep-usage.txt`. Modify that file
> >> instead. */' > beep-usage.c
> >> echo '#include "beep-usage.h"' >> beep-usage.c
> >> echo 'char beep_usage[] =' >> beep-usage.c
> >> set -e; IFS=""; while read line; do \
> >>     printf '  "%s\\n"\n' "${line}" >> beep-usage.c; \
> >> done < beep-usage.txt
> >> echo '  ;' >> beep-usage.c
> >> clang-11 -MT beep-usage.clang-o -MMD -MP -MF
> >> .deps/beep-usage.clang-o.dep   -DPACKAGE_TARNAME='"beep"'
> >> -DPACKAGE_VERSION='"1.4.9"'    -Wall -Wextra -Weverything -Wno-padded
> >> -std=gnu99 -pedantic -Werror -fsanitize=undefined -O -g -o
> >> beep-usage.clang-o -c beep-usage.c
> >> clang-11  -Wall -Wextra -Weverything -Wno-padded -std=gnu99 -pedantic
> >> -Werror -fsanitize=undefined -O -g   -o beep.clang beep-log.clang-o
> >> beep-main.clang-o beep-library.clang-o beep-usage.clang-o
> >> beep-drivers.clang-o beep-driver-console.clang-o
> >> beep-driver-evdev.clang-o
> >> cp -f beep.clang beep
> >> /bin/sed  -e s/@PACKAGE_TARNAME@/beep/g -e s/@PACKAGE_VERSION@/1.4.9/g
> >> -e s/@DEFAULT_FREQ@/440/g -e s/@DEFAULT_LENGTH@/200/g -e
> >> s/@DEFAULT_DELAY@/100/g -e 's|[@]pkgdocdir@|/usr/share/doc/beep|g' <
> >> beep.1.in > beep.1.new
> >> mv -f beep.1.new beep.1
> >>
> >> Cheers,
> >> Mark
> >>
> >> On Thu, Dec 24, 2020 at 7:59 AM Khem Raj <raj.khem@gmail.com> wrote:
> >> >
> >> > From: Mark Jonas <toertel@gmail.com>
> >> >
> >> > The previous version 1.2.2 of beep was provided by
> >> > http://johnath.com/beep and was released in 2002. The latest version
> 1.3
> >> > was released 2010-07-13. On https://github.com/johnath/beep the
> >> > development stopped 2013-02-07.
> >> >
> >> > In 2018 a developer worked on fixing CVE-2018-1000532 and realized
> that
> >> > fixing this would be more than just a simple patch. Because the
> original
> >> > repository was unmaintained for several years he created
> >> > https://github.com/spkr-beep/beep as the new home for beep.
> >> >
> >> > Debian switched to the new beep with Buster.
> >> >     https://packages.debian.org/buster/beep
> >> >
> >> > Alpine 3.11, Arch Linux, Fedora, and Ubuntu 20.04 also switched to the
> >> > same new beep.
> >> >
> >> > Fix build with clang
> >> >
> >> > Signed-off-by: Mark Jonas <toertel@gmail.com>
> >> > Signed-off-by: Khem Raj <raj.khem@gmail.com>
> >> > ---
> >> > v2: Fix build with clang
> >> > v3: Do not build with both clang and gcc
> >> >
> >> >  meta-oe/recipes-extended/beep/beep_1.2.2.bb   | 25 --------
> >> >  meta-oe/recipes-extended/beep/beep_1.4.9.bb   | 32 ++++++++++
> >> >  ...rror-as-it-fails-with-newer-clang-11.patch | 63
> +++++++++++++++++++
> >> >  3 files changed, 95 insertions(+), 25 deletions(-)
> >> >  delete mode 100644 meta-oe/recipes-extended/beep/beep_1.2.2.bb
> >> >  create mode 100644 meta-oe/recipes-extended/beep/beep_1.4.9.bb
> >> >  create mode 100644
> meta-oe/recipes-extended/beep/files/0001-Do-not-use-Werror-as-it-fails-with-newer-clang-11.patch
> >> >
> >> > diff --git a/meta-oe/recipes-extended/beep/beep_1.2.2.bb
> b/meta-oe/recipes-extended/beep/beep_1.2.2.bb
> >> > deleted file mode 100644
> >> > index cafc869645..0000000000
> >> > --- a/meta-oe/recipes-extended/beep/beep_1.2.2.bb
> >> > +++ /dev/null
> >> > @@ -1,25 +0,0 @@
> >> > -DESCRIPTION = "beep is a command line tool for linux that beeps the
> PC speaker"
> >> > -LICENSE = "GPL-2.0"
> >> > -LIC_FILES_CHKSUM =
> "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3"
> >> > -
> >> > -SRC_URI = "\
> >> > -    http://johnath.com/beep/beep-${PV}.tar.gz \
> >> > -    file://linux-input.patch \
> >> > -"
> >> > -
> >> > -SRC_URI[sha256sum] =
> "5c0445dac43950b7c7c3f235c6fb21f620ab3fd2f3aafaf09896e5730fcf49a1"
> >> > -
> >> > -S = "${WORKDIR}/${BPN}-${PV}"
> >> > -
> >> > -EXTRA_OEMAKE += 'CC="${CC}"'
> >> > -EXTRA_OEMAKE += 'FLAGS="${CFLAGS} ${LDFLAGS}"'
> >> > -
> >> > -do_configure[noexec] = "1"
> >> > -
> >> > -do_compile() {
> >> > -   oe_runmake
> >> > -}
> >> > -
> >> > -do_install() {
> >> > -       install -Dm 0755 ${B}/${PN} ${D}${bindir}/${PN}
> >> > -}
> >> > diff --git a/meta-oe/recipes-extended/beep/beep_1.4.9.bb
> b/meta-oe/recipes-extended/beep/beep_1.4.9.bb
> >> > new file mode 100644
> >> > index 0000000000..8d332b2faf
> >> > --- /dev/null
> >> > +++ b/meta-oe/recipes-extended/beep/beep_1.4.9.bb
> >> > @@ -0,0 +1,32 @@
> >> > +SUMMARY = "beep allows you to have the PC speaker issue beeps and
> beep patterns"
> >> > +DESCRIPTION = "beep allows you to have the PC speaker issue beeps
> and beep \
> >> > +patterns with given frequencies, durations, and spacing."
> >> > +HOMEPAGE = "https://github.com/spkr-beep/beep"
> >> > +BUGTRACKER = "https://github.com/spkr-beep/beep/issues"
> >> > +
> >> > +LICENSE = "GPLv2+"
> >> > +LIC_FILES_CHKSUM =
> "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
> >> > +
> >> > +SRC_URI = "git://github.com/spkr-beep/beep.git;protocol=https \
> >> > +
>  file://0001-Do-not-use-Werror-as-it-fails-with-newer-clang-11.patch \
> >> > +"
> >> > +SRCREV = "8b85ddd09f73b9fd7caa5679298781a57af194ac"
> >> > +S = "${WORKDIR}/git"
> >> > +
> >> > +EXTRA_OEMAKE = " \
> >> > +    COMPILER_gcc='${CC}' \
> >> > +    LINKER_gcc='${CC}' \
> >> > +    COMPILER_clang=no \
> >> > +    LINKER_clang=no \
> >> > +"
> >> > +
> >> > +EXTRA_OEMAKE_toolchain-clang = " \
> >> > +    COMPILER_clang='${CC}' \
> >> > +    LINKER_clang='${CC}' \
> >> > +    COMPILER_gcc=no \
> >> > +    LINKER_gcc=no \
> >> > +"
> >> > +
> >> > +do_install() {
> >> > +    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
> >> > new file mode 100644
> >> > index 0000000000..ba7681b983
> >> > --- /dev/null
> >> > +++
> b/meta-oe/recipes-extended/beep/files/0001-Do-not-use-Werror-as-it-fails-with-newer-clang-11.patch
> >> > @@ -0,0 +1,63 @@
> >> > +From 6b33adfa438e35b6a37cfb0364274370ef4f9fc1 Mon Sep 17 00:00:00
> 2001
> >> > +From: Khem Raj <raj.khem@gmail.com>
> >> > +Date: Wed, 23 Dec 2020 18:00:59 +0000
> >> > +Subject: [PATCH] Do not use -Werror as it fails with newer clang 11+
> >> > +
> >> > +Upstream-Status: Pending
> >> > +Signed-off-by: Khem Raj <raj.khem@gmail.com>
> >> > +---
> >> > + GNUmakefile | 1 -
> >> > + 1 file changed, 1 deletion(-)
> >> > +
> >> > +--- a/GNUmakefile
> >> > ++++ b/GNUmakefile
> >> > +@@ -91,12 +91,13 @@ comma := ,
> >> > + # If supported by COMPILER_gcc, add given flags to CFLAGS_gcc.
> >> > + # Example usage:
> >> > + #   $(eval $(call CHECK_CFLAGS_gcc,-fasynchronous-unwind-tables))
> >> > +-define CHECK_CFLAGS_gcc
> >> > +-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))
> >> > +-endef
> >> > +
> >> > + COMPILER_gcc = gcc
> >> > + LINKER_gcc = gcc
> >> > ++ifneq ($(COMPILER_gcc),no)
> >> > ++define CHECK_CFLAGS_gcc
> >> > ++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))
> >> > ++endef
> >> > + CPPFLAGS_gcc =
> >> > + CFLAGS_gcc =
> >> > + CFLAGS_gcc += -std=gnu99 -pedantic
> >> > +@@ -113,30 +114,24 @@ CFLAGS_gcc += -save-temps=obj
> >> > + LDFLAGS_gcc =
> >> > + LIBS_gcc =
> >> > +
> >> > +-ifneq ($(call pathsearch,$(COMPILER_gcc)),)
> >> > +-ifneq ($(COMPILER_gcc)),no)
> >> > + COMPILERS += gcc
> >> > + endif
> >> > +-endif
> >> > +
> >> > + COMPILER_clang = clang
> >> > + LINKER_clang = clang
> >> > ++
> >> > ++ifneq ($(COMPILER_clang),no)
> >> > + CPPFLAGS_clang =
> >> > + CFLAGS_clang += -Wall -Wextra
> >> > + CFLAGS_clang += -Weverything
> >> > + CFLAGS_clang += -Wno-padded
> >> > + CFLAGS_clang += -std=gnu99 -pedantic
> >> > +-CFLAGS_clang += -Werror
> >> > +-CFLAGS_clang += -fsanitize=undefined
> >> > + CFLAGS_clang += -O -g
> >> > + LDFLAGS_clang =
> >> > + LIBS_clang =
> >> > +
> >> > +-ifneq ($(call pathsearch,$(COMPILER_clang)),)
> >> > +-ifneq ($(COMPILER_clang),no)
> >> > + COMPILERS += clang
> >> > + endif
> >> > +-endif
> >> > +
> >> > +
> >> > +
> ########################################################################
> >> > --
> >> > 2.29.2
> >> >
>

[-- Attachment #2: Type: text/html, Size: 17311 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-01-09 20:16 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-24  6:59 [meta-oe][PATCH v3] beep: Update to 1.4.9 in new repository Khem Raj
2020-12-24  6:59 ` [meta-oe][PATCH v3] xrdp: Upgrade to 0.9.14 Khem Raj
2021-01-09 17:02 ` [meta-oe][PATCH v3] beep: Update to 1.4.9 in new repository Mark Jonas
2021-01-09 18:40   ` Khem Raj
2021-01-09 19:12     ` Mark Jonas
2021-01-09 20:16       ` Khem Raj

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.