kumquat-buildroot/package/linux-tools/linux-tool-tmon.mk.in
Fabrice Fontaine 2cbcdbf0ad package/linux-tools: fix tmon static build with uclibc
Pass LDFLAGS (which will contain -static) to fix the following tmon
static build failure with uclibc:

/home/autobuild/autobuild/instance-3/output-1/host/bin/x86_64-buildroot-linux-uclibc-gcc -O3 -Wall -Wshadow -W -Wformat -Wimplicit-function-declaration -Wimplicit-int  -D VERSION=\"1.0\"   tmon.o tui.o sysfs.o pid.o  -o tmon -lm -lpthread -lpanel -lncurses
/home/autobuild/autobuild/instance-3/output-1/host/lib/gcc/x86_64-buildroot-linux-uclibc/10.3.0/../../../../x86_64-buildroot-linux-uclibc/bin/ld: /home/autobuild/autobuild/instance-3/output-1/host/lib/gcc/x86_64-buildroot-linux-uclibc/10.3.0/libgcc.a(unwind-dw2-fde-dip.o): in function `_Unwind_Find_FDE':
/home/autobuild/autobuild/instance-3/output-1/build/host-gcc-final-10.3.0/build/x86_64-buildroot-linux-uclibc/libgcc/../../../libgcc/unwind-dw2-fde-dip.c:469: undefined reference to `dl_iterate_phdr'

Fixes:
 - http://autobuild.buildroot.org/results/58f4cdb734b68afb02595d004e7ca19a15d1abcc

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2022-06-06 14:54:22 +02:00

39 lines
1.0 KiB
Makefile

################################################################################
#
# tmon
#
################################################################################
LINUX_TOOLS += tmon
TMON_DEPENDENCIES = host-pkgconf ncurses
TMON_MAKE_OPTS = $(LINUX_MAKE_FLAGS) \
CC=$(TARGET_CC) \
LDFLAGS="$(TARGET_LDFLAGS)" \
PKG_CONFIG_PATH=$(STAGING_DIR)/usr/lib/pkgconfig
ifeq ($(BR2_TOOLCHAIN_HAS_SSP),)
define TMON_DISABLE_STACK_PROTECTOR
$(SED) 's%-fstack-protector%%' $(LINUX_DIR)/tools/thermal/tmon/Makefile
endef
endif
define TMON_BUILD_CMDS
$(Q)if ! grep install $(LINUX_DIR)/tools/thermal/tmon/Makefile >/dev/null 2>&1 ; then \
echo "Your kernel version is too old and does not have the tmon tool." ; \
echo "At least kernel 3.13 must be used." ; \
exit 1 ; \
fi
$(TMON_DISABLE_STACK_PROTECTOR)
$(TARGET_MAKE_ENV) $(MAKE) -C $(LINUX_DIR)/tools \
$(TMON_MAKE_OPTS) \
tmon
endef
define TMON_INSTALL_TARGET_CMDS
$(TARGET_MAKE_ENV) $(MAKE) -C $(LINUX_DIR)/tools \
$(TMON_MAKE_OPTS) \
INSTALL_ROOT=$(TARGET_DIR) \
tmon_install
endef