-
Notifications
You must be signed in to change notification settings - Fork 8.5k
toolchain: rename xcc-clang to xt-clang, and add linker profile xt-ld #54836
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
Conversation
andyross
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No complaints with this patch, but I still think we need to rethink the way we handle "gcc-like" toolchains to reduce all the cut/paste in the cmake tree.
Xtensa tools tend to be way behind (like xt-ld being based on ld 2.34). The LD profile on main tracks latest binutils rather closely (as with the Zephyr SDK). So this is simply to avoid the main LD profile having incompatible changes to xt-ld. |
This is worth being stated at the top of the new file IMHO. Otherwise people will keep wondering about the duplication. PS: thanks for the rename that was requested in #54445 and thesofproject/sof#7027, much appreciated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No problem with the change but this seems to just instantly break anyone using xcc-clang with no deprecation notice to them or indication of how they cane update their workflow to remain compatible in the future
tejlmand
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please deprecate so that users are made aware about this change.
cmake/modules/FindDeprecated.cmake
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a deprecation warning here:
--- a/cmake/modules/FindDeprecated.cmake
+++ b/cmake/modules/FindDeprecated.cmake
@@ -50,6 +50,11 @@ if("XCC_USE_CLANG" IN_LIST Deprecated_FIND_COMPONENTS)
set(ZEPHYR_TOOLCHAIN_VARIANT xt-clang CACHE STRING "Zephyr toolchain variant" FORCE)
message(DEPRECATION "XCC_USE_CLANG is deprecated. Please set ZEPHYR_TOOLCHAIN_VARIANT to 'xt-clang'")
endif()
+
+ if("${ZEPHYR_TOOLCHAIN_VARIANT}" STREQUAL "xcc-clang")
+ set(ZEPHYR_TOOLCHAIN_VARIANT xt-clang CACHE STRING "Zephyr toolchain variant" FORCE)
+ message(DEPRECATION "ZEPHYR_TOOLCHAIN_VARIANT 'xcc-clang' is deprecated. Please set ZEPHYR_TOOLCHAIN_VARIANT to 'xt-clang'")
+ endif()
endif()
if("CROSS_COMPILE" IN_LIST Deprecated_FIND_COMPONENTS)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added.
This is exactly why it's being done now while very few people and machines are just getting started with |
we have been using xt-clang for quite a while, deprecation is still needed./ |
It doesn't matter if it's 0, 1 or half of europe using it, you can't just silently break a whole setup by changing the name without having some level of warning to users for a period of time until it is removed. |
c343f09 to
f4e445e
Compare
This reflects the actual compiler executable name of the Xtensa LLVM/Clang compiler. Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Xtensa toolchain has its own linker, xt-ld, which is based on binutils' ld. There are, of course, Xtensa specific options. But mostly it is based on old version of ld. It would be better to detach it from the ld profile to avoid any incompatible changes there. Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Some level of warning is required and it does matter for how many people it breaks. |
galak
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so probably better to just copy the files over to xt-clang and leave the xcc-clang files
|
The snippet posted by @tejlmand above should provide the necessary deprecation warning. |
This renames the toolchain profile
xcc-clangtoxt-clangto better reflect the actual compiler being used.This also adds a linker profile
xt-ldso we can tailor support for Xtensa's linker. For now, it is simply to not pass-no-pie.