# git rev-parse -q --verify 5cf0fd591f2e7833405bdc7ce2176c3502e8a11e^{commit} 5cf0fd591f2e7833405bdc7ce2176c3502e8a11e already have revision, skipping fetch # git checkout -q -f -B kisskb 5cf0fd591f2e7833405bdc7ce2176c3502e8a11e # git clean -qxdf # < git log -1 # commit 5cf0fd591f2e7833405bdc7ce2176c3502e8a11e # Author: Linus Torvalds # Date: Tue Feb 23 12:21:58 2021 -0800 # # Kbuild: disable TRIM_UNUSED_KSYMS option # # The removal of EXPORT_UNUSED_SYMBOL() in commit 367948220fce looks like # (and was sold as) a no-op, but it actually had a rather serious and # subtle side effect: the UNUSED_SYMBOLS option not only enabled the # removed (unused) functionality, it also _disabled_ the TRIM_UNUSED_KSYMS # functionality. # # And it turns out that TRIM_UNUSED_KSYMS is a huge time waste, and takes # up a third of the kernel build time for me. For no actual upside, since # no distro is likely to ever be able to enable it (because they all # support external kernel modules). # # Rather than re-enable EXPORT_UNUSED_SYMBOL, this just disables the # TRIM_UNUSED_KSYMS option by marking it broken. I'm tempted to just # remove the support entirely, but maybe somebody has a use-case and can # fix the behavior of it. # # I could have just disabled it for COMPILE_TEST, but it really smells # like the TRIM_UNUSED_KSYMS option is badly done and not really useful, # so this takes the more direct approach - let's see if anybody ever # actually notices or complains. # # Cc: Miroslav Benes # Cc: Emil Velikov # Cc: Christoph Hellwig # Cc: Jessica Yu # Fixes: 367948220fce ("module: remove EXPORT_UNUSED_SYMBOL*") # Signed-off-by: Linus Torvalds # < /opt/cross/kisskb/korg/gcc-4.9.4-nolibc/sh4-linux/bin/sh4-linux-gcc --version # < /opt/cross/kisskb/korg/gcc-4.9.4-nolibc/sh4-linux/bin/sh4-linux-ld --version # < git log --format=%s --max-count=1 5cf0fd591f2e7833405bdc7ce2176c3502e8a11e # < make -s -j 8 ARCH=sh O=/kisskb/build/linus_magicpanelr2_defconfig_sh4-gcc4.9 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-4.9.4-nolibc/sh4-linux/bin/sh4-linux- magicpanelr2_defconfig # < make -s -j 8 ARCH=sh O=/kisskb/build/linus_magicpanelr2_defconfig_sh4-gcc4.9 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-4.9.4-nolibc/sh4-linux/bin/sh4-linux- help # make -s -j 8 ARCH=sh O=/kisskb/build/linus_magicpanelr2_defconfig_sh4-gcc4.9 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-4.9.4-nolibc/sh4-linux/bin/sh4-linux- olddefconfig # make -s -j 8 ARCH=sh O=/kisskb/build/linus_magicpanelr2_defconfig_sh4-gcc4.9 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-4.9.4-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/traps.c: In function 'nmi_trap_handler': /kisskb/src/arch/sh/kernel/traps.c:183:15: warning: unused variable 'cpu' [-Wunused-variable] unsigned int cpu = smp_processor_id(); ^ /opt/cross/kisskb/korg/gcc-4.9.4-nolibc/sh4-linux/bin/sh4-linux-ld: kernel/sched/core.o: uses dsp instructions while previous modules use floating point instructions /opt/cross/kisskb/korg/gcc-4.9.4-nolibc/sh4-linux/bin/sh4-linux-ld: kernel/sched/core.o: uses instructions which are incompatible with instructions used in previous modules /opt/cross/kisskb/korg/gcc-4.9.4-nolibc/sh4-linux/bin/sh4-linux-ld: failed to merge target specific data of file kernel/sched/core.o make[1]: *** [/kisskb/src/Makefile:1191: vmlinux] Error 1 make: *** [Makefile:185: __sub-make] Error 2 Command 'make -s -j 8 ARCH=sh O=/kisskb/build/linus_magicpanelr2_defconfig_sh4-gcc4.9 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-4.9.4-nolibc/sh4-linux/bin/sh4-linux- ' returned non-zero exit status 2 # rm -rf /kisskb/build/linus_magicpanelr2_defconfig_sh4-gcc4.9 # Build took: 0:01:27.932901