From a7062df3272be4a012e0b8288f17bb7e0220bbdb Mon Sep 17 00:00:00 2001 From: Fabrice Fontaine Date: Wed, 16 Feb 2022 15:22:13 +0100 Subject: [PATCH] package/frr: set FRR_XREF_NO_NOTE Set FRR_XREF_NO_NOTE to avoid the following build failures with microblazeel, nds32 and xtensa raised since bump to version 8.1 in commit ca2753fd47d47e5ad0eec16ea62f7b7f096331b6: _clippy.ELFAccessError: virtual address (538157256) not found in program headers [...] /tmp/ccFGv94v.s:13: Error: can't resolve `__start_xref_array' {*UND* section} - `L0' {.note.FRR section} /tmp/ccFGv94v.s:14: Error: can't resolve `__stop_xref_array' {*UND* section} - `L0' {.note.FRR section} Here is an extract of https://github.com/FRRouting/frr/blob/7347a4859d4b984cea0aef769a16622d3f02e44f/lib/xref.h: "the following blurb emits an ELF note indicating start and end of the xref array in the binary. This is technically the "correct" entry point for external tools reading xrefs out of an ELF shared library or executable. ... FRR itself does not need this note to operate correctly, so if you have some build issue with it just add -DFRR_XREF_NO_NOTE to your build flags to disable it." In other words, this is only *possibly* needed for another package that wants to extracts the xrefs. We currently don't have anything that depends on frr in-tree, and it's not even installed in staging, so it's hard to check, but it seems pretty unlikely that this is really needed. Fixes: - http://autobuild.buildroot.org/results/3cdb50f5e5a1b3f37a6edcd4276fcbf015e28828 - http://autobuild.buildroot.org/results/a3cc0b5090a1faa2bca9c8dfe0fec9b6a918ba4d - http://autobuild.buildroot.org/results/694cc65478a82ec93d2074252892036855cdc49d Signed-off-by: Fabrice Fontaine Signed-off-by: Arnout Vandecappelle (Essensium/Mind) --- package/frr/frr.mk | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/package/frr/frr.mk b/package/frr/frr.mk index cc83016f9f..0e6ab7a815 100644 --- a/package/frr/frr.mk +++ b/package/frr/frr.mk @@ -17,7 +17,9 @@ FRR_DEPENDENCIES = host-frr readline json-c libyang libnl \ HOST_FRR_DEPENDENCIES = host-flex host-bison host-elfutils host-python3 -FRR_CONF_ENV = ac_cv_lib_cunit_CU_initialize_registry=no +FRR_CONF_ENV = \ + ac_cv_lib_cunit_CU_initialize_registry=no \ + CFLAGS="$(TARGET_CFLAGS) -DFRR_XREF_NO_NOTE" FRR_CONF_OPTS = --with-clippy=$(HOST_DIR)/bin/clippy \ --sysconfdir=/etc/frr \