Skip to contentSkip to conversation

openipmi: Pass BUILD_CFLAGS to BUILD_CC

PATCH New [email protected] 1 participant 1 message Dec 2, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 openipmi: Pass BUILD_CFLAGS to BUILD_CC

From: Mingli Yu <[email protected]>

* The option -fcanon-prefix-map is added to CFLAGS after the commit [1]
introduced and result in the below build error.
Making all in sdrcomp
make[3]: Entering directory '/tmp/work/cortexa57-wrs-linux/openipmi/2.0.37/sources/OpenIPMI-2.0.37/lanserv/sdrcomp'
aarch64-wrs-linux-gcc -mcpu=cortex-a57+crc -mbranch-protection=standard -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/tmp/work/cortexa57-wrs-linux/openipmi/2.0.37/recipe-sysroot -DHAVE_CONFIG_H -I. -I../.. -DSTATEDIR='"/var"' -Wall -Wsign-compare -I../../include -I../../lanserv -I../../utils -O2 -g -fcanon-prefix-map -ffile-prefix-map=/tmp/work/cortexa57-wrs-linux/openipmi/2.0.37/sources/OpenIPMI-2.0.37=/usr/src/debug/openipmi/2.0.37 -ffile-prefix-map=/tmp/work/cortexa57-wrs-linux/openipmi/2.0.37/sources/OpenIPMI-2.0.37=/usr/src/debug/openipmi/2.0.37 -ffile-prefix-map=/tmp/work/cortexa57-wrs-linux/openipmi/2.0.37/recipe-sysroot= -ffile-prefix-map=/tmp/work/cortexa57-wrs-linux/openipmi/2.0.37/recipe-sysroot-native= -pipe -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -c -o sdrcomp.o sdrcomp.c gcc -o sdrcomp_build ../../lanserv/sdrcomp/sdrcomp.c -O2 -g -fcanon-prefix-map -ffile-prefix-map=/tmp/work/cortexa57-wrs-linux/openipmi/2.0.37/sources/OpenIPMI-2.0.37=/usr/src/debug/openipmi/2.0.37 -ffile-prefix-map=/tmp/work/cortexa57-wrs-linux/openipmi/2.0.37/sources/OpenIPMI-2.0.37=/usr/src/debug/openipmi/2.0.37 -ffile-prefix-map=/tmp/work/cortexa57-wrs-linux/openipmi/2.0.37/recipe-sysroot= -ffile-prefix-map=/tmp/work/cortexa57-wrs-linux/openipmi/2.0.37/recipe-sysroot-native= -pipe -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Wall -Wsign-compare -I../../include -I../../lanserv -I../../utils -lm
gcc: error: unrecognized command-line option ‘-fcanon-prefix-map’; did you mean ‘-fmacro-prefix-map=’?

* Pass BUILD_CFLAGS for BUILD_CC to fix the above build issue.

[1] https://git.openembedded.org/openembedded-core/commit/?id=3dbc4a79f01ebfc54da024c1460c06772659088d

---
 ...ile.am-Pass-BUILD_CFLAGS-to-BUILD_CC.patch | 35 +++++++++++++++++++
 .../openipmi/openipmi_2.0.37.bb               |  1 +
 2 files changed, 36 insertions(+)
 create mode 100644 meta-networking/recipes-support/openipmi/files/0001-Makefile.am-Pass-BUILD_CFLAGS-to-BUILD_CC.patch
meta-networking/recipes-support/openipmi/files/0001-Makefile.am-Pass-BUILD_CFLAGS-to-BUILD_CC.patch new file +35 -0
new file mode 100644
index 0000000000..5749263d13
@@ -0,0 +1,35 @@
+From 05d8f730b746d73a1efec7c42066953b5708c5b6 Mon Sep 17 00:00:00 2001
+From: Mingli Yu <[email protected]>
+Date: Tue, 2 Dec 2025 12:07:42 +0800
+Subject: [PATCH] Makefile.am: Pass BUILD_CFLAGS to BUILD_CC
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Pass BUILD_CFLAGS to BUILD_CC to fix the below error.
+   Making all in sdrcomp
+   make[3]: Entering directory '/tmp/work/cortexa57-wrs-linux/openipmi/2.0.37/sources/OpenIPMI-2.0.37/lanserv/sdrcomp'
+aarch64-wrs-linux-gcc  -mcpu=cortex-a57+crc -mbranch-protection=standard -fstack-protector-strong  -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/tmp/work/cortexa57-wrs-linux/openipmi/2.0.37/recipe-sysroot -DHAVE_CONFIG_H -I. -I../..  -DSTATEDIR='"/var"'  -Wall -Wsign-compare -I../../include -I../../lanserv -I../../utils -O2 -g -fcanon-prefix-map  -ffile-prefix-map=/tmp/work/cortexa57-wrs-linux/openipmi/2.0.37/sources/OpenIPMI-2.0.37=/usr/src/debug/openipmi/2.0.37  -ffile-prefix-map=/tmp/work/cortexa57-wrs-linux/openipmi/2.0.37/sources/OpenIPMI-2.0.37=/usr/src/debug/openipmi/2.0.37  -ffile-prefix-map=/tmp/work/cortexa57-wrs-linux/openipmi/2.0.37/recipe-sysroot=  -ffile-prefix-map=/tmp/work/cortexa57-wrs-linux/openipmi/2.0.37/recipe-sysroot-native=  -pipe -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -c -o sdrcomp.o sdrcomp.c
+gcc  -o sdrcomp_build ../../lanserv/sdrcomp/sdrcomp.c -O2 -g -fcanon-prefix-map  -ffile-prefix-map=/tmp/work/cortexa57-wrs-linux/openipmi/2.0.37/sources/OpenIPMI-2.0.37=/usr/src/debug/openipmi/2.0.37  -ffile-prefix-map=/tmp/work/cortexa57-wrs-linux/openipmi/2.0.37/sources/OpenIPMI-2.0.37=/usr/src/debug/openipmi/2.0.37  -ffile-prefix-map=/tmp/work/cortexa57-wrs-linux/openipmi/2.0.37/recipe-sysroot=  -ffile-prefix-map=/tmp/work/cortexa57-wrs-linux/openipmi/2.0.37/recipe-sysroot-native=  -pipe -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Wall -Wsign-compare -I../../include -I../../lanserv -I../../utils -lm
+   gcc: error: unrecognized command-line option ‘-fcanon-prefix-map’; did you mean ‘-fmacro-prefix-map=’?
+
+Upstream-Status: Inappropriate [OE specific]
+
+Signed-off-by: Mingli Yu <[email protected]>
+---
+ lanserv/sdrcomp/Makefile.am | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lanserv/sdrcomp/Makefile.am b/lanserv/sdrcomp/Makefile.am
+index e473af8..057a536 100644
+--- a/lanserv/sdrcomp/Makefile.am
++++ b/lanserv/sdrcomp/Makefile.am
+@@ -19,4 +19,4 @@ BUILD_SDRCOMP_DEPS = $(top_srcdir)/lanserv/persist.c \
+ 	$(top_srcdir)/utils/string.c
+ BUILD_SDRCOMP_SRCS = $(top_srcdir)/$(subdir)/sdrcomp.c
+ sdrcomp_build$(EXEEXT): $(BUILD_SDRCOMP_SRCS) $(BUILD_SDRCOMP_DEPS)
+-	$(BUILD_CC) -o $@ $(BUILD_SDRCOMP_SRCS) $(CFLAGS) $(AM_CFLAGS) -lm
++	$(BUILD_CC) -o $@ $(BUILD_SDRCOMP_SRCS) $(BUILD_CFLAGS) $(AM_CFLAGS) -lm
+-- 
+2.34.1
+
meta-networking/recipes-support/openipmi/openipmi_2.0.37.bb +1 -0
index 090b54846c..db74b91f7e 100644
@@ -28,6 +28,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/openipmi/OpenIPMI-${PV}.tar.gz \
            file://openipmi-no-openipmigui-man.patch \
            file://ipmi-init-fix-the-arguments.patch \
            file://include_sys_types.patch \
+           file://0001-Makefile.am-Pass-BUILD_CFLAGS-to-BUILD_CC.patch \
            file://openipmi-helper \
            file://ipmi.service \
            "
Signature · 1 line
2.34.1