TARGET_CFLAGS+=-fno-pic -mno-abicalls
endif
+ifeq ($(BR2_LARGEFILE),y)
+TARGET_CFLAGS+=-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
+endif
+
TARGET_CXXFLAGS=$(TARGET_CFLAGS)
# else it's an external toolchain
LZMA_SITE:=http://tukaani.org/lzma/
LZMA_HOST_DIR:=$(TOOL_BUILD_DIR)/lzma-$(LZMA_VERSION)
LZMA_TARGET_DIR:=$(BUILD_DIR)/lzma-$(LZMA_VERSION)
-LZMA_CFLAGS:=$(TARGET_CFLAGS)
-ifeq ($(BR2_LARGEFILE),y)
-LZMA_CFLAGS+=-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
-endif
LZMA_TARGET_BINARY:=bin/lzma
# lzma binary for use on the host
(cd $(LZMA_TARGET_DIR); rm -f config.cache;\
$(TARGET_CONFIGURE_OPTS) \
$(TARGET_CONFIGURE_ARGS) \
- CFLAGS="$(TARGET_CFLAGS) $(LZMA_CFLAGS)" \
+ CFLAGS="$(TARGET_CFLAGS)" \
ac_cv_func_malloc_0_nonnull=yes \
./configure \
--target=$(GNU_TARGET_NAME) \
MKDOSFS_BINARY:=mkdosfs/mkdosfs
MKDOSFS_TARGET_BINARY:=sbin/mkdosfs
-MKDOSFS_CFLAGS=$(TARGET_CFLAGS)
-ifeq ($(BR2_LARGEFILE),y)
-MKDOSFS_CFLAGS+= -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
-endif
-
$(DL_DIR)/$(MKDOSFS_SOURCE):
$(WGET) -P $(DL_DIR) $(MKDOSFS_SITE)/$(MKDOSFS_SOURCE)
touch $(MKDOSFS_DIR)/.unpacked
$(MKDOSFS_DIR)/$(MKDOSFS_BINARY): $(MKDOSFS_DIR)/.unpacked
- $(MAKE) CFLAGS="$(MKDOSFS_CFLAGS)" CC="$(TARGET_CC)" -C $(MKDOSFS_DIR)
+ $(MAKE) CFLAGS="$(TARGET_CFLAGS)" CC="$(TARGET_CC)" -C $(MKDOSFS_DIR)
$(STRIPCMD) $(MKDOSFS_DIR)/mkdosfs/mkdosfs
touch -c $(MKDOSFS_DIR)/mkdosfs/mkdosfs
NEWT_SITE=http://www.uclibc.org/
NEWT_DIR=$(BUILD_DIR)/newt-0.51.0
NEWT_VERSION=0.51.0
-ifeq ($(BR2_LARGEFILE),y)
-NEWT_CFLAGS=-Os -g -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
-else
-NEWT_CFLAGS=-Os -g
-endif
-NEWT_CFLAGS+=-fPIC
+NEWT_CFLAGS=-Os -g -fPIC
$(DL_DIR)/$(NEWT_SOURCE):
$(WGET) -P $(DL_DIR) $(NEWT_SITE)/$(NEWT_SOURCE)
SLANG_CAT:=$(BZCAT)
SLANG_SITE:=http://www.uclibc.org/
SLANG_DIR=$(BUILD_DIR)/slang-$(SLANG_VERSION)-mini
-ifeq ($(BR2_LARGEFILE),y)
-SLANG_CFLAGS=-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
-endif
-SLANG_CFLAGS+=-fPIC
$(DL_DIR)/$(SLANG_SOURCE):
$(WGET) -P $(DL_DIR) $(SLANG_SITE)/$(SLANG_SOURCE)
$(SLANG_CAT) $(DL_DIR)/$(SLANG_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
$(SLANG_DIR)/libslang.so: $(SLANG_DIR)
- $(MAKE1) CFLAGS="-Os -g $(SLANG_CFLAGS)" CC=$(TARGET_CC) -C $(SLANG_DIR)
+ $(MAKE1) CFLAGS="-Os -g -fPIC $(TARGET_CFLAGS)" CC=$(TARGET_CC) -C $(SLANG_DIR)
$(STAGING_DIR)/lib/libslang.so.1: $(SLANG_DIR)/libslang.so
cp -dpf $(SLANG_DIR)/libslang.a $(STAGING_DIR)/usr/lib
STRACE_CAT:=$(BZCAT)
STRACE_DIR:=$(BUILD_DIR)/strace-$(STRACE_VERSION)
-BR2_STRACE_CFLAGS:=
-ifeq ($(BR2_LARGEFILE),)
-BR2_STRACE_CFLAGS+=-U_LARGEFILE64_SOURCE -U__USE_LARGEFILE64 -U__USE_FILE_OFFSET64
-endif
-
$(DL_DIR)/$(STRACE_SOURCE):
$(WGET) -P $(DL_DIR) $(STRACE_SITE)/$(STRACE_SOURCE)
$(if $(BR2_LARGEFILE),ac_cv_type_stat64=yes,ac_cv_type_stat64=no) \
$(TARGET_CONFIGURE_OPTS) \
$(TARGET_CONFIGURE_ARGS) \
- CFLAGS="$(TARGET_CFLAGS) $(BR2_STRACE_CFLAGS)" \
+ CFLAGS="$(TARGET_CFLAGS)" \
ac_cv_header_linux_if_packet_h=yes \
ac_cv_header_linux_netlink_h=yes \
./configure \
else
VSFTPD_LIBS:=-lcrypt
endif
-ifeq ($(BR2_LARGEFILE),)
-#BR2_VSFTPD_CFLAGS:=-U_LARGEFILE64_SOURCE -U_FILE_OFFSET_BITS
-endif
$(DL_DIR)/$(VSFTPD_SOURCE):
$(WGET) -P $(DL_DIR) $(VSFTPD_SITE)/$(VSFTPD_SOURCE)
$(VSFTPD_DIR)/$(VSFTPD_BINARY): $(VSFTPF_PREREQ) $(VSFTPD_DIR)/.configured
- $(MAKE) CC=$(TARGET_CC) CFLAGS="$(TARGET_CFLAGS) $(BR2_VSFTPD_CFLAGS)" LIBS="$(VSFTPD_LIBS)" -C $(VSFTPD_DIR)
+ $(MAKE) CC=$(TARGET_CC) CFLAGS="$(TARGET_CFLAGS)" LIBS="$(VSFTPD_LIBS)" -C $(VSFTPD_DIR)
$(TARGET_DIR)/usr/sbin/$(VSFTPD_BINARY): $(VSFTPD_DIR)/$(VSFTPD_BINARY)
cp -dpf $< $@
ZLIB_CAT:=$(BZCAT)
ZLIB_SITE:=http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/libpng
ZLIB_DIR:=$(BUILD_DIR)/zlib-$(ZLIB_VERSION)
-ZLIB_CFLAGS:=-fPIC
-ifeq ($(BR2_LARGEFILE),y)
-ZLIB_CFLAGS+=-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
-endif
$(DL_DIR)/$(ZLIB_SOURCE):
$(WGET) -P $(DL_DIR) $(ZLIB_SITE)/$(ZLIB_SOURCE)
(cd $(ZLIB_DIR); rm -rf config.cache; \
$(TARGET_CONFIGURE_ARGS) \
$(TARGET_CONFIGURE_OPTS) \
- CFLAGS="$(ZLIB_CFLAGS)" \
+ CFLAGS="$(TARGET_CFLAGS) -fPIC" \
./configure \
--shared \
--prefix=/usr \