lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250327160117.945165-2-vignesh.raman@collabora.com>
Date: Thu, 27 Mar 2025 21:31:10 +0530
From: Vignesh Raman <vignesh.raman@...labora.com>
To: dri-devel@...ts.freedesktop.org
Cc: daniels@...labora.com,
	helen.fornazier@...il.com,
	airlied@...il.com,
	simona.vetter@...ll.ch,
	robdclark@...il.com,
	guilherme.gallo@...labora.com,
	sergi.blanch.torne@...labora.com,
	valentine.burley@...labora.com,
	lumag@...nel.org,
	quic_abhinavk@...cinc.com,
	mripard@...nel.org,
	maarten.lankhorst@...ux.intel.com,
	tzimmermann@...e.de,
	linux-kernel@...r.kernel.org
Subject: [PATCH v1 1/3] drm/ci: force use of BFD linker

When using a toolchain with gold as the default linker in Debian, the
kernel build fails:

x86_64-linux-gnu-ld: unknown linker
scripts/Kconfig.include:56: Sorry, this linker is not supported.

So force the use of the BFD linker. This was already part of the build
script but has now been moved to a separate script so that other jobs
(dtbs check, kunit) can use it.

Signed-off-by: Vignesh Raman <vignesh.raman@...labora.com>
---
 drivers/gpu/drm/ci/build.sh                | 14 ++------------
 drivers/gpu/drm/ci/override-ld-with-bfd.sh | 16 ++++++++++++++++
 2 files changed, 18 insertions(+), 12 deletions(-)
 create mode 100755 drivers/gpu/drm/ci/override-ld-with-bfd.sh

diff --git a/drivers/gpu/drm/ci/build.sh b/drivers/gpu/drm/ci/build.sh
index 284873e94d8d..3857b732cf16 100644
--- a/drivers/gpu/drm/ci/build.sh
+++ b/drivers/gpu/drm/ci/build.sh
@@ -8,6 +8,8 @@ rm -rf .git/rebase-apply
 
 . .gitlab-ci/container/container_pre_build.sh
 
+. drivers/gpu/drm/ci/override-ld-with-bfd.sh
+
 # libssl-dev was uninstalled because it was considered an ephemeral package
 apt-get update
 apt-get install -y libssl-dev
@@ -47,18 +49,6 @@ fi
 export ARCH=${KERNEL_ARCH}
 export CROSS_COMPILE="${GCC_ARCH}-"
 
-# The kernel doesn't like the gold linker (or the old lld in our debians).
-# Sneak in some override symlinks during kernel build until we can update
-# debian.
-mkdir -p ld-links
-for i in /usr/bin/*-ld /usr/bin/ld; do
-    i=$(basename $i)
-    ln -sf /usr/bin/$i.bfd ld-links/$i
-done
-
-NEWPATH=$(pwd)/ld-links
-export PATH=$NEWPATH:$PATH
-
 git config --global user.email "fdo@...mple.com"
 git config --global user.name "freedesktop.org CI"
 git config --global pull.rebase true
diff --git a/drivers/gpu/drm/ci/override-ld-with-bfd.sh b/drivers/gpu/drm/ci/override-ld-with-bfd.sh
new file mode 100755
index 000000000000..9728dc39cb19
--- /dev/null
+++ b/drivers/gpu/drm/ci/override-ld-with-bfd.sh
@@ -0,0 +1,16 @@
+#!/bin/bash
+# SPDX-License-Identifier: MIT
+
+set -ex
+
+# The kernel doesn't like the gold linker (or the old lld in our debians).
+# Sneak in some override symlinks during kernel build until we can update
+# debian.
+mkdir -p ld-links
+for i in /usr/bin/*-ld /usr/bin/ld; do
+    i=$(basename $i)
+    ln -sf /usr/bin/$i.bfd ld-links/$i
+done
+
+NEWPATH=$(pwd)/ld-links
+export PATH=$NEWPATH:$PATH
-- 
2.47.2


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ