X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=rules.mk;h=90b1169cef4e14d4c1f5dbb041d0a95d52a92997;hb=c342e5132ba9fe18e072e0973afc3e44f9d181a9;hp=a97b2d2155695c3a15f361ea2fe95b977be05959;hpb=e3e88d37fdbec8cecb3cbb197fd71bc2671aa92d;p=librecmc%2Flibrecmc.git diff --git a/rules.mk b/rules.mk index a97b2d2155..90b1169cef 100644 --- a/rules.mk +++ b/rules.mk @@ -121,8 +121,8 @@ BUILD_DIR_BASE:=$(TOPDIR)/build_dir ifeq ($(CONFIG_EXTERNAL_TOOLCHAIN),) GCCV:=$(call qstrip,$(CONFIG_GCC_VERSION)) LIBC:=$(call qstrip,$(CONFIG_LIBC)) - REAL_GNU_TARGET_NAME=$(OPTIMIZE_FOR_CPU)-openwrt-linux$(if $(TARGET_SUFFIX),-$(TARGET_SUFFIX)) - GNU_TARGET_NAME=$(OPTIMIZE_FOR_CPU)-openwrt-linux + REAL_GNU_TARGET_NAME=$(OPTIMIZE_FOR_CPU)-librecmc-linux$(if $(TARGET_SUFFIX),-$(TARGET_SUFFIX)) + GNU_TARGET_NAME=$(OPTIMIZE_FOR_CPU)-librecmc-linux DIR_SUFFIX:=_$(LIBC)$(if $(CONFIG_arm),_eabi) BIN_DIR:=$(BIN_DIR)$(if $(CONFIG_USE_MUSL),,-$(LIBC)) TARGET_DIR_NAME = target-$(ARCH)$(ARCH_SUFFIX)$(DIR_SUFFIX)$(if $(BUILD_SUFFIX),_$(BUILD_SUFFIX)) @@ -140,7 +140,11 @@ else endif ifeq ($(or $(CONFIG_EXTERNAL_TOOLCHAIN),$(CONFIG_GCC_VERSION_4_8),$(CONFIG_TARGET_uml)),) - iremap = -iremap$(1):$(2) + ifeq ($(CONFIG_GCC_USE_EMBEDDED_PATH_REMAP),y) + iremap = -fmacro-prefix-map=$(1)=$(2) + else + iremap = -iremap$(1):$(2) + endif endif PACKAGE_DIR:=$(BIN_DIR)/packages @@ -179,8 +183,6 @@ else LIBGCC_A=$(lastword $(wildcard $(TOOLCHAIN_DIR)/lib/gcc/*/*/libgcc.a)) LIBGCC_S=$(if $(wildcard $(TOOLCHAIN_DIR)/lib/libgcc_s.so),-L$(TOOLCHAIN_DIR)/lib -lgcc_s,$(LIBGCC_A)) endif -LIBRPC=-lrpc -LIBRPC_DEPENDS=+librpc ifeq ($(CONFIG_ARCH_64BIT),y) LIB_SUFFIX:=64 @@ -190,7 +192,7 @@ ifndef DUMP ifeq ($(CONFIG_EXTERNAL_TOOLCHAIN),) -include $(TOOLCHAIN_DIR)/info.mk export GCC_HONOUR_COPTS:=0 - TARGET_CROSS:=$(if $(TARGET_CROSS),$(TARGET_CROSS),$(OPTIMIZE_FOR_CPU)-openwrt-linux$(if $(TARGET_SUFFIX),-$(TARGET_SUFFIX))-) + TARGET_CROSS:=$(if $(TARGET_CROSS),$(TARGET_CROSS),$(OPTIMIZE_FOR_CPU)-librecmc-linux$(if $(TARGET_SUFFIX),-$(TARGET_SUFFIX))-) TARGET_CFLAGS+= -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result TARGET_CPPFLAGS+= -I$(TOOLCHAIN_DIR)/usr/include ifeq ($(CONFIG_USE_MUSL),y) @@ -265,6 +267,7 @@ TARGET_CC:=$(TARGET_CROSS)gcc TARGET_CXX:=$(TARGET_CROSS)g++ KPATCH:=$(SCRIPT_DIR)/patch-kernel.sh SED:=$(STAGING_DIR_HOST)/bin/sed -i -e +ESED:=$(STAGING_DIR_HOST)/bin/sed -E -i -e CP:=cp -fpR LN:=ln -sf XARGS:=xargs -r @@ -276,6 +279,7 @@ PATCH:=patch PYTHON:=python INSTALL_BIN:=install -m0755 +INSTALL_SUID:=install -m4755 INSTALL_DIR:=install -d -m0755 INSTALL_DATA:=install -m0644 INSTALL_CONF:=install -m0600 @@ -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