From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ilya Kuzmich Date: Thu, 25 May 2017 15:09:19 +0300 Subject: [Buildroot] [PATCH 1/1] toolchain-external: dynamic loader symlink to actual location of musl libc.so In-Reply-To: <1495112596-26182-1-git-send-email-ilya.kuzmich@gmail.com> References: <1495112596-26182-1-git-send-email-ilya.kuzmich@gmail.com> Message-ID: <20170525120919.GD14358@uxa> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: buildroot@busybox.net ping? On 18/05, Ilya Kuzmich wrote: > Test whenever musl libc.so located at /lib or /usr/lib and create dynamic > library loader symlink accordingly. > > Signed-off-by: Ilya Kuzmich > --- > toolchain/toolchain-external/pkg-toolchain-external.mk | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > > diff --git a/toolchain/toolchain-external/pkg-toolchain-external.mk b/toolchain/toolchain-external/pkg-toolchain-external.mk > index 9670350..438d714 100644 > --- a/toolchain/toolchain-external/pkg-toolchain-external.mk > +++ b/toolchain/toolchain-external/pkg-toolchain-external.mk > @@ -489,7 +489,12 @@ else > MUSL_ARCH = $(ARCH) > endif > define TOOLCHAIN_EXTERNAL_MUSL_LD_LINK > - ln -sf libc.so $(TARGET_DIR)/lib/ld-musl-$(MUSL_ARCH).so.1 > + if test -e $(STAGING_DIR)/usr/lib/libc.so; then \ > + LD_LINK_TARGET=../usr/lib/libc.so ;\ > + else \ > + LD_LINK_TARGET=libc.so ;\ > + fi ;\ > + ln -sf "$${LD_LINK_TARGET}" $(TARGET_DIR)/lib/ld-musl-$(MUSL_ARCH).so.1 ; > endef > endif > > -- > 2.7.4 >