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))
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
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
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)
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
PYTHON:=python
INSTALL_BIN:=install -m0755
+INSTALL_SUID:=install -m4755
INSTALL_DIR:=install -d -m0755
INSTALL_DATA:=install -m0644
INSTALL_CONF:=install -m0600
export TARGET_CC_NOCACHE
export TARGET_CXX_NOCACHE
export HOSTCC_NOCACHE
+export HOSTCXX_NOCACHE
ifneq ($(CONFIG_CCACHE),)
TARGET_CC:= ccache_cc
# 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