mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-11-14 03:57:15 +00:00
frr: Do not look at host include paths in configure
frr 10.7 added an OpenBSD fallback that retries the libunwind.h check with -I/usr/include/c++/v1 when libunwind is not found. gcc with -Wpoison-system-directories reports that as unsafe for cross-compilation, failing the configure-unsafe QA check. clang does not warn about it. Only use the fallback on OpenBSD. AI-Generated: Uses Claude Code Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
This commit is contained in:
2 files changed
+42
No files matched your search
+41
@@ -0,0 +1,41 @@
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Thu, 12 Nov 2026 00:00:00 -0800
|
||||
Subject: [PATCH] configure: Only try the OpenBSD libunwind location on OpenBSD
|
||||
|
||||
When libunwind.h is not found, configure retries with
|
||||
-I/usr/include/c++/v1, which is where OpenBSD keeps it. On other
|
||||
systems this only makes the compiler look at a host directory. When
|
||||
cross-compiling with a gcc that has -Wpoison-system-directories, that
|
||||
is reported as "include location /usr/include/c++/v1 is unsafe for
|
||||
cross-compilation".
|
||||
|
||||
Limit the fallback to OpenBSD hosts.
|
||||
|
||||
Upstream-Status: Submitted [https://github.com/FRRouting/frr/pull/24383]
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
configure.ac | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 8778c24..cbd0767 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -2629,6 +2629,8 @@ if test "$enable_backtrace" != "no" ; then
|
||||
backtrace_ok=true
|
||||
])
|
||||
], [
|
||||
+ case "$host_os" in
|
||||
+ openbsd*)
|
||||
# OpenBSD. no idea why the header file is under C++, but it is
|
||||
ac_cflags_save="$CFLAGS"
|
||||
CFLAGS="$CFLAGS -I/usr/include/c++/v1"
|
||||
@@ -2652,6 +2654,8 @@ if test "$enable_backtrace" != "no" ; then
|
||||
LIBS="$ac_libs_save"
|
||||
])
|
||||
CFLAGS="$ac_cflags_save"
|
||||
+ ;;
|
||||
+ esac
|
||||
])
|
||||
])
|
||||
if test "$enable_backtrace" = "libunwind" -a "$backtrace_ok" = "false"; then
|
||||
@@ -13,6 +13,7 @@ LIC_FILES_CHKSUM = "file://doc/licenses/GPL-2.0;md5=b234ee4d69f5fce4486a80fdaf4a
|
||||
SRC_URI = "git://github.com/FRRouting/frr.git;protocol=https;branch=stable/${@oe.utils.trim_version('${PV}', 2)};tag=frr-${PV} \
|
||||
file://frr.pam \
|
||||
file://0001-lib-Don-t-use-paths-in-bison-output-defines-directiv.patch \
|
||||
file://0002-configure-Only-try-the-OpenBSD-libunwind-location-on.patch \
|
||||
"
|
||||
SRCREV = "f8c0b08dcb0c78f9e42b9b86ae70b049e4e617c1"
|
||||
|
||||
|
||||
Reference in new issue
Block a user