Skip to content

Commit

Permalink
toolchain: Use the prebuilt x86_64-none-linux-gnu GCC instead of host…
Browse files Browse the repository at this point in the history
… gcc.

Signed-off-by: Shanmin Zhang <[email protected]>
  • Loading branch information
zhangshanmin authored and xiaoxiang781216 committed Jan 21, 2025
1 parent 92a2ee7 commit 473bffa
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
8 changes: 6 additions & 2 deletions arch/x86_64/src/common/Toolchain.defs
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,15 @@ ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef
# Cygwin toolchains don't generate ELF binaries.

ifeq ($(CONFIG_WINDOWS_CYGWIN),y)
CROSSDEV = i486-nuttx-elf-
CROSSDEV = x86_64-none-linux-gnu-
endif

ifeq ($(CONFIG_HOST_MACOS),y)
CROSSDEV = x86_64-elf-
CROSSDEV = x86_64-none-linux-gnu-
endif

ifeq ($(CONFIG_HOST_LINUX),y)
CROSSDEV = x86_64-none-linux-gnu-
endif

ifneq ($(CONFIG_CXX_STANDARD),)
Expand Down
5 changes: 3 additions & 2 deletions tools/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,6 @@ function setup_environment()
fi
done

echo " sudo apt-get install -y software-properties-common"
echo " sudo add-apt-repository ppa:ubuntu-toolchain-r/test"
echo " sudo apt-get update"
echo " sudo apt-get install -y ${INSTALLS[@]}"
echo ""
Expand Down Expand Up @@ -233,6 +231,9 @@ function setup_toolchain()
elif [ -d ${ROOTDIR}/prebuilts/${TOOLCHAIN[$j]}/${SYSTEM}/${ARCH[$i]}/bin ]; then
export PATH=${ROOTDIR}/prebuilts/${TOOLCHAIN[$j]}/${SYSTEM}/${ARCH[$i]}/bin:$PATH
fi
if [ -d ${ROOTDIR}/prebuilts/${TOOLCHAIN[$j]}/${SYSTEM}-${SYS_ARCH}/${ARCH[$i]}-none-linux-gnu/bin ]; then
export PATH=${ROOTDIR}/prebuilts/${TOOLCHAIN[$j]}/${SYSTEM}-${SYS_ARCH}/${ARCH[$i]}-none-linux-gnu/bin:$PATH
fi
done
done

Expand Down

0 comments on commit 473bffa

Please sign in to comment.