# git rev-parse -q --verify d0ee23f9d78be5531c4b055ea424ed0b489dfe9b^{commit} # git fetch -q -n -f git://fs.ozlabs.ibm.com/kernel/linus master # git rev-parse -q --verify d0ee23f9d78be5531c4b055ea424ed0b489dfe9b^{commit} d0ee23f9d78be5531c4b055ea424ed0b489dfe9b # 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-9.2.0-nolibc/powerpc64-linux/bin/powerpc64-linux-gcc --version # < /opt/cross/kisskb/korg/gcc-9.2.0-nolibc/powerpc64-linux/bin/powerpc64-linux-ld --version # < git log --format=%s --max-count=1 d0ee23f9d78be5531c4b055ea424ed0b489dfe9b # < make -s -j 10 ARCH=powerpc O=/kisskb/build/linus-rand_powerpc-randconfig_powerpc-gcc9 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-9.2.0-nolibc/powerpc64-linux/bin/powerpc64-linux- randconfig # Added to kconfig CONFIG_STANDALONE=y # Added to kconfig CONFIG_BUILD_DOCSRC=n # Added to kconfig CONFIG_MODULE_SIG=n # Added to kconfig CONFIG_CPU_BIG_ENDIAN=y # Added to kconfig CONFIG_PPC64=y # Added to kconfig CONFIG_PPC_DISABLE_WERROR=y # Added to kconfig CONFIG_SECTION_MISMATCH_WARN_ONLY=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_LD_HEAD_STUB_CATCH=y # Added to kconfig CONFIG_TRIM_UNUSED_KSYMS=n # Added to kconfig CONFIG_UBSAN=n # < make -s -j 10 ARCH=powerpc O=/kisskb/build/linus-rand_powerpc-randconfig_powerpc-gcc9 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-9.2.0-nolibc/powerpc64-linux/bin/powerpc64-linux- help # make -s -j 10 ARCH=powerpc O=/kisskb/build/linus-rand_powerpc-randconfig_powerpc-gcc9 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-9.2.0-nolibc/powerpc64-linux/bin/powerpc64-linux- olddefconfig .config:5799:warning: override: reassigning to symbol STANDALONE .config:5804:warning: override: reassigning to symbol PPC_DISABLE_WERROR .config:5805:warning: override: reassigning to symbol SECTION_MISMATCH_WARN_ONLY .config:5809:warning: override: reassigning to symbol LD_HEAD_STUB_CATCH # make -s -j 10 ARCH=powerpc O=/kisskb/build/linus-rand_powerpc-randconfig_powerpc-gcc9 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-9.2.0-nolibc/powerpc64-linux/bin/powerpc64-linux- Completed OK # rm -rf /kisskb/build/linus-rand_powerpc-randconfig_powerpc-gcc9 # Build took: 0:08:07.360560