From 6bd3a13121c8087bc2062ab9999c3c6fc5f12727 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Wed, 29 Nov 2017 11:54:37 +0000 Subject: [PATCH] make.sh: Create /tools_${arch} link only when building a toolchain Signed-off-by: Michael Tremer --- make.sh | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/make.sh b/make.sh index 5f619d30b3..87125c0ded 100755 --- a/make.sh +++ b/make.sh @@ -433,19 +433,6 @@ prepareenv() { # Set LFS Directory LFS=$BASEDIR/build - # Check ${TOOLS_DIR} symlink - if [ -h "${TOOLS_DIR}" ]; then - rm -f "${TOOLS_DIR}" - fi - - if [ ! -e "${TOOLS_DIR}" ]; then - ln -s "${BASEDIR}/build${TOOLS_DIR}" "${TOOLS_DIR}" - fi - - if [ ! -h "${TOOLS_DIR}" ]; then - exiterror "Could not create ${TOOLS_DIR} symbolic link" - fi - # Setup environment set +h LC_ALL=POSIX @@ -910,6 +897,19 @@ buildtoolchain() { exiterror "Could not find GCC. You will need a working build enviroment in order to build the toolchain." fi + # Check ${TOOLS_DIR} symlink + if [ -h "${TOOLS_DIR}" ]; then + rm -f "${TOOLS_DIR}" + fi + + if [ ! -e "${TOOLS_DIR}" ]; then + ln -s "${BASEDIR}/build${TOOLS_DIR}" "${TOOLS_DIR}" + fi + + if [ ! -h "${TOOLS_DIR}" ]; then + exiterror "Could not create ${TOOLS_DIR} symbolic link" + fi + LOGFILE="$BASEDIR/log/_build.toolchain.log" export LOGFILE -- 2.39.2