# git rev-parse -q --verify 21466c8b8fbaaec5c54d1f8565657dc2f6b25583^{commit} 21466c8b8fbaaec5c54d1f8565657dc2f6b25583 already have revision, skipping fetch # git checkout -q -f -B kisskb 21466c8b8fbaaec5c54d1f8565657dc2f6b25583 # git clean -qxdf # < git log -1 # commit 21466c8b8fbaaec5c54d1f8565657dc2f6b25583 # Author: Masahiro Yamada # Date: Wed Apr 8 00:53:52 2020 +0900 # # kbuild: add dummy toolchains to enable all cc-option etc. in Kconfig # # Staring v4.18, Kconfig evaluates compiler capabilities, and hides CONFIG # options your compiler does not support. This works well if you configure # and build the kernel on the same host machine. # # It is inconvenient if you prepare the .config that is carried to a # different build environment (typically this happens when you package # the kernel for distros) because using a different compiler potentially # produces different CONFIG options than the real build environment. # So, you probably want to make as many options visible as possible. # In other words, you need to create a super-set of CONFIG options that # cover any build environment. If some of the CONFIG options turned out # to be unsupported on the build machine, they are automatically disabled # by the nature of Kconfig. # # However, it is not feasible to get a full-featured compiler for every # arch. # # This issue was discussed here: # # https://lkml.org/lkml/2019/12/9/620 # # Other than distros, savedefconfig is also a problem. Some arch sub-systems # periodically resync defconfig files. If you use a less-capable compiler # for savedefconfig, options that do not meet 'depends on $(cc-option,...)' # will be forcibly disabled. So, 'make defconfig && make savedefconfig' # may silently change the behavior. # # This commit adds a set of dummy toolchains that pretend to support any # feature. # # Most of compiler features are tested by cc-option, which simply checks # the exit code of $(CC). The dummy tools are shell scripts that always # exit with 0. So, $(cc-option, ...) is evaluated as 'y'. # # There are more complicated checks such as: # # scripts/gcc-x86_{32,64}-has-stack-protector.sh # scripts/gcc-plugin.sh # scripts/tools-support-relr.sh # # scripts/dummy-tools/gcc passes all checks. # # From the top directory of the source tree, you can do: # # $ make CROSS_COMPILE=scripts/dummy-tools/ oldconfig # # Signed-off-by: Masahiro Yamada # Reviewed-by: Philipp Rudo # < /opt/cross/kisskb/gcc-4.6.3-nolibc/powerpc-linux/bin/powerpc-linux-gcc --version # < /opt/cross/kisskb/gcc-4.6.3-nolibc/powerpc-linux/bin/powerpc-linux-ld --version # < git log --format=%s --max-count=1 21466c8b8fbaaec5c54d1f8565657dc2f6b25583 # < make -s -j 48 ARCH=powerpc O=/kisskb/build/kbuild_ppc40x_defconfig_powerpc-gcc4.6 CROSS_COMPILE=/opt/cross/kisskb/gcc-4.6.3-nolibc/powerpc-linux/bin/powerpc-linux- ppc40x_defconfig # < make -s -j 48 ARCH=powerpc O=/kisskb/build/kbuild_ppc40x_defconfig_powerpc-gcc4.6 CROSS_COMPILE=/opt/cross/kisskb/gcc-4.6.3-nolibc/powerpc-linux/bin/powerpc-linux- help # make -s -j 48 ARCH=powerpc O=/kisskb/build/kbuild_ppc40x_defconfig_powerpc-gcc4.6 CROSS_COMPILE=/opt/cross/kisskb/gcc-4.6.3-nolibc/powerpc-linux/bin/powerpc-linux- olddefconfig # make -s -j 48 ARCH=powerpc O=/kisskb/build/kbuild_ppc40x_defconfig_powerpc-gcc4.6 CROSS_COMPILE=/opt/cross/kisskb/gcc-4.6.3-nolibc/powerpc-linux/bin/powerpc-linux- /kisskb/src/kernel/printk/printk.c: In function 'devkmsg_sysctl_set_loglvl': /kisskb/src/kernel/printk/printk.c:204:16: warning: 'old' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/drivers/irqchip/irq-xilinx-intc.c: In function 'xil_intc_handle_irq': /kisskb/src/drivers/irqchip/irq-xilinx-intc.c:176:4: error: implicit declaration of function 'handle_domain_irq' [-Werror=implicit-function-declaration] /kisskb/src/drivers/irqchip/irq-xilinx-intc.c: In function 'xilinx_intc_of_init': /kisskb/src/drivers/irqchip/irq-xilinx-intc.c:253:3: error: implicit declaration of function 'set_handle_irq' [-Werror=implicit-function-declaration] cc1: some warnings being treated as errors make[3]: *** [/kisskb/src/scripts/Makefile.build:266: drivers/irqchip/irq-xilinx-intc.o] Error 1 make[2]: *** [/kisskb/src/scripts/Makefile.build:488: drivers/irqchip] Error 2 make[1]: *** [/kisskb/src/Makefile:1705: drivers] Error 2 make[1]: *** Waiting for unfinished jobs.... /kisskb/src/fs/proc/inode.c: In function 'proc_reg_open': /kisskb/src/include/linux/list.h:72:12: warning: 'pdeo' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/fs/proc/inode.c:401:21: note: 'pdeo' was declared here /kisskb/src/fs/namei.c: In function 'handle_dots': /kisskb/src/fs/namei.c:1805:10: warning: 'inode' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/fs/namei.c:1805:10: warning: 'seq' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/fs/ext4/extents.c: In function 'ext4_convert_unwritten_io_end_vec': /kisskb/src/fs/ext4/extents.c:5009:23: warning: 'ret' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/fs/io_uring.c: In function '__io_sqe_files_update.isra.89': /kisskb/src/fs/io_uring.c:6617:13: warning: 'err' may be used uninitialized in this function [-Wuninitialized] make: *** [Makefile:180: sub-make] Error 2 Command 'make -s -j 48 ARCH=powerpc O=/kisskb/build/kbuild_ppc40x_defconfig_powerpc-gcc4.6 CROSS_COMPILE=/opt/cross/kisskb/gcc-4.6.3-nolibc/powerpc-linux/bin/powerpc-linux- ' returned non-zero exit status 2 # rm -rf /kisskb/build/kbuild_ppc40x_defconfig_powerpc-gcc4.6 # Build took: 0:00:24.170155