kraj / meta-clang

Clang C/C++ cross compiler and runtime for OpenEmbedded/Yocto Project
MIT License
152 stars 196 forks source link

clang: Bump version to 18.1.1 #920

Closed kraj closed 4 months ago

kraj commented 4 months ago

Contributor checklist

Reviewer Guidelines

quaresmajose commented 4 months ago

I am seeing now:

    | ../../elfutils-0.191/src/srcfiles.cxx:81:18: error: unused variable 'BUFFER_SIZE' [-Werror,-Wunused-const-variable]
    |    81 | constexpr size_t BUFFER_SIZE = 8192;
    |       |                  ^~~~~~~~~~~

fixed with:

--- a/conf/nonclangable.conf
+++ b/conf/nonclangable.conf
@@ -21,7 +21,7 @@ TOOLCHAIN:pn-crash = "gcc"
 # See https://github.com/llvm/llvm-project/issues/71925
 LIBCPLUSPLUS:pn-elfutils:toolchain-clang = "-stdlib=libstdc++"
 # Remove it once https://patchwork.yoctoproject.org/project/oe-core/patch/20240309235748.517154-1-raj.khem@gmail.com/ is merged
-CXXFLAGS:append:pn-elfutils:toolchain-clang = " -Wno-error=unused-private-field"
+CXXFLAGS:append:pn-elfutils:toolchain-clang = " -Wno-error=unused-private-field -Wno-error=unused-const-variable"
 #| erl_bits.c:(.text+0xc2a): undefined reference to `__extendhfsf2'
 #| erl_bits.c:(.text+0x1bfa): undefined reference to `__truncsfhf2'
 #| clang-15: error: linker command failed with exit code 1 (use -v to see invocation)
kraj commented 4 months ago

@quaresmajose there is a fix staged in core layer master-next already for this. Please cherry-pick that in meantime.

https://lore.kernel.org/openembedded-core/20240309235748.517154-1-raj.khem@gmail.com/

secondly, move your meta-clang to latest tip of master branch. You also need.

https://github.com/kraj/meta-clang/commit/03130b5d2831bfdead4cbf960dc7b84c59676db6

quaresmajose commented 4 months ago

@quaresmajose there is a fix staged in core layer master-next already for this. Please cherry-pick that in meantime.

https://lore.kernel.org/openembedded-core/20240309235748.517154-1-raj.khem@gmail.com/

My error is not the same as this one unused-private-field vs unused-const-variable

secondly, move your meta-clang to latest tip of master branch. You also need.

03130b5

I am already using the latest tip, for now I have fixed it in my layer but I will also submit a patch for elfutils-devel to remove the unused BUFFER_SIZE.

--- /dev/null
+++ b/meta-lmp-base/recipes-devtools/elfutils/elfutils_0.191.bbappend
@@ -0,0 +1 @@
+CXXFLAGS:append:pn-elfutils:toolchain-clang = " -Wno-error=unused-const-variable"
quaresmajose commented 4 months ago

fix for this created: https://github.com/kraj/meta-clang/pull/926