mirror of
https://github.com/motioneye-project/motioneyeos.git
synced 2025-07-29 06:06:32 +00:00
gcc: use '.br_real' instead of '.real' suffix for the raw internal toolchain
If an externally built (non-Buildroot) toolchain also wraps the toolchain executables, there is a risk that it will also use the '.real' extension. To minimise this risk, use a more buildroot-specific extension instead: '.br_real', so we can detect that the external toolchain is built using Buildroot and get to the raw toolchain binaries. [Peter: reword description] Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
This commit is contained in:
parent
7de33e1380
commit
416326d47e
@ -236,7 +236,7 @@ HOST_GCC_COMMON_CONF_OPTS += \
|
|||||||
--with-long-double-128
|
--with-long-double-128
|
||||||
endif
|
endif
|
||||||
|
|
||||||
HOST_GCC_COMMON_TOOLCHAIN_WRAPPER_ARGS += -DBR_CROSS_PATH_SUFFIX='".real"'
|
HOST_GCC_COMMON_TOOLCHAIN_WRAPPER_ARGS += -DBR_CROSS_PATH_SUFFIX='".br_real"'
|
||||||
|
|
||||||
ifeq ($(BR2_CCACHE),y)
|
ifeq ($(BR2_CCACHE),y)
|
||||||
HOST_GCC_COMMON_CCACHE_HASH_FILES += $(DL_DIR)/$(GCC_SOURCE)
|
HOST_GCC_COMMON_CCACHE_HASH_FILES += $(DL_DIR)/$(GCC_SOURCE)
|
||||||
@ -272,23 +272,23 @@ endif # BR2_CCACHE
|
|||||||
# used. However, we should not add the toolchain wrapper for them, and they
|
# used. However, we should not add the toolchain wrapper for them, and they
|
||||||
# match the *cc-* pattern. Therefore, an additional case is added for *-ar,
|
# match the *cc-* pattern. Therefore, an additional case is added for *-ar,
|
||||||
# *-ranlib and *-nm.
|
# *-ranlib and *-nm.
|
||||||
# Avoid that a .real is symlinked a second time.
|
# Avoid that a .br_real is symlinked a second time.
|
||||||
# Also create <arch>-linux-<tool> symlinks.
|
# Also create <arch>-linux-<tool> symlinks.
|
||||||
define HOST_GCC_INSTALL_WRAPPER_AND_SIMPLE_SYMLINKS
|
define HOST_GCC_INSTALL_WRAPPER_AND_SIMPLE_SYMLINKS
|
||||||
$(Q)cd $(HOST_DIR)/usr/bin; \
|
$(Q)cd $(HOST_DIR)/usr/bin; \
|
||||||
for i in $(GNU_TARGET_NAME)-*; do \
|
for i in $(GNU_TARGET_NAME)-*; do \
|
||||||
case "$$i" in \
|
case "$$i" in \
|
||||||
*.real) \
|
*.br_real) \
|
||||||
;; \
|
;; \
|
||||||
*-ar|*-ranlib|*-nm) \
|
*-ar|*-ranlib|*-nm) \
|
||||||
ln -snf $$i $(ARCH)-linux$${i##$(GNU_TARGET_NAME)}; \
|
ln -snf $$i $(ARCH)-linux$${i##$(GNU_TARGET_NAME)}; \
|
||||||
;; \
|
;; \
|
||||||
*cc|*cc-*|*++|*++-*|*cpp) \
|
*cc|*cc-*|*++|*++-*|*cpp) \
|
||||||
rm -f $$i.real; \
|
rm -f $$i.br_real; \
|
||||||
mv $$i $$i.real; \
|
mv $$i $$i.br_real; \
|
||||||
ln -sf toolchain-wrapper $$i; \
|
ln -sf toolchain-wrapper $$i; \
|
||||||
ln -sf toolchain-wrapper $(ARCH)-linux$${i##$(GNU_TARGET_NAME)}; \
|
ln -sf toolchain-wrapper $(ARCH)-linux$${i##$(GNU_TARGET_NAME)}; \
|
||||||
ln -snf $$i.real $(ARCH)-linux$${i##$(GNU_TARGET_NAME)}.real; \
|
ln -snf $$i.br_real $(ARCH)-linux$${i##$(GNU_TARGET_NAME)}.br_real; \
|
||||||
;; \
|
;; \
|
||||||
*) \
|
*) \
|
||||||
ln -snf $$i $(ARCH)-linux$${i##$(GNU_TARGET_NAME)}; \
|
ln -snf $$i $(ARCH)-linux$${i##$(GNU_TARGET_NAME)}; \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user