All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/2] toolchain-external: skip ld-musl symlink on static build
@ 2017-06-27 17:57 Baruch Siach
  2017-06-27 17:57 ` [Buildroot] [PATCH 2/2] toolchain-external: remove redundant condition Baruch Siach
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Baruch Siach @ 2017-06-27 17:57 UTC (permalink / raw)
  To: buildroot

Static build with external musl toolchain leaves a dangling symlink to
libc.so. Don't create that symlink on static build.

Cc: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
---
 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 826934505e20..8460e37d095f 100644
--- a/toolchain/toolchain-external/pkg-toolchain-external.mk
+++ b/toolchain/toolchain-external/pkg-toolchain-external.mk
@@ -475,7 +475,7 @@ endef
 # With the musl C library, the libc.so library directly plays the role
 # of the dynamic library loader. We just need to create a symbolic
 # link to libc.so with the appropriate name.
-ifeq ($(BR2_TOOLCHAIN_EXTERNAL_MUSL),y)
+ifeq ($(BR2_TOOLCHAIN_EXTERNAL_MUSL):$(BR2_STATIC_LIBS),y:)
 ifeq ($(BR2_i386),y)
 MUSL_ARCH = i386
 else ifeq ($(BR2_ARM_EABIHF),y)
-- 
2.11.0

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

* [Buildroot] [PATCH 2/2] toolchain-external: remove redundant condition
  2017-06-27 17:57 [Buildroot] [PATCH 1/2] toolchain-external: skip ld-musl symlink on static build Baruch Siach
@ 2017-06-27 17:57 ` Baruch Siach
  2017-06-27 21:56   ` Arnout Vandecappelle
  2017-06-27 21:41 ` [Buildroot] [PATCH 1/2] toolchain-external: skip ld-musl symlink on static build Arnout Vandecappelle
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 7+ messages in thread
From: Baruch Siach @ 2017-06-27 17:57 UTC (permalink / raw)
  To: buildroot

TOOLCHAIN_EXTERNAL_MUSL_LD_LINK is empty when BR2_TOOLCHAIN_EXTERNAL_MUSL is
not set. No need to add another condition.

Cc: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
---
 toolchain/toolchain-external/pkg-toolchain-external.mk | 2 --
 1 file changed, 2 deletions(-)

diff --git a/toolchain/toolchain-external/pkg-toolchain-external.mk b/toolchain/toolchain-external/pkg-toolchain-external.mk
index 8460e37d095f..2c87a367e67b 100644
--- a/toolchain/toolchain-external/pkg-toolchain-external.mk
+++ b/toolchain/toolchain-external/pkg-toolchain-external.mk
@@ -587,9 +587,7 @@ define $(2)_INSTALL_STAGING_CMDS
 	$$(TOOLCHAIN_EXTERNAL_INSTALL_GDBINIT)
 endef
 
-ifeq ($$(BR2_TOOLCHAIN_EXTERNAL_MUSL),y)
 $(2)_POST_INSTALL_STAGING_HOOKS += TOOLCHAIN_EXTERNAL_MUSL_LD_LINK
-endif
 
 # Even though we're installing things in both the staging, the host
 # and the target directory, we do everything within the
-- 
2.11.0

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

* [Buildroot] [PATCH 1/2] toolchain-external: skip ld-musl symlink on static build
  2017-06-27 17:57 [Buildroot] [PATCH 1/2] toolchain-external: skip ld-musl symlink on static build Baruch Siach
  2017-06-27 17:57 ` [Buildroot] [PATCH 2/2] toolchain-external: remove redundant condition Baruch Siach
@ 2017-06-27 21:41 ` Arnout Vandecappelle
  2017-07-01 22:40   ` Thomas Petazzoni
  2017-07-01 22:40 ` Thomas Petazzoni
  2017-07-02 15:57 ` Peter Korsgaard
  3 siblings, 1 reply; 7+ messages in thread
From: Arnout Vandecappelle @ 2017-06-27 21:41 UTC (permalink / raw)
  To: buildroot

 Hi Baruch,

On 27-06-17 19:57, Baruch Siach wrote:
> Static build with external musl toolchain leaves a dangling symlink to
> libc.so. Don't create that symlink on static build.
> 
> Cc: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> Signed-off-by: Baruch Siach <baruch@tkos.co.il>
> ---
>  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 826934505e20..8460e37d095f 100644
> --- a/toolchain/toolchain-external/pkg-toolchain-external.mk
> +++ b/toolchain/toolchain-external/pkg-toolchain-external.mk
> @@ -475,7 +475,7 @@ endef
>  # With the musl C library, the libc.so library directly plays the role
>  # of the dynamic library loader. We just need to create a symbolic
>  # link to libc.so with the appropriate name.
> -ifeq ($(BR2_TOOLCHAIN_EXTERNAL_MUSL),y)
> +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_MUSL):$(BR2_STATIC_LIBS),y:)

 This patch conflicts with [1]. Could you combine them in a single series?
Otherwise looks good to me, but it really should be viewed combined with [1].

 Regards,
 Arnout

>  ifeq ($(BR2_i386),y)
>  MUSL_ARCH = i386
>  else ifeq ($(BR2_ARM_EABIHF),y)
> 

[1] http://patchwork.ozlabs.org/patch/780411/

-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF

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

* [Buildroot] [PATCH 2/2] toolchain-external: remove redundant condition
  2017-06-27 17:57 ` [Buildroot] [PATCH 2/2] toolchain-external: remove redundant condition Baruch Siach
@ 2017-06-27 21:56   ` Arnout Vandecappelle
  0 siblings, 0 replies; 7+ messages in thread
From: Arnout Vandecappelle @ 2017-06-27 21:56 UTC (permalink / raw)
  To: buildroot



On 27-06-17 19:57, Baruch Siach wrote:
> TOOLCHAIN_EXTERNAL_MUSL_LD_LINK is empty when BR2_TOOLCHAIN_EXTERNAL_MUSL is
> not set. No need to add another condition.
> 
> Cc: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> Signed-off-by: Baruch Siach <baruch@tkos.co.il>
> ---
>  toolchain/toolchain-external/pkg-toolchain-external.mk | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/toolchain/toolchain-external/pkg-toolchain-external.mk b/toolchain/toolchain-external/pkg-toolchain-external.mk
> index 8460e37d095f..2c87a367e67b 100644
> --- a/toolchain/toolchain-external/pkg-toolchain-external.mk
> +++ b/toolchain/toolchain-external/pkg-toolchain-external.mk
> @@ -587,9 +587,7 @@ define $(2)_INSTALL_STAGING_CMDS
>  	$$(TOOLCHAIN_EXTERNAL_INSTALL_GDBINIT)
>  endef
>  
> -ifeq ($$(BR2_TOOLCHAIN_EXTERNAL_MUSL),y)
>  $(2)_POST_INSTALL_STAGING_HOOKS += TOOLCHAIN_EXTERNAL_MUSL_LD_LINK
> -endif

 Actually, we (almost) always put both the definition of the hook and the
assignment to the _HOOKS variable under the relevant condition. So instead of
this, I'd just move the assignment to the definition of the hook and keep it
under the same condition. But of course, that's not possible, because the
assignment is in the inner-toolchain-external-package macro and we don't want to
define the hook inside that macro. Therefore, I would make the definition of
TOOLCHAIN_EXTERNAL_MUSL_LD_LINK unconditional, and add the conditions only here.

 Regards,
 Arnout

>  
>  # Even though we're installing things in both the staging, the host
>  # and the target directory, we do everything within the
> 

-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF

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

* [Buildroot] [PATCH 1/2] toolchain-external: skip ld-musl symlink on static build
  2017-06-27 17:57 [Buildroot] [PATCH 1/2] toolchain-external: skip ld-musl symlink on static build Baruch Siach
  2017-06-27 17:57 ` [Buildroot] [PATCH 2/2] toolchain-external: remove redundant condition Baruch Siach
  2017-06-27 21:41 ` [Buildroot] [PATCH 1/2] toolchain-external: skip ld-musl symlink on static build Arnout Vandecappelle
@ 2017-07-01 22:40 ` Thomas Petazzoni
  2017-07-02 15:57 ` Peter Korsgaard
  3 siblings, 0 replies; 7+ messages in thread
From: Thomas Petazzoni @ 2017-07-01 22:40 UTC (permalink / raw)
  To: buildroot

Hello,

On Tue, 27 Jun 2017 20:57:15 +0300, Baruch Siach wrote:
> Static build with external musl toolchain leaves a dangling symlink to
> libc.so. Don't create that symlink on static build.
> 
> Cc: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> Signed-off-by: Baruch Siach <baruch@tkos.co.il>
> ---
>  toolchain/toolchain-external/pkg-toolchain-external.mk | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied to master, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

* [Buildroot] [PATCH 1/2] toolchain-external: skip ld-musl symlink on static build
  2017-06-27 21:41 ` [Buildroot] [PATCH 1/2] toolchain-external: skip ld-musl symlink on static build Arnout Vandecappelle
@ 2017-07-01 22:40   ` Thomas Petazzoni
  0 siblings, 0 replies; 7+ messages in thread
From: Thomas Petazzoni @ 2017-07-01 22:40 UTC (permalink / raw)
  To: buildroot

Hello,

On Tue, 27 Jun 2017 23:41:44 +0200, Arnout Vandecappelle wrote:

> > diff --git a/toolchain/toolchain-external/pkg-toolchain-external.mk b/toolchain/toolchain-external/pkg-toolchain-external.mk
> > index 826934505e20..8460e37d095f 100644
> > --- a/toolchain/toolchain-external/pkg-toolchain-external.mk
> > +++ b/toolchain/toolchain-external/pkg-toolchain-external.mk
> > @@ -475,7 +475,7 @@ endef
> >  # With the musl C library, the libc.so library directly plays the role
> >  # of the dynamic library loader. We just need to create a symbolic
> >  # link to libc.so with the appropriate name.
> > -ifeq ($(BR2_TOOLCHAIN_EXTERNAL_MUSL),y)
> > +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_MUSL):$(BR2_STATIC_LIBS),y:)  
> 
>  This patch conflicts with [1]. Could you combine them in a single series?
> Otherwise looks good to me, but it really should be viewed combined with [1].

I've applied Baruch patch, and I'll rebased mine on top.

Thanks,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

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

* [Buildroot] [PATCH 1/2] toolchain-external: skip ld-musl symlink on static build
  2017-06-27 17:57 [Buildroot] [PATCH 1/2] toolchain-external: skip ld-musl symlink on static build Baruch Siach
                   ` (2 preceding siblings ...)
  2017-07-01 22:40 ` Thomas Petazzoni
@ 2017-07-02 15:57 ` Peter Korsgaard
  3 siblings, 0 replies; 7+ messages in thread
From: Peter Korsgaard @ 2017-07-02 15:57 UTC (permalink / raw)
  To: buildroot

>>>>> "Baruch" == Baruch Siach <baruch@tkos.co.il> writes:

 > Static build with external musl toolchain leaves a dangling symlink to
 > libc.so. Don't create that symlink on static build.

 > Cc: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
 > Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
 > Signed-off-by: Baruch Siach <baruch@tkos.co.il>

Committed to 2017.02.x and 2017.05.x, thanks.

-- 
Bye, Peter Korsgaard

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

end of thread, other threads:[~2017-07-02 15:57 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-27 17:57 [Buildroot] [PATCH 1/2] toolchain-external: skip ld-musl symlink on static build Baruch Siach
2017-06-27 17:57 ` [Buildroot] [PATCH 2/2] toolchain-external: remove redundant condition Baruch Siach
2017-06-27 21:56   ` Arnout Vandecappelle
2017-06-27 21:41 ` [Buildroot] [PATCH 1/2] toolchain-external: skip ld-musl symlink on static build Arnout Vandecappelle
2017-07-01 22:40   ` Thomas Petazzoni
2017-07-01 22:40 ` Thomas Petazzoni
2017-07-02 15:57 ` Peter Korsgaard

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.