mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Vignesh Raman <vignesh.raman@collabora.com>
To: dri-devel@lists.freedesktop.org
Cc: daniels@collabora.com, helen.fornazier@gmail.com,
	airlied@gmail.com, simona.vetter@ffwll.ch, robdclark@gmail.com,
	guilherme.gallo@collabora.com, sergi.blanch.torne@collabora.com,
	valentine.burley@collabora.com, lumag@kernel.org,
	quic_abhinavk@quicinc.com, mripard@kernel.org,
	maarten.lankhorst@linux.intel.com, tzimmermann@suse.de,
	linux-kernel@vger.kernel.org
Subject: [PATCH v1 1/3] drm/ci: force use of BFD linker
Date: Thu, 27 Mar 2025 21:31:10 +0530	[thread overview]
Message-ID: <20250327160117.945165-2-vignesh.raman@collabora.com> (raw)
In-Reply-To: <20250327160117.945165-1-vignesh.raman@collabora.com>

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@collabora.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@example.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


  reply	other threads:[~2025-03-27 16:01 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-27 16:01 [PATCH v1 0/3] drm/ci: Add devicetree validation and KUnit tests Vignesh Raman
2025-03-27 16:01 ` Vignesh Raman [this message]
2025-03-27 16:01 ` [PATCH v1 2/3] drm/ci: Add jobs to validate devicetrees Vignesh Raman
2025-03-30 17:06   ` Dmitry Baryshkov
2025-03-31  7:53     ` Maxime Ripard
2025-03-31  7:55       ` Dmitry Baryshkov
2025-04-01  2:15         ` Vignesh Raman
2025-04-01  1:56     ` Vignesh Raman
2025-04-01 15:14       ` Maxime Ripard
2025-03-27 16:01 ` [PATCH v1 3/3] drm/ci: Add jobs to run KUnit tests Vignesh Raman
2025-03-28 15:10   ` Maxime Ripard
2025-04-01  2:17     ` Vignesh Raman
2025-04-07 12:35       ` Maxime Ripard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250327160117.945165-2-vignesh.raman@collabora.com \
    --to=vignesh.raman@collabora.com \
    --cc=airlied@gmail.com \
    --cc=daniels@collabora.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=guilherme.gallo@collabora.com \
    --cc=helen.fornazier@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lumag@kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=quic_abhinavk@quicinc.com \
    --cc=robdclark@gmail.com \
    --cc=sergi.blanch.torne@collabora.com \
    --cc=simona.vetter@ffwll.ch \
    --cc=tzimmermann@suse.de \
    --cc=valentine.burley@collabora.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®