All of lore.kernel.org
 help / color / mirror / Atom feed
* [TCWG CI] Regression caused by linux: arm64: vdso32: require CROSS_COMPILE_COMPAT for gcc+bfd
@ 2022-01-01 18:45 ci_notify
  0 siblings, 0 replies; 4+ messages in thread
From: ci_notify @ 2022-01-01 18:45 UTC (permalink / raw)
  To: Nick Desaulniers; +Cc: llvm, arnd

[-- Attachment #1: Type: text/plain, Size: 6877 bytes --]

[TCWG CI] Regression caused by linux: arm64: vdso32: require CROSS_COMPILE_COMPAT for gcc+bfd:
commit 1d1c25233a29cd6c9b7c19ea725461f9dc180e63
Author: Nick Desaulniers <ndesaulniers@google.com>

    arm64: vdso32: require CROSS_COMPILE_COMPAT for gcc+bfd

Results regressed to
# reset_artifacts:
-10
# build_abe binutils:
-9
# build_llvm:
-5
# build_abe qemu:
-2
# linux_n_obj:
40
# First few build errors in logs:
# 00:00:35 error: unable to create target: 'No available targets are compatible with triple '
# 00:00:35 make[1]: *** [arch/arm64/kernel/vdso32/Makefile:167: arch/arm64/kernel/vdso32/note.o] Error 1
# 00:00:35 error: unable to create target: 'No available targets are compatible with triple '
# 00:00:35 make[1]: *** [arch/arm64/kernel/vdso32/Makefile:169: arch/arm64/kernel/vdso32/vgettimeofday.o] Error 1
# 00:00:35 make: *** [arch/arm64/Makefile:202: vdso_prepare] Error 2

from
# reset_artifacts:
-10
# build_abe binutils:
-9
# build_llvm:
-5
# build_abe qemu:
-2
# linux_n_obj:
22047

THIS IS THE END OF INTERESTING STUFF.  BELOW ARE LINKS TO BUILDS, REPRODUCTION INSTRUCTIONS, AND THE RAW COMMIT.

This commit has regressed these CI configurations:
 - tcwg_kernel/llvm-master-aarch64-lts-allmodconfig

First_bad build: https://ci.linaro.org/job/tcwg_kernel-llvm-bisect-llvm-master-aarch64-lts-allmodconfig/11/artifact/artifacts/build-1d1c25233a29cd6c9b7c19ea725461f9dc180e63/
Last_good build: https://ci.linaro.org/job/tcwg_kernel-llvm-bisect-llvm-master-aarch64-lts-allmodconfig/11/artifact/artifacts/build-fb6ad5cb3b6745e7bffc5fe19b130f3594375634/
Baseline build: https://ci.linaro.org/job/tcwg_kernel-llvm-bisect-llvm-master-aarch64-lts-allmodconfig/11/artifact/artifacts/build-baseline/
Even more details: https://ci.linaro.org/job/tcwg_kernel-llvm-bisect-llvm-master-aarch64-lts-allmodconfig/11/artifact/artifacts/

Reproduce builds:
<cut>
mkdir investigate-linux-1d1c25233a29cd6c9b7c19ea725461f9dc180e63
cd investigate-linux-1d1c25233a29cd6c9b7c19ea725461f9dc180e63

# Fetch scripts
git clone https://git.linaro.org/toolchain/jenkins-scripts

# Fetch manifests and test.sh script
mkdir -p artifacts/manifests
curl -o artifacts/manifests/build-baseline.sh https://ci.linaro.org/job/tcwg_kernel-llvm-bisect-llvm-master-aarch64-lts-allmodconfig/11/artifact/artifacts/manifests/build-baseline.sh --fail
curl -o artifacts/manifests/build-parameters.sh https://ci.linaro.org/job/tcwg_kernel-llvm-bisect-llvm-master-aarch64-lts-allmodconfig/11/artifact/artifacts/manifests/build-parameters.sh --fail
curl -o artifacts/test.sh https://ci.linaro.org/job/tcwg_kernel-llvm-bisect-llvm-master-aarch64-lts-allmodconfig/11/artifact/artifacts/test.sh --fail
chmod +x artifacts/test.sh

# Reproduce the baseline build (build all pre-requisites)
./jenkins-scripts/tcwg_kernel-build.sh @@ artifacts/manifests/build-baseline.sh

# Save baseline build state (which is then restored in artifacts/test.sh)
mkdir -p ./bisect
rsync -a --del --delete-excluded --exclude /bisect/ --exclude /artifacts/ --exclude /linux/ ./ ./bisect/baseline/

cd linux

# Reproduce first_bad build
git checkout --detach 1d1c25233a29cd6c9b7c19ea725461f9dc180e63
../artifacts/test.sh

# Reproduce last_good build
git checkout --detach fb6ad5cb3b6745e7bffc5fe19b130f3594375634
../artifacts/test.sh

cd ..
</cut>

Full commit (up to 1000 lines):
<cut>
commit 1d1c25233a29cd6c9b7c19ea725461f9dc180e63
Author: Nick Desaulniers <ndesaulniers@google.com>
Date:   Tue Oct 19 15:36:46 2021 -0700

    arm64: vdso32: require CROSS_COMPILE_COMPAT for gcc+bfd
    
    commit 3e6f8d1fa18457d54b20917bd9174d27daf09ab9 upstream.
    
    Similar to
    commit 231ad7f409f1 ("Makefile: infer --target from ARCH for CC=clang")
    There really is no point in setting --target based on
    $CROSS_COMPILE_COMPAT for clang when the integrated assembler is being
    used, since
    commit ef94340583ee ("arm64: vdso32: drop -no-integrated-as flag").
    
    Allows COMPAT_VDSO to be selected without setting $CROSS_COMPILE_COMPAT
    when using clang and lld together.
    
    Before:
    $ ARCH=arm64 CROSS_COMPILE_COMPAT=arm-linux-gnueabi- make -j72 LLVM=1 defconfig
    $ grep CONFIG_COMPAT_VDSO .config
    CONFIG_COMPAT_VDSO=y
    $ ARCH=arm64 make -j72 LLVM=1 defconfig
    $ grep CONFIG_COMPAT_VDSO .config
    $
    
    After:
    $ ARCH=arm64 CROSS_COMPILE_COMPAT=arm-linux-gnueabi- make -j72 LLVM=1 defconfig
    $ grep CONFIG_COMPAT_VDSO .config
    CONFIG_COMPAT_VDSO=y
    $ ARCH=arm64 make -j72 LLVM=1 defconfig
    $ grep CONFIG_COMPAT_VDSO .config
    CONFIG_COMPAT_VDSO=y
    
    Reviewed-by: Nathan Chancellor <nathan@kernel.org>
    Suggested-by: Nathan Chancellor <nathan@kernel.org>
    Tested-by: Nathan Chancellor <nathan@kernel.org>
    Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
    Reviewed-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
    Link: https://lore.kernel.org/r/20211019223646.1146945-5-ndesaulniers@google.com
    Signed-off-by: Will Deacon <will@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 arch/arm64/Kconfig                |  3 ++-
 arch/arm64/kernel/vdso32/Makefile | 17 +++++------------
 2 files changed, 7 insertions(+), 13 deletions(-)

diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index fee914c716aa..0758ea0717f9 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -1264,7 +1264,8 @@ config KUSER_HELPERS
 
 config COMPAT_VDSO
 	bool "Enable vDSO for 32-bit applications"
-	depends on !CPU_BIG_ENDIAN && "$(CROSS_COMPILE_COMPAT)" != ""
+	depends on !CPU_BIG_ENDIAN
+	depends on (CC_IS_CLANG && LD_IS_LLD) || "$(CROSS_COMPILE_COMPAT)" != ""
 	select GENERIC_COMPAT_VDSO
 	default y
 	help
diff --git a/arch/arm64/kernel/vdso32/Makefile b/arch/arm64/kernel/vdso32/Makefile
index 764d1900d5aa..3514269ac75f 100644
--- a/arch/arm64/kernel/vdso32/Makefile
+++ b/arch/arm64/kernel/vdso32/Makefile
@@ -10,18 +10,15 @@ include $(srctree)/lib/vdso/Makefile
 
 # Same as cc-*option, but using CC_COMPAT instead of CC
 ifeq ($(CONFIG_CC_IS_CLANG), y)
-CC_COMPAT_CLANG_FLAGS := --target=$(notdir $(CROSS_COMPILE_COMPAT:%-=%))
-
 CC_COMPAT ?= $(CC)
-CC_COMPAT += $(CC_COMPAT_CLANG_FLAGS)
-
-ifneq ($(LLVM),)
-LD_COMPAT ?= $(LD)
+CC_COMPAT += --target=arm-linux-gnueabi
 else
-LD_COMPAT ?= $(CROSS_COMPILE_COMPAT)ld
+CC_COMPAT ?= $(CROSS_COMPILE_COMPAT)gcc
 endif
+
+ifeq ($(CONFIG_LD_IS_LLD), y)
+LD_COMPAT ?= $(LD)
 else
-CC_COMPAT ?= $(CROSS_COMPILE_COMPAT)gcc
 LD_COMPAT ?= $(CROSS_COMPILE_COMPAT)ld
 endif
 
@@ -47,10 +44,6 @@ VDSO_CPPFLAGS += $(LINUXINCLUDE)
 # Common C and assembly flags
 # From top-level Makefile
 VDSO_CAFLAGS := $(VDSO_CPPFLAGS)
-ifneq ($(shell $(CC_COMPAT) --version 2>&1 | head -n 1 | grep clang),)
-VDSO_CAFLAGS += --target=$(notdir $(CROSS_COMPILE_COMPAT:%-=%))
-endif
-
 VDSO_CAFLAGS += $(call cc32-option,-fno-PIE)
 ifdef CONFIG_DEBUG_INFO
 VDSO_CAFLAGS += -g
</cut>

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-01-01 18:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <205626749.4145.1635943938669@jenkins.jenkins>
     [not found] ` <810882F1-8476-435A-8B32-272F4D9D78D5@linaro.org>
2021-11-03 17:07   ` [TCWG CI] Regression caused by linux: arm64: vdso32: require CROSS_COMPILE_COMPAT for gcc+bfd Nick Desaulniers
2021-11-03 17:13     ` Maxim Kuvyrkov
2021-11-03 17:46       ` Nick Desaulniers
2022-01-01 18:45 ci_notify

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.