All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] toolchain/toolchain-external: Allow relative paths in BR2_TOOLCHAIN_EXTERNAL_PATH.
@ 2021-05-27 14:51 Juergen Stuber
  2022-01-08 18:25 ` Romain Naour
  2022-02-08 20:56 ` Arnout Vandecappelle
  0 siblings, 2 replies; 3+ messages in thread
From: Juergen Stuber @ 2021-05-27 14:51 UTC (permalink / raw)
  To: buildroot

Convert BR2_TOOLCHAIN_EXTERNAL_PATH to an absolute path when used.

Otherwise the symbolic links to the external toolchain binaries are
not installed in host/bin when BR2_TOOLCHAIN_EXTERNAL_PATH is relative.
This happens because TOOLCHAIN_EXTERNAL_INSTALL_WRAPPER
changes directory into host/bin to create the symbolic links.
From there the tools are no longer found via the relative path and
a single symbolic link host/bin/$(prefix)-* is created instead.

Signed-off-by: Juergen Stuber <juergen@jstuber.net>
---
 toolchain/toolchain-external/pkg-toolchain-external.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/toolchain/toolchain-external/pkg-toolchain-external.mk b/toolchain/toolchain-external/pkg-toolchain-external.mk
index 6d91cb5d1e..2b70007a34 100644
--- a/toolchain/toolchain-external/pkg-toolchain-external.mk
+++ b/toolchain/toolchain-external/pkg-toolchain-external.mk
@@ -68,7 +68,7 @@ TOOLCHAIN_EXTERNAL_DOWNLOAD_INSTALL_DIR = $(HOST_DIR)/opt/ext-toolchain
 ifeq ($(BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD),y)
 TOOLCHAIN_EXTERNAL_INSTALL_DIR = $(TOOLCHAIN_EXTERNAL_DOWNLOAD_INSTALL_DIR)
 else
-TOOLCHAIN_EXTERNAL_INSTALL_DIR = $(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_PATH))
+TOOLCHAIN_EXTERNAL_INSTALL_DIR = $(abspath $(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_PATH)))
 endif
 
 ifeq ($(TOOLCHAIN_EXTERNAL_INSTALL_DIR),)
-- 
2.20.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Buildroot] [PATCH 1/1] toolchain/toolchain-external: Allow relative paths in BR2_TOOLCHAIN_EXTERNAL_PATH.
  2021-05-27 14:51 [Buildroot] [PATCH 1/1] toolchain/toolchain-external: Allow relative paths in BR2_TOOLCHAIN_EXTERNAL_PATH Juergen Stuber
@ 2022-01-08 18:25 ` Romain Naour
  2022-02-08 20:56 ` Arnout Vandecappelle
  1 sibling, 0 replies; 3+ messages in thread
From: Romain Naour @ 2022-01-08 18:25 UTC (permalink / raw)
  To: Juergen Stuber, buildroot
  Cc: Romain Naour, Thomas Petazzoni, Thomas De Schampheleire

Hello Juergen,

Le 27/05/2021 à 16:51, Juergen Stuber a écrit :
> Convert BR2_TOOLCHAIN_EXTERNAL_PATH to an absolute path when used.
> 
> Otherwise the symbolic links to the external toolchain binaries are
> not installed in host/bin when BR2_TOOLCHAIN_EXTERNAL_PATH is relative.
> This happens because TOOLCHAIN_EXTERNAL_INSTALL_WRAPPER
> changes directory into host/bin to create the symbolic links.
> From there the tools are no longer found via the relative path and
> a single symbolic link host/bin/$(prefix)-* is created instead.

Indeed, using a relative path for BR2_TOOLCHAIN_EXTERNAL_PATH doesn't work

$ ls -l test/ext-preinstalled-relative-toolchain/host/bin/*
lrwxrwxrwx. 1 romnao romnao    95  8 janv. 19:18
'test/ext-preinstalled-relative-toolchain/host/bin/arm-none-linux-gnueabihf-*'
->
'../toolchain/gcc-arm-9.2-2019.12-x86_64-arm-none-linux-gnueabihf/bin/arm-none-linux-gnueabihf-*'
-rwxr-xr-x. 1 romnao romnao 21288  8 janv. 19:17
test/ext-preinstalled-relative-toolchain/host/bin/toolchain-wrapper

With your patch applied the toolchain is imported correctly (busybox build).

Reviewed-by: Romain Naour <romain.naour@smile.fr>

Best regards,
Romain

> 
> Signed-off-by: Juergen Stuber <juergen@jstuber.net>
> ---
>  toolchain/toolchain-external/pkg-toolchain-external.mk | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/toolchain/toolchain-external/pkg-toolchain-external.mk b/toolchain/toolchain-external/pkg-toolchain-external.mk
> index 6d91cb5d1e..2b70007a34 100644
> --- a/toolchain/toolchain-external/pkg-toolchain-external.mk
> +++ b/toolchain/toolchain-external/pkg-toolchain-external.mk
> @@ -68,7 +68,7 @@ TOOLCHAIN_EXTERNAL_DOWNLOAD_INSTALL_DIR = $(HOST_DIR)/opt/ext-toolchain
>  ifeq ($(BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD),y)
>  TOOLCHAIN_EXTERNAL_INSTALL_DIR = $(TOOLCHAIN_EXTERNAL_DOWNLOAD_INSTALL_DIR)
>  else
> -TOOLCHAIN_EXTERNAL_INSTALL_DIR = $(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_PATH))
> +TOOLCHAIN_EXTERNAL_INSTALL_DIR = $(abspath $(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_PATH)))
>  endif
>  
>  ifeq ($(TOOLCHAIN_EXTERNAL_INSTALL_DIR),)
> 

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Buildroot] [PATCH 1/1] toolchain/toolchain-external: Allow relative paths in BR2_TOOLCHAIN_EXTERNAL_PATH.
  2021-05-27 14:51 [Buildroot] [PATCH 1/1] toolchain/toolchain-external: Allow relative paths in BR2_TOOLCHAIN_EXTERNAL_PATH Juergen Stuber
  2022-01-08 18:25 ` Romain Naour
@ 2022-02-08 20:56 ` Arnout Vandecappelle
  1 sibling, 0 replies; 3+ messages in thread
From: Arnout Vandecappelle @ 2022-02-08 20:56 UTC (permalink / raw)
  To: Juergen Stuber, buildroot
  Cc: Romain Naour, Thomas Petazzoni, Thomas De Schampheleire



On 27/05/2021 16:51, Juergen Stuber wrote:
> Convert BR2_TOOLCHAIN_EXTERNAL_PATH to an absolute path when used.
> 
> Otherwise the symbolic links to the external toolchain binaries are
> not installed in host/bin when BR2_TOOLCHAIN_EXTERNAL_PATH is relative.
> This happens because TOOLCHAIN_EXTERNAL_INSTALL_WRAPPER
> changes directory into host/bin to create the symbolic links.
>  From there the tools are no longer found via the relative path and
> a single symbolic link host/bin/$(prefix)-* is created instead.

  I've extended the commit message a bit to explain a use case where relative 
paths may be useful, and applied to master, thanks.

  Regards,
  Arnout

> 
> Signed-off-by: Juergen Stuber <juergen@jstuber.net>
> ---
>   toolchain/toolchain-external/pkg-toolchain-external.mk | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/toolchain/toolchain-external/pkg-toolchain-external.mk b/toolchain/toolchain-external/pkg-toolchain-external.mk
> index 6d91cb5d1e..2b70007a34 100644
> --- a/toolchain/toolchain-external/pkg-toolchain-external.mk
> +++ b/toolchain/toolchain-external/pkg-toolchain-external.mk
> @@ -68,7 +68,7 @@ TOOLCHAIN_EXTERNAL_DOWNLOAD_INSTALL_DIR = $(HOST_DIR)/opt/ext-toolchain
>   ifeq ($(BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD),y)
>   TOOLCHAIN_EXTERNAL_INSTALL_DIR = $(TOOLCHAIN_EXTERNAL_DOWNLOAD_INSTALL_DIR)
>   else
> -TOOLCHAIN_EXTERNAL_INSTALL_DIR = $(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_PATH))
> +TOOLCHAIN_EXTERNAL_INSTALL_DIR = $(abspath $(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_PATH)))
>   endif
>   
>   ifeq ($(TOOLCHAIN_EXTERNAL_INSTALL_DIR),)
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-02-08 20:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-27 14:51 [Buildroot] [PATCH 1/1] toolchain/toolchain-external: Allow relative paths in BR2_TOOLCHAIN_EXTERNAL_PATH Juergen Stuber
2022-01-08 18:25 ` Romain Naour
2022-02-08 20:56 ` Arnout Vandecappelle

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.