* [Buildroot] [PATCH 1/3] package/lld: create $(HOST_DIR)/$(GNU_TARGET_NAME)/bin before create symlinks
@ 2019-10-24 20:22 Romain Naour
2019-10-24 20:22 ` [Buildroot] [PATCH 2/3] package/lld: bump to version 9.0.0 Romain Naour
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: Romain Naour @ 2019-10-24 20:22 UTC (permalink / raw)
To: buildroot
$(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
--
2.21.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH 2/3] package/lld: bump to version 9.0.0
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 ` 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
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Romain Naour @ 2019-10-24 20:22 UTC (permalink / raw)
To: buildroot
Since v9.0.0, it was relicensed to the Apache License 2.0 with
LLVM Exceptions. Update the license file hash.
lld package must use the same version as llvm package.
llvm 9.0.0 renamed some define that break the build for lld <= 8.0.0.
https://github.com/llvm-mirror/lld/commit/66fca3a6b8cc0112a4c72237ffaea5eb4b659e3f
Fixes:
http://autobuild.buildroot.org/results/9a0/9a0534c4206b40963d32494ff9675543e78125d1
Signed-off-by: Romain Naour <romain.naour@smile.fr>
Cc: Joseph Kogut <joseph.kogut@gmail.com>
---
Build tested only with llvm 9.0.0 for x86_64 target.
---
package/lld/lld.hash | 4 ++--
package/lld/lld.mk | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/package/lld/lld.hash b/package/lld/lld.hash
index dfbb290cf4..3d5a3feb9a 100644
--- a/package/lld/lld.hash
+++ b/package/lld/lld.hash
@@ -1,3 +1,3 @@
# locally calculated
-sha256 9caec8ec922e32ffa130f0fb08e4c5a242d7e68ce757631e425e9eba2e1a6e37 lld-8.0.0.src.tar.xz
-sha256 f0502d2d0e19748c534ee95ea486c092273303dbef76404c8b17dc8bf6ca441b LICENSE.TXT
+sha256 31c6748b235d09723fb73fea0c816ed5a3fab0f96b66f8fbc546a0fcc8688f91 lld-9.0.0.src.tar.xz
+sha256 f7891568956e34643eb6a0db1462db30820d40d7266e2a78063f2fe233ece5a0 LICENSE.TXT
diff --git a/package/lld/lld.mk b/package/lld/lld.mk
index bda5a56ab5..0c880018ac 100644
--- a/package/lld/lld.mk
+++ b/package/lld/lld.mk
@@ -4,10 +4,10 @@
#
################################################################################
-LLD_VERSION = 8.0.0
+LLD_VERSION = 9.0.0
LLD_SITE = https://llvm.org/releases/$(LLD_VERSION)
LLD_SOURCE = lld-$(LLD_VERSION).src.tar.xz
-LLD_LICENSE = NCSA
+LLD_LICENSE = Apache-2.0 with exceptions
LLD_LICENSE_FILES = LICENSE.TXT
LLD_SUPPORTS_IN_SOURCE_BUILD = NO
HOST_LLD_DEPENDENCIES = host-llvm
--
2.21.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH 3/3] package/{llvm, clang, lld}: update comment to keep them at the same version.
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 ` 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
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Romain Naour @ 2019-10-24 20:22 UTC (permalink / raw)
To: buildroot
Signed-off-by: Romain Naour <romain.naour@smile.fr>
---
package/clang/clang.mk | 2 +-
package/lld/lld.mk | 1 +
package/llvm/llvm.mk | 2 +-
3 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/package/clang/clang.mk b/package/clang/clang.mk
index 35fe2feef3..87bdf52e8d 100644
--- a/package/clang/clang.mk
+++ b/package/clang/clang.mk
@@ -4,7 +4,7 @@
#
################################################################################
-# LLVM and Clang should be version bumped together
+# LLVM, Clang and lld should be version bumped together
CLANG_VERSION = 9.0.0
CLANG_SITE = http://llvm.org/releases/$(CLANG_VERSION)
CLANG_SOURCE = cfe-$(CLANG_VERSION).src.tar.xz
diff --git a/package/lld/lld.mk b/package/lld/lld.mk
index 0c880018ac..cd76c724ce 100644
--- a/package/lld/lld.mk
+++ b/package/lld/lld.mk
@@ -4,6 +4,7 @@
#
################################################################################
+# LLVM, Clang and lld should be version bumped together
LLD_VERSION = 9.0.0
LLD_SITE = https://llvm.org/releases/$(LLD_VERSION)
LLD_SOURCE = lld-$(LLD_VERSION).src.tar.xz
diff --git a/package/llvm/llvm.mk b/package/llvm/llvm.mk
index ca89525858..4d9bb1d12f 100644
--- a/package/llvm/llvm.mk
+++ b/package/llvm/llvm.mk
@@ -4,7 +4,7 @@
#
################################################################################
-# LLVM and Clang should be version bumped together
+# LLVM, Clang and lld should be version bumped together
LLVM_VERSION = 9.0.0
LLVM_SITE = http://llvm.org/releases/$(LLVM_VERSION)
LLVM_SOURCE = llvm-$(LLVM_VERSION).src.tar.xz
--
2.21.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH 1/3] package/lld: create $(HOST_DIR)/$(GNU_TARGET_NAME)/bin before create symlinks
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 ` Joseph Kogut
2019-10-25 8:29 ` Peter Korsgaard
2019-11-20 16:57 ` Thomas Preston
4 siblings, 0 replies; 6+ messages in thread
From: Joseph Kogut @ 2019-10-24 23:01 UTC (permalink / raw)
To: buildroot
Hi Romain,
On Thu, Oct 24, 2019 at 1:22 PM Romain Naour <romain.naour@smile.fr> 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
> --
> 2.21.0
>
These changes look good. However, the build does still require a
modification to llvm's makefile to disable the bindings for host-llvm.
I'll send a revised version of my earlier patch to address this.
With that patch, this series has my
Tested-By: Joseph Kogut <joseph.kogut@gmail.com>
Tested building on x86-64 w/ GCC 9.2.0, as well as building a sample
program as follows:
$ echo "int main(){ return 0; }" > test.c
$ output/host/bin/x86_64-buildroot-linux-gnu-gcc -fuse-ld=lld test.c -o test
$ readelf --string-dump .comment test
String dump of section '.comment':
[ 0] GCC: (Buildroot 2019.11-git-01165-g027e1e1410) 9.2.0
[ 35] Linker: LLD 9.0.0 (https://github.com/buildroot/buildroot
a2f0a106dd6eb62b52c815d299add5a07fd66e98)
$ ./test && echo $?
0
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH 1/3] package/lld: create $(HOST_DIR)/$(GNU_TARGET_NAME)/bin before create symlinks
2019-10-24 20:22 [Buildroot] [PATCH 1/3] package/lld: create $(HOST_DIR)/$(GNU_TARGET_NAME)/bin before create symlinks Romain Naour
` (2 preceding siblings ...)
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
4 siblings, 0 replies; 6+ messages in thread
From: Peter Korsgaard @ 2019-10-25 8:29 UTC (permalink / raw)
To: buildroot
>>>>> "Romain" == Romain Naour <romain.naour@smile.fr> writes:
> $(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>
Committed, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH 1/3] package/lld: create $(HOST_DIR)/$(GNU_TARGET_NAME)/bin before create symlinks
2019-10-24 20:22 [Buildroot] [PATCH 1/3] package/lld: create $(HOST_DIR)/$(GNU_TARGET_NAME)/bin before create symlinks Romain Naour
` (3 preceding siblings ...)
2019-10-25 8:29 ` Peter Korsgaard
@ 2019-11-20 16:57 ` Thomas Preston
4 siblings, 0 replies; 6+ messages in thread
From: Thomas Preston @ 2019-11-20 16:57 UTC (permalink / raw)
To: buildroot
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
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2019-11-20 16:57 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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.