a29e7fb676
Pass TARGET_LDFLAGS (which contains -static) to fix the following static build failures with gpio, iio and pci: LINK lsgpio /home/autobuild/autobuild/instance-8/output-1/host/lib/gcc/arm-buildroot-linux-musleabi/10.4.0/../../../../arm-buildroot-linux-musleabi/bin/ld: /home/autobuild/autobuild/instance-8/output-1/host/lib/gcc/arm-buildroot-linux-musleabi/10.4.0/libgcc.a(_dvmd_lnx.o): in function `__aeabi_ldiv0': /home/autobuild/autobuild/instance-8/output-1/build/host-gcc-final-10.4.0/build/arm-buildroot-linux-musleabi/libgcc/../../../libgcc/config/arm/lib1funcs.S:1499: undefined reference to `raise' [...] LINK iio_event_monitor /home/thomas/autobuild/instance-2/output-1/host/lib/gcc/microblazeel-buildroot-linux-musl/11.3.0/../../../../microblazeel-buildroot-linux-musl/bin/ld: /home/thomas/autobuild/instance-2/output-1/host/lib/gcc/microblazeel-buildroot-linux-musl/11.3.0/libgcc.a(unwind-dw2.o): in function `size_of_encoded_value': /home/thomas/autobuild/instance-2/output-1/build/host-gcc-final-11.3.0/build/microblazeel-buildroot-linux-musl/libgcc/../../../libgcc/unwind-pe.h:88: undefined reference to `abort' Fixes: - http://autobuild.buildroot.org/results/f202eb843ef331939f5f12325bdbf2d0d664a7ce - http://autobuild.buildroot.org/results/504ec8be1ebd15c5da09f8b90bb723a58d4c58c5 Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
30 lines
825 B
Makefile
30 lines
825 B
Makefile
################################################################################
|
|
#
|
|
# iio
|
|
#
|
|
################################################################################
|
|
|
|
LINUX_TOOLS += iio
|
|
|
|
IIO_MAKE_OPTS = $(LINUX_MAKE_FLAGS) LDFLAGS="$(TARGET_LDFLAGS)"
|
|
|
|
define IIO_BUILD_CMDS
|
|
$(Q)if ! grep install $(LINUX_DIR)/tools/iio/Makefile >/dev/null 2>&1 ; then \
|
|
echo "Your kernel version is too old and does not have install section in the iio tools." ; \
|
|
echo "At least kernel 4.7 must be used." ; \
|
|
exit 1 ; \
|
|
fi
|
|
|
|
$(TARGET_MAKE_ENV) $(MAKE) -C $(LINUX_DIR)/tools/iio \
|
|
$(IIO_MAKE_OPTS)
|
|
endef
|
|
|
|
# DESTDIR used since kernel version 4.14
|
|
define IIO_INSTALL_TARGET_CMDS
|
|
$(TARGET_MAKE_ENV) $(MAKE) -C $(LINUX_DIR)/tools/iio \
|
|
$(IIO_MAKE_OPTS) \
|
|
INSTALL_ROOT=$(TARGET_DIR) \
|
|
DESTDIR=$(TARGET_DIR) \
|
|
install
|
|
endef
|