mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-21 14:37:57 +00:00
5c04efd2d7
This avoids a dangling symlink to self when reinstalling the toolchain: ./staging_dir/toolchain-mips_24kc_gcc-9.3.0_musl/lib/lib -> lib This is caused by the fact that in the toolchain dir we have 'lib64 -> lib' and on executing 'ln lib ./staging_dir/toolchain-mips_24kc_gcc-9.3.0_musl/lib64' ln dereference the symbolic link 'lib64' to 'lib' so the REAL command is 'ln lib ./staging_dir/toolchain-mips_24kc_gcc-9.3.0_musl/lib' this results in the dangling symlink to self. Signed-off-by: Sven Wegener <sven.wegener@stealer.net> [ add more details to the commit description and fix title ] Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
24 lines
521 B
Makefile
24 lines
521 B
Makefile
# SPDX-License-Identifier: GPL-2.0-only
|
|
#
|
|
# Copyright (C) 2009-2020 OpenWrt.org
|
|
|
|
override CONFIG_AUTOREBUILD=
|
|
override CONFIG_AUTOREMOVE=
|
|
|
|
HOST_BUILD_PREFIX:=$(TOOLCHAIN_DIR)
|
|
BUILD_DIR_HOST:=$(BUILD_DIR_TOOLCHAIN)
|
|
|
|
include $(INCLUDE_DIR)/host-build.mk
|
|
include $(INCLUDE_DIR)/hardening.mk
|
|
|
|
HOST_STAMP_PREPARED=$(HOST_BUILD_DIR)/.prepared
|
|
|
|
define FixupLibdir
|
|
if [ -d $(1)/lib64 -a \! -L $(1)/lib64 ]; then \
|
|
mkdir -p $(1)/lib; \
|
|
mv $(1)/lib64/* $(1)/lib/; \
|
|
rm -rf $(1)/lib64; \
|
|
ln -sf lib $(1)/lib64; \
|
|
fi
|
|
endef
|