diff options
author | Felix Fietkau <nbd@openwrt.org> | 2016-01-25 15:49:31 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2016-01-25 15:49:31 +0000 |
commit | b737686b2c5277bfa62705c41e71ad60e1d44ae8 (patch) | |
tree | 1c82a6767d8f92c5491cc8e76dd240e2a1847ec1 /include | |
parent | 0ae15ad439e4830cafd409c2d2531d90aa803300 (diff) | |
download | upstream-b737686b2c5277bfa62705c41e71ad60e1d44ae8.tar.gz upstream-b737686b2c5277bfa62705c41e71ad60e1d44ae8.tar.bz2 upstream-b737686b2c5277bfa62705c41e71ad60e1d44ae8.zip |
build: use -iremap feature to replace __FILE__ absolute path names in packages with ones relative to $(BUILD_DIR)
improves reproducible builds
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
SVN-Revision: 48489
Diffstat (limited to 'include')
-rw-r--r-- | include/package.mk | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/package.mk b/include/package.mk index 1dfbd68d33..ca315b59ac 100644 --- a/include/package.mk +++ b/include/package.mk @@ -14,6 +14,7 @@ PKG_INSTALL_DIR ?= $(PKG_BUILD_DIR)/ipkg-install PKG_MD5SUM ?= unknown PKG_BUILD_PARALLEL ?= PKG_USE_MIPS16 ?= 1 +PKG_IREMAP ?= 1 ifneq ($(CONFIG_PKG_BUILD_USE_JOBSERVER),) MAKE_J:=$(if $(MAKE_JOBSERVER),$(MAKE_JOBSERVER) -j) @@ -33,6 +34,10 @@ ifdef CONFIG_USE_MIPS16 TARGET_CFLAGS += -mips16 -minterlink-mips16 endif endif +ifeq ($(strip $(PKG_IREMAP)),1) + IREMAP_CFLAGS = $(call iremap,$(PKG_BUILD_DIR),$(notdir $(PKG_BUILD_DIR))) + TARGET_CFLAGS += $(IREMAP_CFLAGS) +endif include $(INCLUDE_DIR)/hardening.mk include $(INCLUDE_DIR)/prereq.mk |