-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Description
Describe the bug
Commit 04fd862 "linker: ld: GNULD_LINKER_IS_BFD to indicate if ld.bfd is used" causes extremely confusing SOF build failures.
To Reproduce
Steps to reproduce the behavior:
git checkout 04fd862f68ba8
ZEPHYR_TOOLCHAIN_VARIANT=xcc
XTENSA_TOOLCHAIN_PATH=$HOME/XCC/install/tools
TOOLCHAIN_VER=RG-2017.8-linux
XTENSA_SYSTEM=$HOME/XCC/install/builds/RG-2017.8-linux/cavs2x_LX6HiFi3_2017_8/config
export XTENSA_SYSTEM XTENSA_TOOLCHAIN_PATH ZEPHYR_TOOLCHAIN_VARIANT TOOLCHAIN_VER
rm -rf build
west build -b intel_adsp_cavs25 modules/audio/sof/app
west build -b intel_adsp_cavs25 modules/audio/sof/app -- -DFOO=bar
Since commit 04fd862, the second, incremental west build command now fails with the very confusing error $HOME/XCC/install/tools/RG-2017.8-linux/XtensaTools/bin/xt-xcc ERROR parsing -fuse-ld=bfd: unknown flag
No failure with the Zephyr SDK.
Expected behavior
At least a vaguely useful error message. Since #40431 (comment) I'm aware you're not supposed to have any CMake parameters on incremental builds but in this case the experience is really miserable: it took me hours to isolate this problem. Also: why does it fail with one toolchain but not with another? Confusingly inconsistent.
Impact
The incremental SOF build fails and users don't have a clue why.
Workaround: build from scratch with -p. Especially slow due to the license server.
Environment (please complete the following information):
- OS: Linux
- Toolchain xt-xcc
- Any commit after 04fd862