Skip to contentSkip to conversation

klibc: Compile with -fcommon

PATCH New Khem Raj 1 participant 2 messages Aug 13, 2020

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/2 klibc: Compile with -fcommon

gcc 10 defaults to -fno-common, but klibc does not build with -fno-common, it will need some work to get there, until then use -fcommon explicitly

---
 meta-initramfs/recipes-devtools/klibc/klibc.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta-initramfs/recipes-devtools/klibc/klibc.inc +1 -1
index 54cd3c24bc..243107e9ae 100644
@@ -35,7 +35,7 @@ SRC_URI[sha256sum] = "abef2637ca823485d9c90ce9512e2b08a65047ec4da204635eeaef95a4
 
 S = "${WORKDIR}/klibc-${PV}"
 
-OPTFLAGS = "${TUNE_CCARGS} -Os"
+OPTFLAGS = "${TUNE_CCARGS} -Os -fcommon"
 OPTFLAGS_append_toolchain-clang = " -fno-builtin-bcmp"
 OPTFLAGS_append_toolchain-clang_mipsarch = " -no-integrated-as"
 
Signature · 1 line
2.28.0
author
#1 lore raw

PATCH 2/2 kexecboot: Use -fcommon to compile

gcc10 defaults to -fno-common and kexecboot does not compile with -fno-common, so use -fcommon explicitly

---
 meta-initramfs/recipes-bsp/kexecboot/kexecboot_git.bb | 2 ++
 1 file changed, 2 insertions(+)
meta-initramfs/recipes-bsp/kexecboot/kexecboot_git.bb +2 -0
index ed3dece3f6..2f46fa9523 100644
@@ -13,6 +13,8 @@ inherit autotools
 
 EXTRA_OECONF = "--enable-textui --enable-delay=2 --enable-evdev-rate=1000,250"
 
+CFLAGS += "-fcommon"
+
 do_install () {
     install -D -m 0755 ${B}/src/kexecboot ${D}${bindir}/kexecboot
     install -d ${D}/proc
Signature · 1 line
2.28.0