From 1f1025a6521e0f0f1ed0bb0ce8a9305d42b4b8a3 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Thu, 12 Nov 2026 07:43:43 -0800 Subject: [PATCH] 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 --- ...ry-the-OpenBSD-libunwind-location-on.patch | 41 +++++++++++++++++++ .../recipes-protocols/frr/frr_10.7.1.bb | 1 + 2 files changed, 42 insertions(+) create mode 100644 meta-networking/recipes-protocols/frr/frr/0002-configure-Only-try-the-OpenBSD-libunwind-location-on.patch diff --git a/meta-networking/recipes-protocols/frr/frr/0002-configure-Only-try-the-OpenBSD-libunwind-location-on.patch b/meta-networking/recipes-protocols/frr/frr/0002-configure-Only-try-the-OpenBSD-libunwind-location-on.patch new file mode 100644 index 0000000000..81a8c72497 --- /dev/null +++ b/meta-networking/recipes-protocols/frr/frr/0002-configure-Only-try-the-OpenBSD-libunwind-location-on.patch @@ -0,0 +1,41 @@ +From: Khem Raj +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 +--- + 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 diff --git a/meta-networking/recipes-protocols/frr/frr_10.7.1.bb b/meta-networking/recipes-protocols/frr/frr_10.7.1.bb index 6e238fc7bf..d0ddf2ea7d 100644 --- a/meta-networking/recipes-protocols/frr/frr_10.7.1.bb +++ b/meta-networking/recipes-protocols/frr/frr_10.7.1.bb @@ -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"