# git rev-parse -q --verify 0a6de78cff600cb991f2a1b7ed376935871796a0^{commit} 0a6de78cff600cb991f2a1b7ed376935871796a0 already have revision, skipping fetch # git checkout -q -f -B kisskb 0a6de78cff600cb991f2a1b7ed376935871796a0 # git clean -qxdf # < git log -1 # commit 0a6de78cff600cb991f2a1b7ed376935871796a0 # Author: Nathan Chancellor # Date: Fri Oct 14 13:42:11 2022 -0700 # # lib/Kconfig.debug: Add check for non-constant .{s,u}leb128 support to DWARF5 # # When building with a RISC-V kernel with DWARF5 debug info using clang # and the GNU assembler, several instances of the following error appear: # # /tmp/vgettimeofday-48aa35.s:2963: Error: non-constant .uleb128 is not supported # # Dumping the .s file reveals these .uleb128 directives come from # .debug_loc and .debug_ranges: # # .Ldebug_loc0: # .byte 4 # DW_LLE_offset_pair # .uleb128 .Lfunc_begin0-.Lfunc_begin0 # starting offset # .uleb128 .Ltmp1-.Lfunc_begin0 # ending offset # .byte 1 # Loc expr size # .byte 90 # DW_OP_reg10 # .byte 0 # DW_LLE_end_of_list # # .Ldebug_ranges0: # .byte 4 # DW_RLE_offset_pair # .uleb128 .Ltmp6-.Lfunc_begin0 # starting offset # .uleb128 .Ltmp27-.Lfunc_begin0 # ending offset # .byte 4 # DW_RLE_offset_pair # .uleb128 .Ltmp28-.Lfunc_begin0 # starting offset # .uleb128 .Ltmp30-.Lfunc_begin0 # ending offset # .byte 0 # DW_RLE_end_of_list # # There is an outstanding binutils issue to support a non-constant operand # to .sleb128 and .uleb128 in GAS for RISC-V but there does not appear to # be any movement on it, due to concerns over how it would work with # linker relaxation. # # To avoid these build errors, prevent DWARF5 from being selected when # using clang and an assembler that does not have support for these symbol # deltas, which can be easily checked in Kconfig with as-instr plus the # small test program from the dwz test suite from the binutils issue. # # Link: https://sourceware.org/bugzilla/show_bug.cgi?id=27215 # Link: https://github.com/ClangBuiltLinux/linux/issues/1719 # Signed-off-by: Nathan Chancellor # Reviewed-by: Nick Desaulniers # Signed-off-by: Masahiro Yamada # < /opt/cross/kisskb/korg/gcc-11.1.0-nolibc/x86_64-linux/bin/x86_64-linux-gcc --version # < /opt/cross/kisskb/korg/gcc-11.1.0-nolibc/x86_64-linux/bin/x86_64-linux-ld --version # < git log --format=%s --max-count=1 0a6de78cff600cb991f2a1b7ed376935871796a0 # < make -s -j 120 ARCH=x86 O=/kisskb/build/kbuild_x86-allmodconfig_x86_64-gcc11 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-11.1.0-nolibc/x86_64-linux/bin/x86_64-linux- allmodconfig # Added to kconfig CONFIG_BUILD_DOCSRC=n # Added to kconfig CONFIG_MODULE_SIG=n # Added to kconfig CONFIG_SAMPLES=n # < make -s -j 120 ARCH=x86 O=/kisskb/build/kbuild_x86-allmodconfig_x86_64-gcc11 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-11.1.0-nolibc/x86_64-linux/bin/x86_64-linux- help # make -s -j 120 ARCH=x86 O=/kisskb/build/kbuild_x86-allmodconfig_x86_64-gcc11 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-11.1.0-nolibc/x86_64-linux/bin/x86_64-linux- olddefconfig # make -s -j 120 ARCH=x86 O=/kisskb/build/kbuild_x86-allmodconfig_x86_64-gcc11 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-11.1.0-nolibc/x86_64-linux/bin/x86_64-linux- /kisskb/src/drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_stream.c: In function 'dc_stream_remove_writeback': /kisskb/src/drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_stream.c:527:83: error: array subscript [0, 0] is outside array bounds of 'struct dc_writeback_info[1]' [-Werror=array-bounds] 527 | stream->writeback_info[j] = stream->writeback_info[i]; | ~~~~~~~~~~~~~~~~~~~~~~^~~ In file included from /kisskb/src/drivers/gpu/drm/amd/amdgpu/../display/dc/dc.h:1269, from /kisskb/src/drivers/gpu/drm/amd/amdgpu/../display/dc/inc/core_types.h:29, from /kisskb/src/drivers/gpu/drm/amd/amdgpu/../display/dc/basics/dc_common.h:29, from /kisskb/src/drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_stream.c:27: /kisskb/src/drivers/gpu/drm/amd/amdgpu/../display/dc/dc_stream.h:241:34: note: while referencing 'writeback_info' 241 | struct dc_writeback_info writeback_info[MAX_DWB_PIPES]; | ^~~~~~~~~~~~~~ cc1: all warnings being treated as errors make[6]: *** [/kisskb/src/scripts/Makefile.build:250: drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_stream.o] Error 1 make[6]: *** Waiting for unfinished jobs.... make[5]: *** [/kisskb/src/scripts/Makefile.build:500: drivers/gpu/drm/amd/amdgpu] Error 2 make[4]: *** [/kisskb/src/scripts/Makefile.build:500: drivers/gpu/drm] Error 2 make[3]: *** [/kisskb/src/scripts/Makefile.build:500: drivers/gpu] Error 2 make[2]: *** [/kisskb/src/scripts/Makefile.build:500: drivers] Error 2 make[1]: *** [/kisskb/src/Makefile:1991: .] Error 2 make: *** [Makefile:231: __sub-make] Error 2 Command 'make -s -j 120 ARCH=x86 O=/kisskb/build/kbuild_x86-allmodconfig_x86_64-gcc11 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-11.1.0-nolibc/x86_64-linux/bin/x86_64-linux- ' returned non-zero exit status 2 # rm -rf /kisskb/build/kbuild_x86-allmodconfig_x86_64-gcc11 # Build took: 0:18:04.479806