Closed jheaff1 closed 3 years ago
Hello,
As a reminder, Toolchain-builder project use Buildroot internally to build all prebuilt toolchains.
I believe it's not a toolchain issue but an issue related to how gcc binary is used. If you import the same official arm gcc toolchain to Buildroot (as an external toolchain) you will get the same behavior. That's because in Buildroot, the toolchain infrastructure provide a toolchain wrapper that retrieve the full path to the gcc binary. This wrapper is present in all prebuilt toolchains so the gcc binary is called using an absolute path. (Add BR2_DEBUG_WRAPPER=1 in the environment to enable toolchain wrapper debug output)
Also try the official arm gcc toolchain with "$PWD/arm-none-eabi-gcc" instead of "./arm-none-eabi-gcc", you will get absolute path with or without "-no-canonical-prefixes".
About Bazel, there is curently no package using Bazel in Buildroot. Using Buildroot internal toolchain or Toolchain-builder toolchain with Bazel has not been tested. But I guess Bazel should be able to use existing toolchain as is.
Best regards, Romain
Thanks for the reply @RomainNaour!
If I configure Bazel to use the gcc.br_real
file, then it works perfectly. I’ll close this issue as it’s not really to do with bootlin
You're welcome, I still think that Bazel should be able to use the toolchain wrapper (as for all other buildsystems). The wrapper provide all required flags (sysroot path) for your target, using gcc.br_real directly is not recommended. @tpetazzoni do you confirm?
Best regards, Romain
Hi,
It appears that the
gcc
executables in the toolchains hosted at https://toolchains.bootlin.com/ do not support the-no-canonical-prefixes
argument.For example, if I run the following commands using the x86-64-core-i7 toolchain:
I get the following output:
Notice the paths at the bottom of the console output above has absolute paths. Now, if i run the same
gcc
command but add the-no-canonical-prefixes
argument, I get the same output. I would expect that the paths at the bottom of the console output be relative paths. If I run the same commands but for the official arm gcc toolchain, I get the following output:Notice how the paths at the bottom of the console log are relative paths.
The motivation for resolving this issue is that I would like to use your x86-64-corei7 toolchain to provide a hermetic gcc toolchain within the Bazel build system. Sadly your toolchains would not play nicely with Bazel due to this issue