From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 9AD55138346 for ; Mon, 6 Jan 2020 18:07:29 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 4A7F7E0980; Mon, 6 Jan 2020 18:07:26 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 00CE7E08EC for ; Mon, 6 Jan 2020 18:07:25 +0000 (UTC) Received: from mail-il1-f180.google.com (mail-il1-f180.google.com [209.85.166.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: floppym) by smtp.gentoo.org (Postfix) with ESMTPSA id 8308B34DDB7 for ; Mon, 6 Jan 2020 18:07:24 +0000 (UTC) Received: by mail-il1-f180.google.com with SMTP id p8so43300605iln.12 for ; Mon, 06 Jan 2020 10:07:24 -0800 (PST) X-Gm-Message-State: APjAAAWoD2chF7JsU8Vk+mWUIj1MYc7sJerOUI/o6LF827yhksZAA2jQ ti6p/hCWY1tsTtkpwQaGz45RwVgA+k6VL7Zony4= X-Google-Smtp-Source: APXvYqwx1TOcL/sz3fcgPXMlfKykZdDAfNzZ6iey64pyeq7gSigzvqME99F7lgfaVUfC6+qkVJXwflVOw0oBRzI067s= X-Received: by 2002:a92:d781:: with SMTP id d1mr84296177iln.30.1578334042652; Mon, 06 Jan 2020 10:07:22 -0800 (PST) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 References: <20200105062741.82357-1-mgorny@gentoo.org> <20200105062741.82357-2-mgorny@gentoo.org> In-Reply-To: From: Mike Gilbert Date: Mon, 6 Jan 2020 13:07:11 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [gentoo-dev] [PATCH v2 2/4] kernel-build.eclass: Build logic for dist-kernels To: Gentoo Dev Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 31568a73-0c4b-46e8-afae-49145718a11f X-Archives-Hash: 04527b96715d20330742838230e164a2 On Mon, Jan 6, 2020 at 12:54 PM Micha=C5=82 G=C3=B3rny = wrote: > > On Mon, 2020-01-06 at 12:43 -0500, Mike Gilbert wrote: > > On Sun, Jan 5, 2020 at 1:27 AM Micha=C5=82 G=C3=B3rny wrote: > > > +# @FUNCTION: kernel-build_src_configure > > > +# @DESCRIPTION: > > > +# Prepare the toolchain for building the kernel, get the default .co= nfig > > > +# or restore savedconfig, and get build tree configured for modprep. > > > +kernel-build_src_configure() { > > > + debug-print-function ${FUNCNAME} "${@}" > > > + > > > + # force ld.bfd if we can find it easily > > > + local LD=3D"$(tc-getLD)" > > > + if type -P "${LD}.bfd" &>/dev/null; then > > > + LD+=3D.bfd > > > + fi > > > > Is there some reason not to use the tc-ld-disable-gold function? > > > > Yes. As the name says, it covers gold usage only and not lld. It might be a good idea to copy this logic to handle multi-word LD values. https://gitweb.gentoo.org/repo/gentoo.git/tree/eclass/toolchain-funcs.eclas= s#n498 Or, a nicer alternative would be to refactor tc-ld-disable-gold into 2 functions: move most of the logic into a new function "tc-ld-force-bfd", and update tc-ld-disable-gold to call the former if tc-ld-is-gold is true. I can write a patch for that if you agree.