![Fabrice Fontaine](/assets/img/avatar_default.png)
TARGET_LDFLAGS which contains -static is not passed so build fails on: /home/buildroot/autobuild/instance-1/output-1/host/bin/xtensa-buildroot-linux-uclibc-gcc -o lsof dfile.o dmnt.o dnode.o dproc.o dsock.o dstore.o arg.o main.o misc.o node.o print.o proc.o store.o usage.o util.o -L./lib -llsof -ltirpc /home/buildroot/autobuild/instance-1/output-1/host/lib/gcc/xtensa-buildroot-linux-uclibc/8.3.0/../../../../xtensa-buildroot-linux-uclibc/bin/ld: /home/buildroot/autobuild/instance-1/output-1/host/lib/gcc/xtensa-buildroot-linux-uclibc/8.3.0/libgcc.a(unwind-dw2-fde-dip.o): in function `_Unwind_Find_registered_FDE': /home/buildroot/autobuild/instance-1/output-1/build/host-gcc-final-8.3.0/build/xtensa-buildroot-linux-uclibc/libgcc/../../../libgcc/unwind-dw2-fde.c:1040: undefined reference to `dl_iterate_phdr' collect2: error: ld returned 1 exit status Pass TARGET_LDFLAGS thanks to LSOF_CFGL Fixes: - http://autobuild.buildroot.org/results/0c228e0d3ea1ff2d728ddc906e242d40ed973222 Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
51 lines
1.4 KiB
Makefile
51 lines
1.4 KiB
Makefile
################################################################################
|
|
#
|
|
# lsof
|
|
#
|
|
################################################################################
|
|
|
|
LSOF_VERSION = 4.93.2
|
|
LSOF_SITE = $(call github,lsof-org,lsof,$(LSOF_VERSION))
|
|
LSOF_LICENSE = lsof license
|
|
# License is repeated in each file, this is a relatively small one.
|
|
# It is also defined in 00README, but that contains a lot of other cruft.
|
|
LSOF_LICENSE_FILES = dialects/linux/dproto.h
|
|
|
|
ifeq ($(BR2_PACKAGE_LIBTIRPC),y)
|
|
LSOF_DEPENDENCIES += libtirpc
|
|
endif
|
|
|
|
ifeq ($(BR2_USE_WCHAR),)
|
|
define LSOF_CONFIGURE_WCHAR_FIXUPS
|
|
$(SED) 's,^#define[[:space:]]*HASWIDECHAR.*,#undef HASWIDECHAR,' \
|
|
$(@D)/machine.h
|
|
endef
|
|
endif
|
|
|
|
ifeq ($(BR2_ENABLE_LOCALE),)
|
|
define LSOF_CONFIGURE_LOCALE_FIXUPS
|
|
$(SED) 's,^#define[[:space:]]*HASSETLOCALE.*,#undef HASSETLOCALE,' \
|
|
$(@D)/machine.h
|
|
endef
|
|
endif
|
|
|
|
define LSOF_CONFIGURE_CMDS
|
|
(cd $(@D) ; \
|
|
echo n | $(TARGET_CONFIGURE_OPTS) DEBUG="$(TARGET_CFLAGS)" \
|
|
LSOF_INCLUDE="$(STAGING_DIR)/usr/include" LSOF_CFLAGS_OVERRIDE=1 \
|
|
LINUX_CLIB=-DGLIBCV=2 LSOF_CFGL="$(TARGET_LDFLAGS)" \
|
|
./Configure linux)
|
|
$(LSOF_CONFIGURE_WCHAR_FIXUPS)
|
|
$(LSOF_CONFIGURE_LOCALE_FIXUPS)
|
|
endef
|
|
|
|
define LSOF_BUILD_CMDS
|
|
$(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) DEBUG="$(TARGET_CFLAGS)" -C $(@D)
|
|
endef
|
|
|
|
define LSOF_INSTALL_TARGET_CMDS
|
|
$(INSTALL) -D -m 755 $(@D)/lsof $(TARGET_DIR)/usr/bin/lsof
|
|
endef
|
|
|
|
$(eval $(generic-package))
|