From: Thomas Preston <thomas.preston@codethink.co.uk>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/3] package/lld: create $(HOST_DIR)/$(GNU_TARGET_NAME)/bin before create symlinks
Date: Wed, 20 Nov 2019 16:57:53 +0000 [thread overview]
Message-ID: <24e6ecfd-5487-e466-d58f-d4719e5447ec@codethink.co.uk> (raw)
In-Reply-To: <20191024202211.15619-1-romain.naour@smile.fr>
Hi,
Sorry for the late feedback on this, I know it's already been accepted.
On 24/10/2019 21:22, Romain Naour wrote:
> $(HOST_DIR)/$(GNU_TARGET_NAME)/bin directory may not exist before creating
> lld symlinks.
>
> Signed-off-by: Romain Naour <romain.naour@smile.fr>
> Cc: Joseph Kogut <joseph.kogut@gmail.com>
> ---
> package/lld/lld.mk | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/package/lld/lld.mk b/package/lld/lld.mk
> index a6933e2961..bda5a56ab5 100644
> --- a/package/lld/lld.mk
> +++ b/package/lld/lld.mk
> @@ -14,6 +14,7 @@ HOST_LLD_DEPENDENCIES = host-llvm
>
> # GCC looks for tools in a different path from LLD's default installation path
> define HOST_LLD_CREATE_SYMLINKS
> + mkdir -p $(HOST_DIR)/$(GNU_TARGET_NAME)/bin
> ln -sf $(HOST_DIR)/bin/lld $(HOST_DIR)/$(GNU_TARGET_NAME)/bin/lld
> ln -sf $(HOST_DIR)/bin/lld $(HOST_DIR)/$(GNU_TARGET_NAME)/bin/ld.lld
> endef
>
Why do we create symlinks inside the toolchain directory? I think this is
confusing and it breaks external toolchains, because they might not be
located at $(HOST_DIR)/$(GNU_TARGET_NAME). They might be located at:
$(HOST_DIR)/toolchain/$(GNU_TARGET_NAME)
/some/random/location/$(GNU_TARGET_NAME)
This change adds a `mkdir -p`, which silences this bug.
I think the right solution is to do away with HOST_LLD_CREATE_SYMLINKS,
and just use a full path to lld (because it is not part of the toolchain):
-fuse-ld=$(HOST_DIR)/bin/lld
Are you sure HOST_LLD_CREATE_SYMLINKS is needed?
Thanks,
Thomas Preston
prev parent reply other threads:[~2019-11-20 16:57 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-24 20:22 [Buildroot] [PATCH 1/3] package/lld: create $(HOST_DIR)/$(GNU_TARGET_NAME)/bin before create symlinks Romain Naour
2019-10-24 20:22 ` [Buildroot] [PATCH 2/3] package/lld: bump to version 9.0.0 Romain Naour
2019-10-24 20:22 ` [Buildroot] [PATCH 3/3] package/{llvm, clang, lld}: update comment to keep them at the same version Romain Naour
2019-10-24 23:01 ` [Buildroot] [PATCH 1/3] package/lld: create $(HOST_DIR)/$(GNU_TARGET_NAME)/bin before create symlinks Joseph Kogut
2019-10-25 8:29 ` Peter Korsgaard
2019-11-20 16:57 ` Thomas Preston [this message]
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=24e6ecfd-5487-e466-d58f-d4719e5447ec@codethink.co.uk \
--to=thomas.preston@codethink.co.uk \
--cc=buildroot@busybox.net \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.