]> www.infradead.org Git - mtd-utils.git/commitdiff
build: add option to not force largefile support
authorPeter Korsgaard <jacmet@sunsite.dk>
Wed, 3 Feb 2010 09:18:46 +0000 (10:18 +0100)
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Mon, 15 Feb 2010 13:41:42 +0000 (15:41 +0200)
Not all systems have largefile support (E.G. uClibc depending on config),
so unconditionally enforcing largefile breaks the build.

Work around it by adding a WITHOUT_LARGEFILE flag, similar to the existing
WITHOUT_XATTR.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
common.mk

index 5e92b07e4e31da9c03370a0f2fdd05c15b2c5049..d704b44ad9521a31903d85ee1d44486e78b05a52 100644 (file)
--- a/common.mk
+++ b/common.mk
@@ -12,7 +12,10 @@ WFLAGS := -Wall \
        $(call cc-option,-Wwrite-strings) \
        $(call cc-option,-Wno-sign-compare)
 CFLAGS += $(WFLAGS)
-CPPFLAGS += -D_FILE_OFFSET_BITS=64
+
+ifneq ($(WITHOUT_LARGEFILE), 1)
+  CPPFLAGS += -D_FILE_OFFSET_BITS=64
+endif
 
 DESTDIR ?= /usr/local
 PREFIX=/usr