X-Git-Url: http://git.openwrt.org/?a=blobdiff_plain;f=rules.mk;h=d90e0ffed09867bc3f39278b7109cdfa523391f1;hb=2203815f05162c357fbf96b3da8098f687a86d04;hp=a97b2d2155695c3a15f361ea2fe95b977be05959;hpb=2fbf669730bfa7342b36711d275bfe4c7951ac1b;p=openwrt%2Fopenwrt.git diff --git a/rules.mk b/rules.mk index a97b2d2155..d90e0ffed0 100644 --- a/rules.mk +++ b/rules.mk @@ -141,6 +141,10 @@ endif ifeq ($(or $(CONFIG_EXTERNAL_TOOLCHAIN),$(CONFIG_GCC_VERSION_4_8),$(CONFIG_TARGET_uml)),) iremap = -iremap$(1):$(2) + # just overwrite iremap for GCC 8.1 and higher to keep backward compatibility + ifeq ($(CONFIG_GCC_VERSION_8),y) + iremap = -fmacro-prefix-map=$(1)=$(2) + endif endif PACKAGE_DIR:=$(BIN_DIR)/packages @@ -390,8 +394,9 @@ endef # Calculate sha256sum of any plain file within a given directory # $(1) => Input directory +# $(2) => If set, recurse into subdirectories define sha256sums - (cd $(1); find . -maxdepth 1 -type f -not -name 'sha256sums' -printf "%P\n" | sort | \ + (cd $(1); find . $(if $(2),,-maxdepth 1) -type f -not -name 'sha256sums' -printf "%P\n" | sort | \ xargs -r $(STAGING_DIR_HOST)/bin/mkhash -n sha256 | sed -ne 's!^\(.*\) \(.*\)$$!\1 *\2!p' > sha256sums) endef