diff --git a/scripts/ext-toolchain.sh b/scripts/ext-toolchain.sh index 4da287591ac..b52f170b32b 100755 --- a/scripts/ext-toolchain.sh +++ b/scripts/ext-toolchain.sh @@ -281,8 +281,11 @@ print_config() { local mksubtarget local target="$("$CC" $CFLAGS -dumpmachine)" + local version="$("$CC" $CFLAGS -dumpversion)" local cpuarch="${target%%-*}" - local prefix="${CC##*/}"; prefix="${prefix%-*}-" + + # get CC; strip version; strip gcc and add - suffix + local prefix="${CC##*/}"; prefix="${prefix%-$version}"; prefix="${prefix%-*}-" local config="${0%/scripts/*}/.config" # if no target specified, print choice list and exit