# git rev-parse -q --verify 7dbd98b1927bee4be878ab2caa13546256db40e9^{commit} # git fetch -q -n -f git://gitlab.ozlabs.ibm.com/mirror/linux-kbuild.git for-next # git rev-parse -q --verify 7dbd98b1927bee4be878ab2caa13546256db40e9^{commit} 7dbd98b1927bee4be878ab2caa13546256db40e9 # git checkout -q -f -B kisskb 7dbd98b1927bee4be878ab2caa13546256db40e9 # git clean -qxdf # < git log -1 # commit 7dbd98b1927bee4be878ab2caa13546256db40e9 # Author: Alexey Kardashevskiy # Date: Thu Sep 29 12:08:23 2022 +1000 # # zstd: Fixing mixed module-builtin objects # # With CONFIG_ZSTD_COMPRESS=m and CONFIG_ZSTD_DECOMPRESS=y we end up in # a situation when files from lib/zstd/common/ are compiled once to be # linked later for ZSTD_DECOMPRESS (build-in) and ZSTD_COMPRESS (module) # even though CFLAGS are different for builtins and modules. # So far somehow this was not a problem but enabling LLVM LTO exposes # the problem as: # # ld.lld: error: linking module flags 'Code Model': IDs have conflicting values in 'lib/built-in.a(zstd_common.o at 5868)' and 'ld-temp.o' # # This particular conflict is caused by KBUILD_CFLAGS=-mcmodel=medium vs. # KBUILD_CFLAGS_MODULE=-mcmodel=large , modules use the large model on # POWERPC as explained at # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/powerpc/Makefile?h=v5.18-rc4#n127 # but the current use of common files is wrong anyway. # # This works around the issue by introducing a zstd_common module with # shared code. # # Signed-off-by: Alexey Kardashevskiy # Signed-off-by: Masahiro Yamada # < /opt/cross/kisskb/korg/gcc-11.1.0-nolibc/m68k-linux/bin/m68k-linux-gcc --version # < /opt/cross/kisskb/korg/gcc-11.1.0-nolibc/m68k-linux/bin/m68k-linux-ld --version # < git log --format=%s --max-count=1 7dbd98b1927bee4be878ab2caa13546256db40e9 # < make -s -j 24 ARCH=m68k O=/kisskb/build/kbuild_m68k-defconfig_m68k-gcc11 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-11.1.0-nolibc/m68k-linux/bin/m68k-linux- defconfig # < make -s -j 24 ARCH=m68k O=/kisskb/build/kbuild_m68k-defconfig_m68k-gcc11 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-11.1.0-nolibc/m68k-linux/bin/m68k-linux- help # make -s -j 24 ARCH=m68k O=/kisskb/build/kbuild_m68k-defconfig_m68k-gcc11 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-11.1.0-nolibc/m68k-linux/bin/m68k-linux- olddefconfig # make -s -j 24 ARCH=m68k O=/kisskb/build/kbuild_m68k-defconfig_m68k-gcc11 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-11.1.0-nolibc/m68k-linux/bin/m68k-linux- Completed OK # rm -rf /kisskb/build/kbuild_m68k-defconfig_m68k-gcc11 # Build took: 0:03:18.978386