# git rev-parse -q --verify 7dbd98b1927bee4be878ab2caa13546256db40e9^{commit} 7dbd98b1927bee4be878ab2caa13546256db40e9 already have revision, skipping fetch # 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/x86_64-linux/bin/x86_64-linux-gcc --version # < /opt/cross/kisskb/korg/gcc-11.1.0-nolibc/x86_64-linux/bin/x86_64-linux-ld --version # < git log --format=%s --max-count=1 7dbd98b1927bee4be878ab2caa13546256db40e9 # < make -s -j 120 ARCH=x86 O=/kisskb/build/kbuild_x86_64_defconfig_x86_64-gcc11 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-11.1.0-nolibc/x86_64-linux/bin/x86_64-linux- x86_64_defconfig # < make -s -j 120 ARCH=x86 O=/kisskb/build/kbuild_x86_64_defconfig_x86_64-gcc11 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-11.1.0-nolibc/x86_64-linux/bin/x86_64-linux- help # make -s -j 120 ARCH=x86 O=/kisskb/build/kbuild_x86_64_defconfig_x86_64-gcc11 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-11.1.0-nolibc/x86_64-linux/bin/x86_64-linux- olddefconfig # make -s -j 120 ARCH=x86 O=/kisskb/build/kbuild_x86_64_defconfig_x86_64-gcc11 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-11.1.0-nolibc/x86_64-linux/bin/x86_64-linux- Completed OK # rm -rf /kisskb/build/kbuild_x86_64_defconfig_x86_64-gcc11 # Build took: 0:01:45.229388