# git rev-parse -q --verify d0ee23f9d78be5531c4b055ea424ed0b489dfe9b^{commit} d0ee23f9d78be5531c4b055ea424ed0b489dfe9b already have revision, skipping fetch # git checkout -q -f -B kisskb d0ee23f9d78be5531c4b055ea424ed0b489dfe9b # git clean -qxdf # < git log -1 # commit d0ee23f9d78be5531c4b055ea424ed0b489dfe9b # Author: Nathan Chancellor # Date: Mon Sep 13 15:09:00 2021 -0700 # # tools: compiler-gcc.h: Guard error attribute use with __has_attribute # # When building objtool with HOSTCC=clang, there are several errors along # the lines of # # orc_dump.c:201:28: error: unknown attribute 'error' ignored [-Werror,-Wunknown-attributes] # # This occurs after commit 4e59869aa655 ("compiler-gcc.h: drop checks for # older GCC versions"), which removed the GCC_VERSION gating. The removed # version check just so happened to prevent __compiletime_error() from # being defined with clang because it pretends to be GCC 4.2.1 for # compatibility but the error attribute was not added to clang until # 14.0.0. # # Commit 815f0ddb346c ("include/linux/compiler*.h: make compiler-*.h # mutually exclusive") and commit a3f8a30f3f00 ("Compiler Attributes: use # feature checks instead of version checks") refactored the handling of # attributes in the main kernel to avoid situations like this but that # refactoring has never been done for the tools directory. # # Refactoring is a rather large undertaking and this has never been an # issue before so instead, just guard the definition of # __compiletime_error() with __has_attribute() so that there are no more # errors. # # Fixes: 4e59869aa655 ("compiler-gcc.h: drop checks for older GCC versions") # Signed-off-by: Nathan Chancellor # Signed-off-by: Linus Torvalds # < /opt/cross/kisskb/korg/gcc-8.1.0-nolibc/x86_64-linux/bin/x86_64-linux-gcc --version # < /opt/cross/kisskb/korg/gcc-8.1.0-nolibc/x86_64-linux/bin/x86_64-linux-ld --version # < git log --format=%s --max-count=1 d0ee23f9d78be5531c4b055ea424ed0b489dfe9b # < make -s -j 8 ARCH=x86_64 O=/kisskb/build/linus-rand_x86_64-randconfig_x86_64-gcc8 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-8.1.0-nolibc/x86_64-linux/bin/x86_64-linux- randconfig # Added to kconfig CONFIG_STANDALONE=y # Added to kconfig CONFIG_PREVENT_FIRMWARE_BUILD=y # Added to kconfig CONFIG_CC_STACKPROTECTOR_STRONG=n # Added to kconfig CONFIG_GCC_PLUGINS=n # Added to kconfig CONFIG_GCC_PLUGIN_CYC_COMPLEXITY=n # Added to kconfig CONFIG_GCC_PLUGIN_SANCOV=n # Added to kconfig CONFIG_GCC_PLUGIN_LATENT_ENTROPY=n # Added to kconfig CONFIG_BPF_PRELOAD=n # Added to kconfig # < make -s -j 8 ARCH=x86_64 O=/kisskb/build/linus-rand_x86_64-randconfig_x86_64-gcc8 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-8.1.0-nolibc/x86_64-linux/bin/x86_64-linux- help # make -s -j 8 ARCH=x86_64 O=/kisskb/build/linus-rand_x86_64-randconfig_x86_64-gcc8 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-8.1.0-nolibc/x86_64-linux/bin/x86_64-linux- olddefconfig .config:5649:warning: override: reassigning to symbol STANDALONE .config:5652:warning: override: reassigning to symbol GCC_PLUGINS .config:5656:warning: override: reassigning to symbol BPF_PRELOAD # make -s -j 8 ARCH=x86_64 O=/kisskb/build/linus-rand_x86_64-randconfig_x86_64-gcc8 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-8.1.0-nolibc/x86_64-linux/bin/x86_64-linux- /kisskb/build/tmp/cczygmCS.s: Assembler messages: /kisskb/build/tmp/cczygmCS.s:29018: Error: can't resolve `.text.unlikely' {.text.unlikely section} - `.LVL57' {.text section} /kisskb/build/tmp/cczygmCS.s:29028: Error: can't resolve `.text.unlikely' {.text.unlikely section} - `.LVL57' {.text section} /kisskb/build/tmp/cczygmCS.s:29038: Error: can't resolve `.text.unlikely' {.text.unlikely section} - `.LVL57' {.text section} /kisskb/build/tmp/cczygmCS.s:29050: Error: can't resolve `.text.unlikely' {.text.unlikely section} - `.LVL57' {.text section} /kisskb/build/tmp/cczygmCS.s:29769: Error: can't resolve `.text.unlikely' {.text.unlikely section} - `.LVL1' {.text section} make[3]: *** [/kisskb/src/scripts/Makefile.build:277: lib/zstd/fse_decompress.o] Error 1 make[3]: *** Waiting for unfinished jobs.... /kisskb/build/tmp/ccsJEfGC.s: Assembler messages: /kisskb/build/tmp/ccsJEfGC.s:308964: Error: can't resolve `.text.unlikely' {.text.unlikely section} - `.LVL2206' {.text section} /kisskb/build/tmp/ccsJEfGC.s:404177: Error: can't resolve `.text.unlikely' {.text.unlikely section} - `.LVL1890' {.text section} /kisskb/build/tmp/ccsJEfGC.s:404733: Error: can't resolve `.text.unlikely' {.text.unlikely section} - `.LVL1899' {.text section} /kisskb/build/tmp/ccsJEfGC.s:456769: Error: can't resolve `.text.unlikely' {.text.unlikely section} - `.LVL166' {.text section} /kisskb/build/tmp/ccsJEfGC.s:456779: Error: can't resolve `.text.unlikely' {.text.unlikely section} - `.LVL167' {.text section} /kisskb/build/tmp/ccsJEfGC.s:457622: Error: can't resolve `.text.unlikely' {.text.unlikely section} - `.LVL219' {.text section} /kisskb/build/tmp/ccsJEfGC.s:457751: Error: can't resolve `.text.unlikely' {.text.unlikely section} - `.LVL222' {.text section} /kisskb/build/tmp/ccsJEfGC.s:457877: Error: can't resolve `.text.unlikely' {.text.unlikely section} - `.LVL226' {.text section} /kisskb/build/tmp/ccsJEfGC.s:458003: Error: can't resolve `.text.unlikely' {.text.unlikely section} - `.LVL230' {.text section} make[3]: *** [/kisskb/src/scripts/Makefile.build:277: lib/zstd/compress.o] Error 1 make[2]: *** [/kisskb/src/scripts/Makefile.build:540: lib/zstd] Error 2 make[2]: *** Waiting for unfinished jobs.... make[1]: *** [/kisskb/src/Makefile:1868: lib] Error 2 make[1]: *** Waiting for unfinished jobs.... make: *** [Makefile:219: __sub-make] Error 2 Command 'make -s -j 8 ARCH=x86_64 O=/kisskb/build/linus-rand_x86_64-randconfig_x86_64-gcc8 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-8.1.0-nolibc/x86_64-linux/bin/x86_64-linux- ' returned non-zero exit status 2 # rm -rf /kisskb/build/linus-rand_x86_64-randconfig_x86_64-gcc8 # Build took: 0:09:09.782717