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 C91D31382C5 for ; Thu, 21 Jan 2021 05:10:58 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 03712E083B; Thu, 21 Jan 2021 05:10:53 +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 DA83FE0827 for ; Thu, 21 Jan 2021 05:10:51 +0000 (UTC) Received: by mail-io1-f43.google.com with SMTP id d13so1666060ioy.4 for ; Wed, 20 Jan 2021 21:10:49 -0800 (PST) X-Gm-Message-State: AOAM530XY06vKestq4F/KIEjwIedpt64pS08x3IViYqlLGxYP2NCEH1D mV/hNcjL2A9ebBUJ60zhP3+A80QJGht9UwzUZnE= X-Google-Smtp-Source: ABdhPJxozqPjdJhtVA4QMvdpplCMdnbt8R8JcBOjx05dvXRGWLV/pWMEOBxdUyTfS3DSQrw2oV3d7iV/Kk/CmDkIqGs= X-Received: by 2002:a02:3f0d:: with SMTP id d13mr10388404jaa.19.1611205847469; Wed, 20 Jan 2021 21:10:47 -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: <20210121100059.7479182d@genbox> In-Reply-To: From: Mike Gilbert Date: Thu, 21 Jan 2021 00:10:36 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [gentoo-dev] [PATCH] toolchain-funcs.eclass: new function tc-ld-force-bfd() To: Gentoo Dev Content-Type: text/plain; charset="UTF-8" X-Archives-Salt: 38e21b39-8332-4184-a52d-60881d215242 X-Archives-Hash: 6c68b540701c60295922f9fce5c3550d 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.