From patchwork Tue Nov 14 03:08:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 34415 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 054DAC4167D for ; Tue, 14 Nov 2023 03:08:28 +0000 (UTC) Received: from mail-pf1-f172.google.com (mail-pf1-f172.google.com [209.85.210.172]) by mx.groups.io with SMTP id smtpd.web10.5383.1699931303189027842 for ; Mon, 13 Nov 2023 19:08:23 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=BqAOosqh; spf=pass (domain: gmail.com, ip: 209.85.210.172, mailfrom: raj.khem@gmail.com) Received: by mail-pf1-f172.google.com with SMTP id d2e1a72fcca58-6c4ed8eef16so3542023b3a.0 for ; Mon, 13 Nov 2023 19:08:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1699931302; x=1700536102; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=GpOQO9cOF0S+ZeobZ+YTElzdWMTL7C/gwgO6N67ccoM=; b=BqAOosqhdfW4D0G2hwVnCOQHR4mVkUvx0ASlM9Sx6dV360k2qF4jKGAeBtYnZxAn9M FjknwDBbrsdgTzylxU0U51fizl+JvJqiaoP8hUFYDzrynUIw+B71A2Wzx96wEZBwxYIg TdU+K8tHNf8pV0NRJvW2arvsrku8MJH6s9521lT3zlCu3TrXjQhDXUhNVmoclITvI1mw rxWmH/Vr4qU6wQK8W1gW/389xVjPkOrdYd6DPFM6uV4d4um0PFa+EpBBBHWjVaHdFhyn 7FaFInAE8XTJGO6gS3wc9vlyBHUCmE2Yg4tS/zyCyWBRaEyENwQiXolZ+3v7SxhSNURE fKFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699931302; x=1700536102; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=GpOQO9cOF0S+ZeobZ+YTElzdWMTL7C/gwgO6N67ccoM=; b=MfFgUpNS0N+qyPQULWchddx9pM59JpKc3CuUcC5zzIiJ4S+snnyWUIiNaNXg4JEtyX pwP9a+ndnvNsM2ET3HERZZ/RXJ6cre1wPjHZwEyqCwRGX0u4xudRNMuJDHHtEYjH8Lk0 QAtZwbA4/+mFOSk6hgkJhX5+vPjY3HiuPcrijHeIOs+XeyC9ThzFyU5+MDyWKOGNmiNf SLNi2YSJsB68URegajkObFE/6gTeJnIV2SfskayQoy5gIClOPb4cvu60V8cEN8EQwokY qsznmRV6iZ5rt030yOdTs3WmtxtwcpC8XxUFqqabv7My1aymQA1NRAN6/MlbHGD2lKo+ mOKQ== X-Gm-Message-State: AOJu0YzPC/nROHWH4WtWIw+pqKWsFBGX2jlDSqefm8ydYItZxHzmxN8j 9AC0aMZlYzfuqj9mBZXpVLlGEjaslmO+GA== X-Google-Smtp-Source: AGHT+IHHZA4RVf3gR74KhLs4GxIKHAcaerndm5KC5oSGTlKF+zjoOZG9weK2a75n2ulorj+NWDt/+w== X-Received: by 2002:a05:6a20:1447:b0:17e:2afd:407f with SMTP id a7-20020a056a20144700b0017e2afd407fmr11504849pzi.9.1699931302169; Mon, 13 Nov 2023 19:08:22 -0800 (PST) Received: from apollo.hsd1.ca.comcast.net ([2601:646:9100:2cb0::62f8]) by smtp.gmail.com with ESMTPSA id n2-20020a1709026a8200b001c44dbc92a2sm4687978plk.184.2023.11.13.19.08.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Nov 2023 19:08:21 -0800 (PST) From: Khem Raj To: openembedded-devel@lists.openembedded.org Cc: Khem Raj Subject: [meta-oe][PATCH 07/10] beep: Upgrade to 1.4.12 Date: Mon, 13 Nov 2023 19:08:08 -0800 Message-ID: <20231113-gnomebaseclass-switch-to-meson-v1-7-111dd5d0fe68@gmail.com> X-Mailer: git-send-email 2.42.1 In-Reply-To: <20231113-gnomebaseclass-switch-to-meson-v1-0-111dd5d0fe68@gmail.com> References: <20231113-gnomebaseclass-switch-to-meson-v1-0-111dd5d0fe68@gmail.com> MIME-Version: 1.0 X-Mailer: b4 0.12.4 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 14 Nov 2023 03:08:28 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-devel/message/106694 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 --- .../beep/{beep_1.4.9.bb => beep_1.4.12.bb} | 19 +----- ...se-Werror-as-it-fails-with-newer-clang-11.patch | 63 ----------------- ...-beep-library-Make-it-compatible-with-c99.patch | 78 ++++++++++++++++++++++ 3 files changed, 81 insertions(+), 79 deletions(-) -- 2.42.1 diff --git a/meta-oe/recipes-extended/beep/beep_1.4.9.bb b/meta-oe/recipes-extended/beep/beep_1.4.12.bb similarity index 59% rename from meta-oe/recipes-extended/beep/beep_1.4.9.bb rename to meta-oe/recipes-extended/beep/beep_1.4.12.bb index ec62f31870..442acd1a93 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" LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" SRC_URI = "git://github.com/spkr-beep/beep.git;protocol=https;branch=master \ - file://0001-Do-not-use-Werror-as-it-fails-with-newer-clang-11.patch \ -" -SRCREV = "8b85ddd09f73b9fd7caa5679298781a57af194ac" + file://0001-beep-library-Make-it-compatible-with-c99.patch" +SRCREV = "11453a79f2cea81832329b06ca3a284aa7a0a52e" 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 \ -" +EXTRA_OEMAKE = "prefix='${prefix}' CFLAGS='${CFLAGS}'" 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 deleted file mode 100644 index ba7681b983..0000000000 --- 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 @@ -From 6b33adfa438e35b6a37cfb0364274370ef4f9fc1 Mon Sep 17 00:00:00 2001 -From: Khem Raj -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 ---- - 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 - - - ######################################################################## 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 0000000000..240e075a89 --- /dev/null +++ b/meta-oe/recipes-extended/beep/files/0001-beep-library-Make-it-compatible-with-c99.patch @@ -0,0 +1,78 @@ +From 66b06e03fc25a168e06c7af5ccccc3162ddbf92a Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Mon, 13 Nov 2023 17:18:55 -0800 +Subject: [PATCH] beep-library: Make it compatible with < c99 + +Upstream-Status: Pending +Signed-off-by: Khem Raj +--- + beep-library.c | 9 +++++---- + 1 file changed, 5 insertions(+), 4 deletions(-) + +--- a/beep-library.c ++++ b/beep-library.c +@@ -44,7 +44,7 @@ + int open_checked_char_device(const char *const device_name) + { + struct stat sb; +- ++ int fd = -1; + if (-1 == stat(device_name, &sb)) { + LOG_VERBOSE("could not stat(2) %s: %s", + device_name, strerror(errno)); +@@ -57,7 +57,7 @@ int open_checked_char_device(const char + return -1; + } + +- const int fd = open(device_name, O_WRONLY); ++ fd = open(device_name, O_WRONLY); + if (fd == -1) { + LOG_VERBOSE("could not open(2) %s: %s", + device_name, strerror(errno)); +@@ -90,6 +90,7 @@ void safe_error_exit(const char *const m + { + const int saved_errno = errno; + char strerr_buf[128]; ++ size_t errlen, msglen; + const int ret = strerror_r(saved_errno, strerr_buf, sizeof(strerr_buf)); + if (ret != 0) { + if (write(STDERR_FILENO, "strerror_r error\n", +@@ -98,14 +99,14 @@ void safe_error_exit(const char *const m + } + _exit(EXIT_FAILURE); + } +- const size_t msglen = strlen(msg); ++ msglen = strlen(msg); + if (write(STDERR_FILENO, msg, msglen)) { + /* ignore all write errors */ + } + if (write(STDERR_FILENO, ": ", 2)) { + /* ignore all write errors */ + } +- const size_t errlen = strlen(strerr_buf); ++ errlen = strlen(strerr_buf); + if (write(STDERR_FILENO, strerr_buf, errlen)) { + /* ignore all write errors */ + } +--- a/GNUmakefile ++++ b/GNUmakefile +@@ -155,7 +155,6 @@ $(eval $(call CHECK_CFLAGS,common_CFLAGS + $(eval $(call CHECK_CFLAGS,common_CFLAGS,-Wall)) + $(eval $(call CHECK_CFLAGS,common_CFLAGS,-Wextra)) + $(eval $(call CHECK_CFLAGS,common_CFLAGS,-Weverything)) +-$(eval $(call CHECK_CFLAGS,common_CFLAGS,-Werror)) + $(eval $(call CHECK_CFLAGS,common_CFLAGS,-Wno-padded)) + $(eval $(call CHECK_CFLAGS,common_CFLAGS,-Werror=format-security)) + $(eval $(call CHECK_CFLAGS,common_CFLAGS,-Wno-disabled-macro-expansion)) +@@ -169,11 +168,6 @@ $(eval $(call CHECK_CFLAGS,CFLAGS,-fanal + $(eval $(call CHECK_CFLAGS,CFLAGS,-fstack-protector-strong)) + $(eval $(call CHECK_CFLAGS,CFLAGS,-fstack-clash-protection)) + $(eval $(call CHECK_CFLAGS,CFLAGS,-fcf-protection)) +-$(eval $(call CHECK_CFLAGS,CFLAGS,-fsanitize=undefined)) +- +- +-CFLAGS += -save-temps=obj +- + + $(info # common_CFLAGS=$(common_CFLAGS)) + $(info # CFLAGS=$(CFLAGS))