summarylogtreecommitdiffstats
path: root/0001-cmake-gcc.cmake-Move-Wno-error-stringop-overread-her.patch
blob: 5a04d980b4c0ed54f3b45023cadd5b4097afb0e4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
From 24cc65ae8aac2e87f97cf93884ceca025d79fa14 Mon Sep 17 00:00:00 2001
From: David Korth <gerbilsoft@gerbilsoft.com>
Date: Sun, 20 Apr 2025 04:21:02 -0400
Subject: [PATCH] [cmake] gcc.cmake: Move -Wno-error=stringop-overread here.

The same error showed up on armhf and amd64 this time.

Since it's happening in LTO and not the main compiler step, the pragmas
likely aren't working properly. Use -Wno-error=stringop-overread instead.

(cherry picked from commit ec441b4cec6df0b4e785a0b4861d6388aefe742e)
---
 cmake/platform/gcc.cmake | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cmake/platform/gcc.cmake b/cmake/platform/gcc.cmake
index f63ce2010..b3b715296 100644
--- a/cmake/platform/gcc.cmake
+++ b/cmake/platform/gcc.cmake
@@ -276,7 +276,7 @@ ENDIF(CFLAG_OPTIMIZE_FTREE_VECTORIZE)
 # Add "-Werror" *after* checking for everything else.
 SET(RP_C_FLAGS_COMMON   "${RP_C_FLAGS_COMMON} -Werror")
 SET(RP_CXX_FLAGS_COMMON "${RP_CXX_FLAGS_COMMON} -Werror")
-SET(CFLAGS_WNO_ERROR -Wno-error=unknown-pragmas -Wno-error=address -Wno-error=attributes -Wno-error=unused-parameter -Wno-error=unused-but-set-variable -Wno-error=ignored-qualifiers -Wno-error=missing-field-initializers -Wno-error=unused-variable -Wno-error=unused-function -Wno-error=type-limits -Wno-error=empty-body -Wno-error=address-of-packed-member -Wno-error=shift-negative-value -Wno-error=clobbered -Wno-error=overloaded-virtual -Wno-error=header-hygiene)
+SET(CFLAGS_WNO_ERROR -Wno-error=unknown-pragmas -Wno-error=address -Wno-error=attributes -Wno-error=unused-parameter -Wno-error=unused-but-set-variable -Wno-error=ignored-qualifiers -Wno-error=missing-field-initializers -Wno-error=unused-variable -Wno-error=unused-function -Wno-error=type-limits -Wno-error=empty-body -Wno-error=address-of-packed-member -Wno-error=shift-negative-value -Wno-error=clobbered -Wno-error=overloaded-virtual -Wno-error=header-hygiene -Wno-error=cast-align -Wno-error=stringop-overread)
 FOREACH(FLAG_TEST ${CFLAGS_WNO_ERROR})
 	# CMake doesn't like certain characters in variable names.
 	STRING(REGEX REPLACE "/|:|=" "_" FLAG_TEST_VARNAME "${FLAG_TEST}")
-- 
2.49.0