toolchain-external: skip ld-musl symlink on static build
PATCH 1/2 toolchain-external: skip ld-musl symlink on static build
Static build with external musl toolchain leaves a dangling symlink to libc.so. Don't create that symlink on static build.
--- toolchain/toolchain-external/pkg-toolchain-external.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
toolchain/toolchain-external/pkg-toolchain-external.mk +1 -1
@@ -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)
Signature · 1 line
2.11.0
PATCH 2/2 toolchain-external: remove redundant condition
TOOLCHAIN_EXTERNAL_MUSL_LD_LINK is empty when BR2_TOOLCHAIN_EXTERNAL_MUSL is not set. No need to add another condition.
--- toolchain/toolchain-external/pkg-toolchain-external.mk | 2 -- 1 file changed, 2 deletions(-)
toolchain/toolchain-external/pkg-toolchain-external.mk +0 -2
@@ -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
Signature · 1 line
2.11.0
PATCH 2/2 toolchain-external: remove redundant condition
Quoted 15 lines · Baruch Siach
TOOLCHAIN_EXTERNAL_MUSL_LD_LINKis empty whenBR2_TOOLCHAIN_EXTERNAL_MUSLis not set. No need to add another condition.Cc Thomas De Schampheleire <[email protected]>Cc Thomas Petazzoni <[email protected]>Signed-off-by Baruch Siach <[email protected]>--- toolchain/toolchain-external/pkg-toolchain-external.mk | 2 -- 1 file changed, 2 deletions(-)toolchain/toolchain-external/pkg-toolchain-external.mk +0
-0
toolchain/toolchain-external/pkg-toolchain-external.mk define $(2)_INSTALL_STAGING_CMDS · line 592
Quoted 6 lines
toolchain/toolchain-external/pkg-toolchain-external.mk +0
-2@@ -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
Quoted 4 lines
toolchain/toolchain-external/pkg-toolchain-external.mk +0
-0# Even though we're installing things in both the staging, the host # and the target directory, we do everything within the
Signature · 6 lines
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
PATCH 1/2 toolchain-external: skip ld-musl symlink on static build
In reply to Baruch SiachHi Baruch,
Quoted 15 lines · Baruch Siach
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 <[email protected]>Cc Thomas Petazzoni <[email protected]>Signed-off-by Baruch Siach <[email protected]>--- toolchain/toolchain-external/pkg-toolchain-external.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)toolchain/toolchain-external/pkg-toolchain-external.mk +0
-0
toolchain/toolchain-external/pkg-toolchain-external.mk endef · line 478
Quoted 5 lines
toolchain/toolchain-external/pkg-toolchain-external.mk +1
-1@@ -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
toolchain/toolchain-external/pkg-toolchain-external.mk endef · line 481
Quoted 4 lines
toolchain/toolchain-external/pkg-toolchain-external.mk +0
-0ifeq ($(BR2_i386),y) MUSL_ARCH = i386 else ifeq ($(BR2_ARM_EABIHF),y)
[1] http://patchwork.ozlabs.org/patch/780411/
Signature · 6 lines
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
PATCH 1/2 toolchain-external: skip ld-musl symlink on static build
Hello,
Quoted 5 lines · Arnout Vandecappelle
Quoted 5 lines
toolchain/toolchain-external/pkg-toolchain-external.mk +0
-0@@ -475,7 +475,7 @@ endef
Quoted 8 lines
toolchain/toolchain-external/pkg-toolchain-external.mk endef · line 478
Quoted 5 lines
toolchain/toolchain-external/pkg-toolchain-external.mk +1
-1# 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
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com
Thomas Petazzoni
AppliedPATCH 1/2 toolchain-external: skip ld-musl symlink on static build
In reply to Baruch SiachHello,
Quoted 9 lines · Baruch Siach
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 <[email protected]>Cc Thomas Petazzoni <[email protected]>Signed-off-by Baruch Siach <[email protected]>--- toolchain/toolchain-external/pkg-toolchain-external.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Applied to master, thanks.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 1/2 toolchain-external: skip ld-musl symlink on static build
In reply to Baruch SiachQuoted 8 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Baruch" == Baruch Siach <[email protected]> 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 <[email protected]>Cc Thomas Petazzoni <[email protected]>Signed-off-by Baruch Siach <[email protected]>
Committed to 2017.02.x and 2017.05.x, thanks.
Signature · 1 line
Bye, Peter Korsgaard