From 1cc48e865b2faa3f8147c15fcec4c24c46b3d63f Mon Sep 17 00:00:00 2001 From: Ian Campbell Date: Fri, 15 Mar 2013 13:15:42 +0000 Subject: tools: Use AC_SYS_LARGEFILE instead of calling getconf(1) getconf is not cross-compile friendly since it reports the features of the host and not the target. There doesn't appear to be a $triplet-getconf. AC_SYS_LARGEFILE arranges for #defines to appear in config.h however Xen's build system expects these to be part of C{PP}FLAGS. Since I'm not confident that everything in Xen includes config.h I instead arrange for the result of running AC_SYS_LARGERFILE to end up in CFLAGS. Signed-off-by: Ian Campbell Acked-by: Ian Jackson --- tools/Rules.mk | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'tools/Rules.mk') diff --git a/tools/Rules.mk b/tools/Rules.mk index 8d55e038f0..3f03a315c4 100644 --- a/tools/Rules.mk +++ b/tools/Rules.mk @@ -65,11 +65,12 @@ CFLAGS += -D__XEN_TOOLS__ CFLAGS += -MMD -MF .$(@F).d DEPS = .*.d +ifneq ($(FILE_OFFSET_BITS),) +CFLAGS += -D_FILE_OFFSET_BITS=$(FILE_OFFSET_BITS) +endif ifneq ($(XEN_OS),NetBSD) # Enable implicit LFS support *and* explicit LFS names. -CFLAGS += $(shell getconf LFS_CFLAGS) CFLAGS += -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -LDFLAGS += $(shell getconf LFS_LDFLAGS) endif # 32-bit x86 does not perform well with -ve segment accesses on Xen. -- cgit v1.2.3