mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
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 <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
This commit is contained in:
1 parent
eb60be3dd8
commit
1cc48e865b
5 files changed
+1042
-273
No files matched your search
@@ -60,3 +60,5 @@ CONFIG_LIBICONV := @libiconv@
|
||||
CONFIG_GCRYPT := @libgcrypt@
|
||||
EXTFS_LIBS := @EXTFS_LIBS@
|
||||
CURSES_LIBS := @CURSES_LIBS@
|
||||
|
||||
FILE_OFFSET_BITS := @FILE_OFFSET_BITS@
|
||||
+3
-2
@@ -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.
|
||||
|
||||
@@ -68,3 +68,9 @@
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
#undef STDC_HEADERS
|
||||
|
||||
/* Number of bits in a file offset, on hosts where this is settable. */
|
||||
#undef _FILE_OFFSET_BITS
|
||||
|
||||
/* Define for large files, on AIX-style hosts. */
|
||||
#undef _LARGE_FILES
|
||||
Vendored
+1021
-271
File diff suppressed because it is too large.
Load diff
@@ -21,6 +21,16 @@ APPEND_INCLUDES and APPEND_LIB instead when possible.])
|
||||
|
||||
AC_CANONICAL_HOST
|
||||
|
||||
AC_SYS_LARGEFILE
|
||||
|
||||
case $ac_cv_sys_file_offset_bits in #(
|
||||
no | unknown) ;;
|
||||
*)
|
||||
FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits
|
||||
;;
|
||||
esac
|
||||
AC_SUBST(FILE_OFFSET_BITS)
|
||||
|
||||
# M4 Macro includes
|
||||
m4_include([../m4/savevar.m4])
|
||||
m4_include([../m4/features.m4])
|
||||
|
||||