Skip to content

Fix cannot find arc-elf cross tool #398

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

costinctin
Copy link

kbuild/kbuild.sh: change arc cross tool name to arc-linux. This name is valid for all gcc versions

Error: Cannot find arc-elf under https://cdn.kernel.org/pub/tools/crosstool/files/bin/x86_64/

kbuild/make.cross: change cross tool matching pattern. Avoid sparc-linux being used instead of arc-linux

Error: lftpget -c https://cdn.kernel.org/pub/tools/crosstool/files/bin/x86_64/./14.2.0/x86_64-gcc-14.2.0-nolibc-sparc-linux.tar.xz

kbuild/kbuild.sh: change arc cross tool name to arc-linux. This name is valid for all gcc versions

Error: Cannot find arc-elf under https://cdn.kernel.org/pub/tools/crosstool/files/bin/x86_64/

kbuild/make.cross: change cross tool matching pattern. Avoid sparc-linux being used instead of arc-linux

Error: lftpget -c https://cdn.kernel.org/pub/tools/crosstool/files/bin/x86_64/./14.2.0/x86_64-gcc-14.2.0-nolibc-sparc-linux.tar.xz

Signed-off-by: Costin Constantin <[email protected]>
@@ -317,9 +317,9 @@ setup_cross_vars()
# for earlier gcc version, will failed to find arceb-elf for
# big endian arceb-elf tool chain
if is_config_enabled CONFIG_CPU_BIG_ENDIAN; then
crosstool=arceb-elf
crosstool=arceb-linux
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot, the entry of gcc-14 is different than old ones. Looks can do mapping based on the compiler as well.

./gcc-9.3.0-nolibc/arceb-elf
./gcc-9.3.0-nolibc/arc-elf
./gcc-10.5.0-nolibc/arc-linux
./gcc-11.5.0-nolibc/arc-linux
./gcc-13.3.0-nolibc/arc-linux
./gcc-14.2.0-nolibc/arc-linux

Is it possible to check whether the compiler version is >= 10, then to use arc-linux? BTW: there's no arceb-linux, in higher version of gcc, it only has arc-linux

file=$(grep "${gcc_arch_pattern}\..*tar\.xz$" $list | grep "${gcc_version}" | tail -1)
# "arm-linux-gnueabi" to get single tool package which match exactly. Also, avoid wrong matching of cross
# tool for an other architecture like arc-linux.tar.xz and sparc-linux.tar.xz
file=$(grep "\-${gcc_arch_pattern}\.tar\.xz$" $list | grep "${gcc_version}" | tail -1)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, can the pattern be "-${gcc_arch_pattern}..*tar.xz$, so it can be compatible to old compiler like gcc-9 to distinguish x86_64-gcc-9.3.0-nolibc_arm-linux-gnueabi.tar.xz and x86_64-gcc-9.3.0-nolibc_arm-linux-gnueabihf.tar.xz?

rli9 added a commit that referenced this pull request Mar 17, 2025
./gcc-9.3.0-nolibc/arceb-elf
./gcc-9.3.0-nolibc/arc-elf
./gcc-10.5.0-nolibc/arc-linux
./gcc-11.5.0-nolibc/arc-linux
./gcc-13.3.0-nolibc/arc-linux
./gcc-14.2.0-nolibc/arc-linux

Reported-by: Costin Costinctin <[email protected]>
Link: #398
Signed-off-by: Philip Li <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants