Commit 23f6455b authored by Peter Korsgaard's avatar Peter Korsgaard
Browse files

strace: fix build with BR2_LARGEFILE

http://autobuild.buildroot.net/results/4ce0ce4dcb917889ef70208bd4bac63851c1fb92

Strace gets confused when built with -D_FILE_OFFSET_BITS=64 (which
transparently uses the lfs versions of functions/types), so strip this
from compiler/preprocessor flags.

Inspired by Gentoo who does the same:
http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/dev-util/strace/strace-4.7.ebuild



Tested using qemu_arm_versatile_defconfig and the following command line:
strace dd if=/dev/zero bs=1M skip=5000 count=1 of=/dev/null

Signed-off-by: default avatarPeter Korsgaard <jacmet@sunsite.dk>
parent 6fce747d
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -12,6 +12,13 @@ STRACE_CONF_ENV = ac_cv_header_linux_if_packet_h=yes \
		  ac_cv_header_linux_netlink_h=yes \
	          $(if $(BR2_LARGEFILE),ac_cv_type_stat64=yes,ac_cv_type_stat64=no)

ifeq ($(BR2_LARGEFILE),y)
# strace gets confused when lfs mode is forced, so don't
STRACE_CONF_ENV += \
	CFLAGS="$(filter-out -D_FILE_OFFSET_BITS=64,$(TARGET_CFLAGS))" \
	CPPFLAGS="$(filter-out -D_FILE_OFFSET_BITS=64,$(TARGET_CPPFLAGS))"
endif

define STRACE_REMOVE_STRACE_GRAPH
	rm -f $(TARGET_DIR)/usr/bin/strace-graph
endef