Created attachment 759646 [details]
emerge --info
A build on glibc ppc revealed that this is not a musl specific issue. Created attachment 767479 [details]
build.log.xz (ppc, clang-13.0.1)
Created attachment 799191 [details]
build.log.xz (ppc, clang-14.0.6-r1, built with gcc-12.1 + binutils-2.36.1)
Created attachment 799199 [details]
build.log.xz (ppc, clang-14.0.6-r1, built with gcc-12.1 + binutils-2.39)
Created attachment 799201 [details]
CompletionModel.cpp.xz (ppc, clang-14.0.6-r1, built with gcc-12.1 + binutils-2.39)
Created attachment 799205 [details]
CompletionModel.s.xz (ppc, clang-14.0.6-r1, built with gcc-12.1 + binutils-2.39)
Created attachment 799207 [details]
emerge --info
Created attachment 799209 [details]
build.log.xz (ppc, clang-14.0.6-r1, built with gcc-10.4 + binutils-2.39)
Created attachment 799213 [details]
CompletionModel.s.xz (ppc, clang-14.0.6-r1, built with gcc-12.1 + binutils-2.39)
Created attachment 799219 [details]
CompletionModel.ii.tar.xz (ppc, clang-14.0.6-r1, built with gcc-12.1 + binutils-2.39), part 1
Created attachment 799221 [details]
CompletionModel.ii.tar.xz (ppc, clang-14.0.6-r1, built with gcc-12.1 + binutils-2.39), part 2
Created attachment 799299 [details]
build.log.xz (ppc, clang-14.0.6-r1, built with gcc-10.4 + binutils-2.39)
Created attachment 799441 [details]
build.log.xz (ppc, clang-14.0.6-r1 + ppc32 patch, built with gcc-10.4 + binutils-2.39)
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3e8c12159bc7298cf4bb4057bfd197f98713da28 commit 3e8c12159bc7298cf4bb4057bfd197f98713da28 Author: Sam James <sam@gentoo.org> AuthorDate: 2022-09-10 03:55:13 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2022-09-10 03:56:54 +0000 sys-devel/gcc: keyword 11.3.1_p20220909 Notably contains fixes for PPC which may cause crashes at runtime. Had come across this bug and a few others when poking at Clang build failure on PPC (bug 829602), although it doesn't seem to have fixed that (tagging bug anyway as it's possibly related in some form). I've been tempted to keyword a newer 11 stable snapshot for a while but didn't feel comfortable doing so until bug 834845 was resolved (info page/docs issue). Bug: https://bugs.gentoo.org/829602 Bug: https://bugs.gentoo.org/834845 Bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104090 See: https://github.com/buildroot/buildroot/commit/b42c6b24755170a8eb015b3ea0b25e6d91e037cb Signed-off-by: Sam James <sam@gentoo.org> sys-devel/gcc/gcc-11.3.1_p20220909.ebuild | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) Created attachment 820285 [details] build.log.xz (ppc, clang-15.0.1 + clang-15.0.1-libclangBasic_linking.patch + clang-15.0.1-CompletionModel.patch) Successful (!) clang-15.0.1 build.log with 1st patch from bug #874024 and Arfrever's clang-15.0.1-CompletionModel.patch. Toolchain used was gcc-11.3.1, glibc-2.35-r8, binutils-2.39-r2. Created attachment 820369 [details, diff]
clang-15.0.2-CompletionModel.patch
Created attachment 822952 [details, diff]
clang-15.0.2-CompletionModel.patch
Created attachment 824847 [details]
build.log.xz (ppc, clang-15.0.3 + clang-15.0.2-libclangBasic_linking.patch + clang-15.0.2-CompletionModel.patch)
Created attachment 824859 [details, diff] clang-15.0.2-CompletionModel.patch (Setting variable in outer scope using PARENT_SCOPE, as suggested in https://reviews.llvm.org/D136283.) The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=023d53443fa50b70b8a4d5550885d8610ce0cb4f commit 023d53443fa50b70b8a4d5550885d8610ce0cb4f Author: Sam James <sam@gentoo.org> AuthorDate: 2022-11-19 07:04:15 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2022-11-19 07:05:02 +0000 profiles/arch/powerpc/ppc32: mask sys-devel/clang[extra] There's a pending upstream PR for this but there's some debate about the complexity and whether we should choose a simpler solution or just not bother supporting building clangd at all on ppc. In any case, let's mask USE=extra for now as we know it doesn't work. Bug: https://bugs.gentoo.org/829602 Signed-off-by: Sam James <sam@gentoo.org> profiles/arch/powerpc/ppc32/package.use.mask | 4 ++++ 1 file changed, 4 insertions(+) |
Created attachment 759645 [details] build.log.xz [...] [330/1676] /usr/bin/powerpc-gentoo-linux-musl-g++ -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/var/tmp/portage/sys-devel/clang -13.0.0/work/x/y/clang-.ppc/tools/extra/clangd -I/var/tmp/portage/sys-devel/clang-13.0.0/work/clang-tools-extra/clangd -I/var/tmp/portage/sys-devel/clang-13.0.0/work/x/y/clang-.ppc/tools/extra/clangd/../clang-ti dy -I/var/tmp/portage/sys-devel/clang-13.0.0/work/clang/include -I/var/tmp/portage/sys-devel/clang-13.0.0/work/x/y/clang-.ppc/include -I/include -I/usr/lib/llvm/13/include -DNDEBUG -O2 -mcpu=7450 -mtune=7450 -p ipe -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -Wimplicit-fallthrough -Wno-cla ss-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wmisleading-indentation -fdiagnostics-color -ffunction-sections -fdata-section s -fno-common -Woverloaded-virtual -fno-strict-aliasing -pedantic -Wno-long-long -std=c++14 -Wno-unused -MD -MT tools/extra/clangd/CMakeFiles/obj.clangDaemon.dir/CompletionModel.cpp.o -MF tools/extra/clangd/CMak eFiles/obj.clangDaemon.dir/CompletionModel.cpp.o.d -o tools/extra/clangd/CMakeFiles/obj.clangDaemon.dir/CompletionModel.cpp.o -c /var/tmp/portage/sys-devel/clang-13.0.0/work/x/y/clang-.ppc/tools/extra/clangd/Com pletionModel.cpp FAILED: tools/extra/clangd/CMakeFiles/obj.clangDaemon.dir/CompletionModel.cpp.o /usr/bin/powerpc-gentoo-linux-musl-g++ -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/var/tmp/portage/sys-devel/clang-13.0.0/wor k/x/y/clang-.ppc/tools/extra/clangd -I/var/tmp/portage/sys-devel/clang-13.0.0/work/clang-tools-extra/clangd -I/var/tmp/portage/sys-devel/clang-13.0.0/work/x/y/clang-.ppc/tools/extra/clangd/../clang-tidy -I/var/t mp/portage/sys-devel/clang-13.0.0/work/clang/include -I/var/tmp/portage/sys-devel/clang-13.0.0/work/x/y/clang-.ppc/include -I/include -I/usr/lib/llvm/13/include -DNDEBUG -O2 -mcpu=7450 -mtune=7450 -pipe -fPIC - fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -Wimplicit-fallthrough -Wno-class-memacces s -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wmisleading-indentation -fdiagnostics-color -ffunction-sections -fdata-sections -fno-comm on -Woverloaded-virtual -fno-strict-aliasing -pedantic -Wno-long-long -std=c++14 -Wno-unused -MD -MT tools/extra/clangd/CMakeFiles/obj.clangDaemon.dir/CompletionModel.cpp.o -MF tools/extra/clangd/CMakeFiles/obj. clangDaemon.dir/CompletionModel.cpp.o.d -o tools/extra/clangd/CMakeFiles/obj.clangDaemon.dir/CompletionModel.cpp.o -c /var/tmp/portage/sys-devel/clang-13.0.0/work/x/y/clang-.ppc/tools/extra/clangd/CompletionMode l.cpp {standard input}: Assembler messages: {standard input}:177127: Error: operand out of range (0x0000000000008164 is not between 0xffffffffffff8000 and 0x0000000000007fff) {standard input}:177163: Error: operand out of range (0x000000000000816c is not between 0xffffffffffff8000 and 0x0000000000007fff) 0xffffffffffff8000 and 0x0000000000007fff) [...] {standard input}:416785: Error: operand out of range (0x000000000001d6f4 is not between 0xffffffffffff8000 and 0x0000000000007fff) {standard input}:416841: Error: operand out of range (0x000000000001130c is not between 0xffffffffffff8000 and 0x0000000000007fff) ninja: build stopped: subcommand failed. * ERROR: sys-devel/clang-13.0.0::gentoo failed (compile phase): * ninja -v -j1 -l0 distribution failed