-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
clang-14: unknown argument: '-gcc-toolchain' #75505
Comments
Tagging subscribers to this area: @hoyosjs Issue DetailsDescriptionDuring crossbuild of 7.0-preview7 with clang-14 on Alpine Linux, build fails with the following error on multiple files:
This is due to clang-14 removing parsing of -gcc-toolchain in favor or --gcc-toolchain= Reproduction StepsClone tag v7.0.0-preview.7.22375.6 Expected behavior--gcc-toolchain= should be used Actual behavior-gcc-toolchain used instead Regression?This also affects runtime v6.0.8 Known WorkaroundsOn v6.0.8, the following workaround was used:
Unfortunately, this does not work on version 7.0.0-preview.7, as build.make seems to be regenerated every build. ConfigurationAlpine Edge w/ clang 14 + cmake 3.23.1 Other informationI have not found the reason why some
|
Does applying this workaround fix the problem for you? runtime/eng/native/configurecompiler.cmake Lines 791 to 796 in cfd6cd1
|
That did it, thanks! |
Let's keep this open for .NET 7 backport |
Port dotnet@ee77955 to fix building with clang-14 that is used by the most recent Linux distros Fixes dotnet#75505
Fixed in 7.0 and 6.0. |
Description
During crossbuild of 7.0-preview7 with clang-14 on Alpine Linux, build fails with the following error on multiple files:
This is due to clang-14 removing parsing of -gcc-toolchain in favor or --gcc-toolchain=
Reproduction Steps
Clone tag v7.0.0-preview.7.22375.6
Build using
ROOTFS_DIR="$CBUILDROOT" ./build.sh -arch arm64 -c Release -cross -clang
where CBUILDROOT is your ROOTFS_DIR (in Alpine's case, $HOME/sysroot-arm64)
Expected behavior
--gcc-toolchain= should be used
Actual behavior
-gcc-toolchain used instead
Regression?
This also affects runtime v6.0.8
Known Workarounds
On v6.0.8, the following workaround was used:
Unfortunately, this does not work on version 7.0.0-preview.7, as build.make seems to be regenerated every build.
Configuration
Alpine Edge w/ clang 14 + cmake 3.23.1
Crossbuild x86_64 -» aarc64
Tested runtime versions 6.0.8 + 7.0.0-preview.7
Other information
I have not found the reason why some
build.make
files use the deprecated argument. Granted, I am a layman at clang + cmake.The text was updated successfully, but these errors were encountered: