public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "James Le Cuirot" <chewi@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-embedded/raspberrypi-utils/, dev-embedded/raspberrypi-utils/files/
Date: Fri,  9 Feb 2024 22:29:05 +0000 (UTC)	[thread overview]
Message-ID: <1707517730.48f3bc2e56cf2051e74015d3f40b66f334ac7702.chewi@gentoo> (raw)

commit:     48f3bc2e56cf2051e74015d3f40b66f334ac7702
Author:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
AuthorDate: Fri Feb  9 22:27:32 2024 +0000
Commit:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
CommitDate: Fri Feb  9 22:28:50 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=48f3bc2e

dev-embedded/raspberrypi-utils: Patch to drop -Werror flag

Closes: https://bugs.gentoo.org/923594
Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>

 .../files/raspberrypi-utils-werror.patch           | 77 ++++++++++++++++++++++
 .../raspberrypi-utils-0_p20240203.ebuild           |  4 ++
 2 files changed, 81 insertions(+)

diff --git a/dev-embedded/raspberrypi-utils/files/raspberrypi-utils-werror.patch b/dev-embedded/raspberrypi-utils/files/raspberrypi-utils-werror.patch
new file mode 100644
index 000000000000..ddfce08d0407
--- /dev/null
+++ b/dev-embedded/raspberrypi-utils/files/raspberrypi-utils-werror.patch
@@ -0,0 +1,77 @@
+https://github.com/raspberrypi/utils/pull/69
+
+From 0bbef73e2f1df17c793152895cabac452a49981f Mon Sep 17 00:00:00 2001
+From: James Le Cuirot <chewi@gentoo.org>
+Date: Tue, 6 Feb 2024 21:36:08 +0000
+Subject: [PATCH] build: Only enable -Werror for debug builds
+
+-Werror is very unhelpful for distributions and end users as newer
+compilers will raise warnings that the maintainers may not see. The
+warnings should get reported upstream, but they shouldn't block users
+from using the software.
+
+Rather than drop the flag entirely, I have enabled it only for debug
+builds, e.g. -DCMAKE_BUILD_TYPE=Debug.
+
+Signed-off-by: James Le Cuirot <chewi@gentoo.org>
+---
+ dtmerge/CMakeLists.txt  | 2 +-
+ eeptools/CMakeLists.txt | 2 +-
+ pinctrl/CMakeLists.txt  | 2 +-
+ vclog/CMakeLists.txt    | 2 +-
+ 4 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/dtmerge/CMakeLists.txt b/dtmerge/CMakeLists.txt
+index f63648b..357889f 100644
+--- a/dtmerge/CMakeLists.txt
++++ b/dtmerge/CMakeLists.txt
+@@ -5,7 +5,7 @@ include(GNUInstallDirs)
+ #set project name
+ project(dtmerge)
+ 
+-set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Werror")
++add_compile_options(-Wall -Wextra $<$<CONFIG:Debug>:-Werror>)
+ 
+ if (CMAKE_COMPILER_IS_GNUCC)
+    add_definitions (-ffunction-sections)
+diff --git a/eeptools/CMakeLists.txt b/eeptools/CMakeLists.txt
+index 3438255..90fc284 100644
+--- a/eeptools/CMakeLists.txt
++++ b/eeptools/CMakeLists.txt
+@@ -5,7 +5,7 @@ include(GNUInstallDirs)
+ #set project name
+ project(eeptools)
+ 
+-set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Werror")
++add_compile_options(-Wall -Wextra $<$<CONFIG:Debug>:-Werror>)
+ 
+ if (CMAKE_COMPILER_IS_GNUCC)
+    add_definitions (-ffunction-sections)
+diff --git a/pinctrl/CMakeLists.txt b/pinctrl/CMakeLists.txt
+index 2178ee4..70427f2 100644
+--- a/pinctrl/CMakeLists.txt
++++ b/pinctrl/CMakeLists.txt
+@@ -1,7 +1,7 @@
+ cmake_minimum_required(VERSION 3.10...3.27)
+ include(GNUInstallDirs)
+ 
+-set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Werror -pedantic")
++add_compile_options(-Wall -Wextra $<$<CONFIG:Debug>:-Werror> -pedantic)
+ 
+ #set project name
+ project(pinctrl)
+diff --git a/vclog/CMakeLists.txt b/vclog/CMakeLists.txt
+index 611f9dc..b7e57eb 100644
+--- a/vclog/CMakeLists.txt
++++ b/vclog/CMakeLists.txt
+@@ -1,6 +1,6 @@
+ cmake_minimum_required(VERSION 3.10...3.27)
+ 
+-set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Werror -pedantic")
++add_compile_options(-Wall -Wextra $<$<CONFIG:Debug>:-Werror> -pedantic)
+ 
+ #set project name
+ project(vclog)
+-- 
+2.43.0
+

diff --git a/dev-embedded/raspberrypi-utils/raspberrypi-utils-0_p20240203.ebuild b/dev-embedded/raspberrypi-utils/raspberrypi-utils-0_p20240203.ebuild
index 1c13aaaa6bdb..4668331a2b0a 100644
--- a/dev-embedded/raspberrypi-utils/raspberrypi-utils-0_p20240203.ebuild
+++ b/dev-embedded/raspberrypi-utils/raspberrypi-utils-0_p20240203.ebuild
@@ -27,6 +27,10 @@ RDEPEND="
 
 S="${WORKDIR}/utils-${COMMIT}"
 
+PATCHES=(
+	"${FILESDIR}"/${PN}-werror.patch
+)
+
 src_configure() {
 	local mycmakeargs=( -DBUILD_SHARED_LIBS=OFF )
 	cmake_src_configure


                 reply	other threads:[~2024-02-09 22:29 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1707517730.48f3bc2e56cf2051e74015d3f40b66f334ac7702.chewi@gentoo \
    --to=chewi@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox