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 0CE121382C5 for ; Thu, 21 Jan 2021 10:45:14 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id DAB7EE0826; Thu, 21 Jan 2021 10:45:09 +0000 (UTC) Received: from mout01.posteo.de (mout01.posteo.de [185.67.36.65]) (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 64E42E0821 for ; Thu, 21 Jan 2021 10:45:08 +0000 (UTC) Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id 610DF16005F for ; Thu, 21 Jan 2021 11:45:06 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1611225906; bh=CPnbM6IJ4pG55yiBYD1eGiDBwUQsOSCO1gLvYeoEdSY=; h=Date:From:To:Subject:From; b=LV4p4IAXuytsxUSOQEzZw5dKFmO2k/YakdqYNvOwgBDwCezPk4RLMpMS2D61Nt3RZ EF2TvvN5cqT3xkpNTAQqTkwAVxKSLycbW6MNsQjTR2c9C4PIW8fRT80482r13tZAH3 7nhXkb45BapcKWx8Pij4sd0P9Vi0tQPRA6MsRHkg5/hZ+S4yNdO9I/Kb5ynfveePhC 4xfUhPzh3ljrWXA21zovGNUXq53q4vQ6RAjA3NwcdJ7YMUXfDw86IKD6mlBTW5FdTm GJB3aoM9Zz4IQFiO1v8oBvWaGAtD5EzBpc7QLZqLQN+M2k51/vZF26E4bUDR179Vsj 3wXVsKpYEJuBw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4DLzYX6ntcz9rxW for ; Thu, 21 Jan 2021 11:45:03 +0100 (CET) Date: Thu, 21 Jan 2021 23:44:56 +1300 From: Theo Anderson To: gentoo-dev@lists.gentoo.org Subject: Re: [gentoo-dev] [PATCH] toolchain-funcs.eclass: new function tc-ld-force-bfd() Message-ID: <20210121234456.0c6a359e@genbox> In-Reply-To: References: <20210121100059.7479182d@genbox> 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 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Archives-Salt: e221781d-5a81-4004-9191-87414e544307 X-Archives-Hash: 89414c66e652f792df873ea5637ad303 On Thu, 21 Jan 2021 00:10:36 -0500 Mike Gilbert wrote: > On Wed, Jan 20, 2021 at 9:41 PM Manoj Gupta > wrote: > > > > > > > > On Wed, Jan 20, 2021 at 1:01 PM Theo Anderson > > wrote: > >> > >> Hello, please see the below patch to support disabling ld.lld like > >> ld.gold. This has not been split into a separate function > >> such as tc-ld-disable-lld(), as I do not believe there is a use > >> case where ld.gold is supported and ld.lld is not. > >> > >> Thanks. > >> > >> Pull-request: https://github.com/gentoo/gentoo/pull/19116 > >> > > > > I am not a Gentoo maintainer but this forces bfd linker for the > > ebuilds when gold is not even used e.g. lld is default linker. I am > > curious how many places where gold is disabled do not work with > > lld. In my experience, LLD is far more compatible with bfd than > > gold e.g. it can link Linux kernels. So, imo we should not disable > > lld as a side effect when the compatibility problem is with gold > > only. i.e. It is ok to add a function to force bfd but disabling > > gold needs to have a check if gold is the current linker. > > > > My preference us to add 2 functions: > > tc-ld-force-bfd > > tc-ld-disable-lld > > > > And tc-ld-disable-gold should check if gold is the current linker. > > If not, only then force bfd. > > > > What do the maintainers think? > > Please see bug 729510 for an example where gold and lld do not work, > but bfd does. That bug precipitated this change in the first place. > > I don't think there are any cases where we want to disable lld without > disabling gold. Maybe it would suffice to un-deprecate > tc-ld-disable-gold and only have it call tc-ld-force-bfd if the > default linker is gold. I don't think a separate tc-ld-disable-lld > function is necessary at this time, and it could be easily added > later. > This is probably the solution to go for at the moment. I will update the patch and post a v2. Regarding a new function such as tc-set-linker as mentioned by Afrever, a complete overhaul like that would be better suited as a separate patch.