Skip to contentSkip to conversation

package/mtd: fix build with libexecinfo

PATCH Applied Fabrice Fontaine 2 participants 2 messages Jan 15, 2022 – Feb 1, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/mtd: fix build with libexecinfo

Fix the following build failure raised on uclibc and musl since the addition of libexecinfo package in commit eea8ba446c10701a273432552108d80fb2224ef4:

/home/buildroot/autobuild/instance-3/output-1/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-musleabihf/10.3.0/../../../../arm-buildroot-linux-musleabihf/bin/ld: tests/fs-tests/integrity/integck-integck.o: in function `check_failed.constprop.0':
integck.c:(.text+0x96c): undefined reference to `backtrace'

Fixes:
- http://autobuild.buildroot.org/results/9409ebf6517db87672f3f4df5909a8ac4abfe8af

---
 package/mtd/mtd.mk | 9 +++++++++
 1 file changed, 9 insertions(+)
package/mtd/mtd.mk +9 -0
index 9f4cc27ef1..45e7c0c61c 100644
@@ -13,6 +13,15 @@ MTD_CPE_ID_VENDOR = mtd-utils_project
 MTD_CPE_ID_PRODUCT = mtd-utils
 MTD_INSTALL_STAGING = YES
 
+MTD_LDFLAGS = $(TARGET_LDFLAGS)
+
+ifeq ($(BR2_PACKAGE_LIBEXECINFO),y)
+MTD_DEPENDENCIES += libexecinfo
+MTD_LDFLAGS += -lexecinfo
+endif
+
+MTD_CONF_ENV += LDFLAGS="$(MTD_LDFLAGS)"
+
 ifeq ($(BR2_PACKAGE_MTD_JFFS_UTILS),y)
 MTD_DEPENDENCIES += zlib lzo host-pkgconf
 MTD_CONF_OPTS += --with-jffs
Signature · 6 lines
2.34.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw
Quoted 11 lines · Fabrice Fontaine

Fix the following build failure raised on uclibc and musl since the addition of libexecinfo package in commit eea8ba446c10701a273432552108d80fb2224ef4:

/home/buildroot/autobuild/instance-3/output-1/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-musleabihf/10.3.0/../../../../arm-buildroot-linux-musleabihf/bin/ld: tests/fs-tests/integrity/integck-integck.o: in function `check_failed.constprop.0':
integck.c:(.text+0x96c): undefined reference to `backtrace'

Fixes:
- http://autobuild.buildroot.org/results/9409ebf6517db87672f3f4df5909a8ac4abfe8af

Applied to master, thanks.

Regards,
Arnout

Quoted 14 lines
---
  package/mtd/mtd.mk | 9 +++++++++
  1 file changed, 9 insertions(+)
package/mtd/mtd.mk +2 -0
index 9f4cc27ef1..45e7c0c61c 100644
@@ -13,6 +13,15 @@ MTD_CPE_ID_VENDOR = mtd-utils_project
  MTD_CPE_ID_PRODUCT = mtd-utils
  MTD_INSTALL_STAGING = YES
 
+MTD_LDFLAGS = $(TARGET_LDFLAGS)
+

package/mtd/mtd.mk MTD_CPE_ID_VENDOR = mtd-utils_project · line 27

Quoted 10 lines
package/mtd/mtd.mk +7 -0
+ifeq ($(BR2_PACKAGE_LIBEXECINFO),y)
+MTD_DEPENDENCIES += libexecinfo
+MTD_LDFLAGS += -lexecinfo
+endif
+
+MTD_CONF_ENV += LDFLAGS="$(MTD_LDFLAGS)"
+
  ifeq ($(BR2_PACKAGE_MTD_JFFS_UTILS),y)
  MTD_DEPENDENCIES += zlib lzo host-pkgconf
  MTD_CONF_OPTS += --with-jffs

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot