# git rev-parse -q --verify 76426e238834f0927dee9925e8832179b8d56d6e^{commit} 76426e238834f0927dee9925e8832179b8d56d6e already have revision, skipping fetch # git checkout -q -f -B kisskb 76426e238834f0927dee9925e8832179b8d56d6e # git clean -qxdf # < git log -1 # commit 76426e238834f0927dee9925e8832179b8d56d6e # 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 # Tested-by: Jeremy Cline # < /opt/cross/kisskb/gcc-4.6.3-nolibc/sh4-linux/bin/sh4-linux-gcc --version # < /opt/cross/kisskb/gcc-4.6.3-nolibc/sh4-linux/bin/sh4-linux-ld --version # < git log --format=%s --max-count=1 76426e238834f0927dee9925e8832179b8d56d6e # < make -s -j 48 ARCH=sh O=/kisskb/build/kbuild_sh-defconfig_sh4-gcc4.6 CROSS_COMPILE=/opt/cross/kisskb/gcc-4.6.3-nolibc/sh4-linux/bin/sh4-linux- defconfig # < make -s -j 48 ARCH=sh O=/kisskb/build/kbuild_sh-defconfig_sh4-gcc4.6 CROSS_COMPILE=/opt/cross/kisskb/gcc-4.6.3-nolibc/sh4-linux/bin/sh4-linux- help # make -s -j 48 ARCH=sh O=/kisskb/build/kbuild_sh-defconfig_sh4-gcc4.6 CROSS_COMPILE=/opt/cross/kisskb/gcc-4.6.3-nolibc/sh4-linux/bin/sh4-linux- olddefconfig # make -s -j 48 ARCH=sh O=/kisskb/build/kbuild_sh-defconfig_sh4-gcc4.6 CROSS_COMPILE=/opt/cross/kisskb/gcc-4.6.3-nolibc/sh4-linux/bin/sh4-linux- Generating include/generated/machtypes.h :1511:2: warning: #warning syscall clone3 not implemented [-Wcpp] /kisskb/src/arch/sh/kernel/cpu/sh4/../sh3/../../entry-common.S: Assembler messages: /kisskb/src/arch/sh/kernel/cpu/sh4/../sh3/../../entry-common.S:385: Warning: overflow in branch to syscall_exit_work; converted into longer instruction sequence /kisskb/src/arch/sh/kernel/cpu/sh4/../sh3/../../entry-common.S:388: Warning: overflow in branch to syscall_exit_work; converted into longer instruction sequence /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/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:471:21: note: 'pdeo' was declared here /kisskb/src/mm/vmstat.c: In function 'sysctl_vm_numa_stat_handler': /kisskb/src/mm/vmstat.c:90:5: warning: 'oldval' 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:4774:23: warning: 'ret' may be used uninitialized in this function [-Wuninitialized] /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/kernel/trace/trace_events.c: In function 'event_create_dir': /kisskb/src/kernel/trace/trace_events.c:2189:6: warning: 'ret' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/kernel/futex.c: In function 'do_futex': /kisskb/src/kernel/futex.c:1676:3: warning: 'oldval' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/kernel/futex.c:1652:6: note: 'oldval' was declared here /kisskb/src/mm/hugetlb.c: In function 'alloc_pool_huge_page': /kisskb/src/mm/hugetlb.c:1741:5: warning: 'page' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/fs/ext4/readpage.c: In function 'ext4_mpage_readpages': /kisskb/src/fs/ext4/readpage.c:416:1: warning: the frame size of 1180 bytes is larger than 1024 bytes [-Wframe-larger-than=] /kisskb/src/fs/mpage.c: In function '__mpage_writepage': /kisskb/src/fs/mpage.c:690:1: warning: the frame size of 1152 bytes is larger than 1024 bytes [-Wframe-larger-than=] /kisskb/src/fs/mpage.c: In function 'do_mpage_readpage': /kisskb/src/fs/mpage.c:338:1: warning: the frame size of 1108 bytes is larger than 1024 bytes [-Wframe-larger-than=] /kisskb/src/drivers/sh/clk/cpg.c: In function 'r8': /kisskb/src/drivers/sh/clk/cpg.c:41:2: warning: passing argument 1 of 'ioread8' discards 'const' qualifier from pointer target type [enabled by default] /kisskb/src/include/asm-generic/iomap.h:29:21: note: expected 'void *' but argument is of type 'const void *' /kisskb/src/drivers/sh/clk/cpg.c: In function 'r16': /kisskb/src/drivers/sh/clk/cpg.c:46:2: warning: passing argument 1 of 'ioread16' discards 'const' qualifier from pointer target type [enabled by default] /kisskb/src/include/asm-generic/iomap.h:30:21: note: expected 'void *' but argument is of type 'const void *' /kisskb/src/drivers/sh/clk/cpg.c: In function 'r32': /kisskb/src/drivers/sh/clk/cpg.c:51:2: warning: passing argument 1 of 'ioread32' discards 'const' qualifier from pointer target type [enabled by default] /kisskb/src/include/asm-generic/iomap.h:32:21: note: expected 'void *' but argument is of type 'const void *' /kisskb/src/drivers/usb/core/devio.c: In function 'async_completed': /kisskb/src/drivers/usb/core/devio.c:625:23: warning: 'errno' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/fs/io_uring.c: In function '__io_sqe_files_update': /kisskb/src/fs/io_uring.c:6617:13: warning: 'err' may be used uninitialized in this function [-Wuninitialized] Kernel: arch/sh/boot/zImage is ready Completed OK # rm -rf /kisskb/build/kbuild_sh-defconfig_sh4-gcc4.6 # Build took: 0:00:48.616154