From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.4 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE,HTML_OBFUSCATE_10_20, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.2 Received: from mother.openwall.net (mother.openwall.net [195.42.179.200]) by inbox.vuxu.org (OpenSMTPD) with SMTP id d17ae341 for ; Sat, 18 Jan 2020 02:19:28 +0000 (UTC) Received: (qmail 32546 invoked by uid 550); 18 Jan 2020 02:19:27 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 22319 invoked from network); 17 Jan 2020 23:25:12 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=8Sx9acFNC6l49UVS1/pLy5I0N804AGEYuz4Nptnt+B4=; b=c4tNcOY11ECAqcT0X0RoL9ZBUpjBYSzuF7eXxDXNFLAtommiuHY5Q+bDwzRza90nVE IT97nFxuHFv/41VZmsU6fv6HRXGPJkkhKtjG/46ZkSGRfP6khz5b4xAolEXK0SKRNA2w Frf9D7tGZvQzqdHGBGAaVMBRGm4fd+nfboIjxWbTdLc33vd+OB3KdwpnHmyIy/yrIKTE vIzVDtrVJnu4PSUC816/EOR8a3OJDQh8ElB8ojIklRV9BhHsUIZwcM4xtivrf6UDrJBc 9clAiZAi75d6dZ+9czlTf4yZv3FV1RGlQM6uhEpGQbrm/YpyHm6t3Y6wVtfN2S8wnqfr kNVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=8Sx9acFNC6l49UVS1/pLy5I0N804AGEYuz4Nptnt+B4=; b=LTniqF+VZsP1AViFS136J76Jjho5ZaiNWZgG1mq6/Wsih09h7fG5OjgysfElIxSseB axKRa0CYyyQWtSy1eodTI5AQFYMALDWIe/zz1vCkv/8BagZYXB64JBc4yoVERr4J7cjv nP8UF8ZC1HiCmIYyLBHadNYOoz1bAYVj2iO40oO79EgibR3/lOjGeZm/2eMgDKG9TJ55 URK1ZLIjWuYs8SN90uaWx8kRIMVkj0+Hv11Ve6CVKeUm5yASwNnM7+in6+13KcWVncS3 o+fOiLj547A6MSKekdwKapI4xQw4gMHdiLKgCe8Knz2IurLniNVzNrAY2kb7bZXya7kv sLow== X-Gm-Message-State: APjAAAUvOtIypB4VaT/0tggvssHMTNBbTEaZy6NI+vN0f73Ig4CVdqoz F12Nzf6HcatT4sZA7xUIADDGbuUhjxiopmxaONRN7E2TmRo= X-Google-Smtp-Source: APXvYqwHQjSMCzHh8baP2yMuyBCuCSwbN9/DKONG18XAUlI+EONR4Sq4NmiBN+9ol/0CxeZcK5+bXsdBqWqLl7WW0sg= X-Received: by 2002:a2e:b52b:: with SMTP id z11mr7076849ljm.155.1579303500623; Fri, 17 Jan 2020 15:25:00 -0800 (PST) MIME-Version: 1.0 From: =?UTF-8?B?0JDQvdC00YDQtdC5INCQ0LvQsNC00YzQtdCy?= Date: Sat, 18 Jan 2020 02:24:49 +0300 Message-ID: To: musl@lists.openwall.com Content-Type: multipart/mixed; boundary="00000000000025d1b6059c5e402d" Subject: [musl] Absolute symlink breaks cross compilation --00000000000025d1b6059c5e402d Content-Type: multipart/alternative; boundary="00000000000025d1b4059c5e402b" --00000000000025d1b4059c5e402b Content-Type: text/plain; charset="UTF-8" Hello. Gentoo users find that it is not possible to cross compile musl. See here https://bugs.gentoo.org/645626 more details. I am sending to you proposed patch that is related to upstream. Please keep all installed symlinks relative. Thank you. --00000000000025d1b4059c5e402b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello. Gentoo users find that it is not possible to cross = compile musl. See here=C2=A0http= s://bugs.gentoo.org/645626=C2=A0more details.

I am s= ending to you proposed patch that is related to upstream. Please keep all i= nstalled symlinks relative. Thank you.
--00000000000025d1b4059c5e402b-- --00000000000025d1b6059c5e402d Content-Type: text/x-patch; charset="US-ASCII"; name="relative_libc_symlink.musl.patch" Content-Disposition: attachment; filename="relative_libc_symlink.musl.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_k5ishmij0 ZGlmZiAtLWdpdCBhL01ha2VmaWxlIGIvTWFrZWZpbGUKaW5kZXggYmQ4ZjVjMzguLjgxYmYzM2Q1 IDEwMDY0NAotLS0gYS9NYWtlZmlsZQorKysgYi9NYWtlZmlsZQpAQCAtMjA5LDcgKzIwOSw3IEBA ICQoREVTVERJUikkKGluY2x1ZGVkaXIpLyU6ICQoc3JjZGlyKS9pbmNsdWRlLyUKIAkkKElOU1RB TEwpIC1EIC1tIDY0NCAkPCAkQAogCiAkKERFU1RESVIpJChMRFNPX1BBVEhOQU1FKTogJChERVNU RElSKSQobGliZGlyKS9saWJjLnNvCi0JJChJTlNUQUxMKSAtRCAtbCAkKGxpYmRpcikvbGliYy5z byAkQCB8fCB0cnVlCisJJChJTlNUQUxMKSAtRCAtbCAkJChyZWFscGF0aCAtLW5vLXN5bWxpbmtz IC0tcmVsYXRpdmUtdG89JCQoZGlybmFtZSAkQCkgJChERVNURElSKSQobGliZGlyKS9saWJjLnNv KSAkQCB8fCB0cnVlCiAKIGluc3RhbGwtbGliczogJChBTExfTElCUzpsaWIvJT0kKERFU1RESVIp JChsaWJkaXIpLyUpICQoaWYgJChTSEFSRURfTElCUyksJChERVNURElSKSQoTERTT19QQVRITkFN RSksKQogCg== --00000000000025d1b6059c5e402d-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.2 Received: from mother.openwall.net (mother.openwall.net [195.42.179.200]) by inbox.vuxu.org (OpenSMTPD) with SMTP id 491cd196 for ; Sat, 18 Jan 2020 04:29:47 +0000 (UTC) Received: (qmail 1813 invoked by uid 550); 18 Jan 2020 04:29:46 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 1792 invoked from network); 18 Jan 2020 04:29:45 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :content-transfer-encoding; bh=zei1cliGLNbqvoEtCbqe7UNo1sFvx13hTkP6DxFtiWU=; b=ZVuFqSYXL0ifD3fKkKxWgBBx71uH6/Op8ci9aI36jIFcXiSBPKPxRyY8UFkZAnijys +8GDkDUjbKQqph9hL1RAoP7dUTIW+ewQEBtNe1qQjpp8PLUq/t/whMe/FvQdFTK0HIke cR0jRY6RJWHAv74fFDpVJ/ywFkJUtTcH4FebHW3rGW3qA5Vj4F/zHRL5AC14SGdTd2x0 YkNUjJejo3jB+1s3knuFF0fVyXF4SutNenJTDDrBFwXmtQ7GY2uJj4mmiZislvcYGCKr kGk16ONgZWuugJ0RSKRwl/NNcvemQo7sEFqZkixEeuQY1WpgqDwTOGJRyp4kgCjm5cN1 FQfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:content-transfer-encoding; bh=zei1cliGLNbqvoEtCbqe7UNo1sFvx13hTkP6DxFtiWU=; b=AuZnHXp6mICzhW6XQ+mrW/Go+4P/rOq52rppBaWAxFbNZotTJIP+P8tavUZf03UE4c XhZahcWlh+QRhUBtdmTSg+IeL9SR10Qps51hhjLrgTSilJXvgHiOzpNoSKsm1h2PsDE5 nZYaVTsClAldIomUQ0oKsykuee+aJRphxB3F5RmfJyZXg90bk1sTxh5wVVmVAqB+r0MZ aA7S8bED+0qA6z+N5TKU40LZdWZy5c54j0aSLHd1JmGBCIepuP2AoB4em0UD1oIbclBw ppPDMlaa9HplyNY2+X7S9/DqCqiHY5zbPM5DGwq4Qi2mEcNQm4K1fDvbfSYm9PXmUfQl Ei9w== X-Gm-Message-State: APjAAAVVAHwHtlAYJROLNqq+RhvPvVhhxigljsPPaWxv4fjupWzAuInq ixMSVr4awa0oIPsBPPoBqfK6k4B2cMu0+D4roItszY/TZ8k= X-Google-Smtp-Source: APXvYqzCrkuSGdFzpC3Ct7TYDEyLaaF1bjTghP1ovAUhR577DNT+ZRE6LSkWbFINAwvz2GrGNE2ggK8UFlPb6TGvqek= X-Received: by 2002:ad4:478b:: with SMTP id z11mr11105206qvy.185.1579321773168; Fri, 17 Jan 2020 20:29:33 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Khem Raj Date: Fri, 17 Jan 2020 20:29:07 -0800 Message-ID: To: musl@lists.openwall.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [musl] Absolute symlink breaks cross compilation On Fri, Jan 17, 2020 at 6:19 PM =D0=90=D0=BD=D0=B4=D1=80=D0=B5=D0=B9 =D0=90= =D0=BB=D0=B0=D0=B4=D1=8C=D0=B5=D0=B2 wrote: > > Hello. Gentoo users find that it is not possible to cross compile musl. S= ee here https://bugs.gentoo.org/645626 more details. > > I am sending to you proposed patch that is related to upstream. Please ke= ep all installed symlinks relative. Thank you. In yocto we are carrying slightly different patch to achieve same https://github.com/kraj/musl/commit/102f35b194a3405b30001ff08cfd54752179376= f From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.2 Received: from mother.openwall.net (mother.openwall.net [195.42.179.200]) by inbox.vuxu.org (OpenSMTPD) with SMTP id 90478088 for ; Sat, 18 Jan 2020 05:15:02 +0000 (UTC) Received: (qmail 24455 invoked by uid 550); 18 Jan 2020 05:15:01 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 24432 invoked from network); 18 Jan 2020 05:15:00 -0000 Date: Sat, 18 Jan 2020 00:14:47 -0500 From: Rich Felker To: musl@lists.openwall.com Message-ID: <20200118051447.GV30412@brightrain.aerifal.cx> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: Rich Felker Subject: Re: [musl] Absolute symlink breaks cross compilation On Sat, Jan 18, 2020 at 02:24:49AM +0300, Андрей Аладьев wrote: > Hello. Gentoo users find that it is not possible to cross compile musl. See > here https://bugs.gentoo.org/645626 more details. > > I am sending to you proposed patch that is related to upstream. Please keep > all installed symlinks relative. Thank you. > diff --git a/Makefile b/Makefile > index bd8f5c38..81bf33d5 100644 > --- a/Makefile > +++ b/Makefile > @@ -209,7 +209,7 @@ $(DESTDIR)$(includedir)/%: $(srcdir)/include/% > $(INSTALL) -D -m 644 $< $@ > > $(DESTDIR)$(LDSO_PATHNAME): $(DESTDIR)$(libdir)/libc.so > - $(INSTALL) -D -l $(libdir)/libc.so $@ || true > + $(INSTALL) -D -l $$(realpath --no-symlinks --relative-to=$$(dirname $@) $(DESTDIR)$(libdir)/libc.so) $@ || true > > install-libs: $(ALL_LIBS:lib/%=$(DESTDIR)$(libdir)/%) $(if $(SHARED_LIBS),$(DESTDIR)$(LDSO_PATHNAME),) > I don't understand what you mean by it "breaks cross compilation". The ldso link produced is not used for compiling anything; it's only used for executing programs, which you don't do when cross compiling musl or cross compiling applications against it. The link is setup to be installed on the $host, not to be used on the $build where it's not needed. Could you could explain what specifically you're trying to do that's not working as desired? Rich From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.2 Received: from mother.openwall.net (mother.openwall.net [195.42.179.200]) by inbox.vuxu.org (OpenSMTPD) with SMTP id f4afaa5f for ; Sat, 18 Jan 2020 19:28:24 +0000 (UTC) Received: (qmail 15405 invoked by uid 550); 18 Jan 2020 19:28:22 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 15384 invoked from network); 18 Jan 2020 19:28:22 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :content-transfer-encoding; bh=34AEANmA6YC9Zl8sHpvOkYUdXINngX0hkSO4vqe57iY=; b=trhcPusrJXaoPWrj4ufpgmwy95l7aOhwcqw0XZ7RTkXwtalKOB0GBziHy1MkmHMGg+ BtFsclMLSXlT7CUUcEosuGJ/hk0v5XJ9CdEU387O2GsVXp39K8Jx6xlZmzBMjlbI/Yqn nZOPPqcPWlZV92Kq2VsTuNWR0Y88Gb429/ZTB4f6XGGxkE3xZnbX8eITGLgjW/3x+Nya KVsnOGoQvxuPfgzYr1B0DAvdqCAT9ltF2tOSiPw+IGOAteM8myiExkloGOAUmRwynHFp NgsLNNKtttavX3LjPl2uFd8MlAfsXR7NLAIZLGhRQweUdJVovLuuVVgQgGTA77xiJ7G/ qGYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:content-transfer-encoding; bh=34AEANmA6YC9Zl8sHpvOkYUdXINngX0hkSO4vqe57iY=; b=P8RQql9vXARg6UUwnUv/REX9RoXTuEViHb8Jj/HL8Oq3koAl2bnet1qiU8tCPWh3K7 4qgL3IxLmtzgh3mZ6s2xjSqsAjCEKvH7sk+O0EoXvuRcYyGE6cneX4mAipq3m9dtgeON 8hczwkog6WjD2b+Cxtoxs3XqL4Icd/HY1J9fAgtLsYhRdzWOWQoRMTjMsVhBZDDldE2f Ejx1CyYd/uyOQytUfowWuoJg6lPDiJFpK4Kt60WLxzY/gr42iSm8co0M4PXJy+Y8UTfT 2ZwgZ1TtJFjF3sZ+wVaaQh8kgWdHpOX3pI7eCegVFHRll8oqgcdDhRDHBnaDnnTOveLh 7k8Q== X-Gm-Message-State: APjAAAXkCIysz7Q1HuQ8MFzFFpF1RDoBOrEvvratjDJs6yumryaBN2Jz TY8qXCisaLBMewXgYBdTWOvQSg3kkPqESL9MYztHDUjOS5A= X-Google-Smtp-Source: APXvYqzGnvaKOturu5D3l2wVJO7hG5JjXKxkxiKiUDbFknlrYUMXBnWDJrUDj07Vm+z5KaLGtPb8CUdeZ8kDotZpnJA= X-Received: by 2002:a0c:fa4b:: with SMTP id k11mr13335767qvo.55.1579375689690; Sat, 18 Jan 2020 11:28:09 -0800 (PST) MIME-Version: 1.0 References: <20200118051447.GV30412@brightrain.aerifal.cx> In-Reply-To: <20200118051447.GV30412@brightrain.aerifal.cx> From: Khem Raj Date: Sat, 18 Jan 2020 11:27:43 -0800 Message-ID: To: musl@lists.openwall.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [musl] Absolute symlink breaks cross compilation On Fri, Jan 17, 2020 at 9:15 PM Rich Felker wrote: > > On Sat, Jan 18, 2020 at 02:24:49AM +0300, =D0=90=D0=BD=D0=B4=D1=80=D0=B5= =D0=B9 =D0=90=D0=BB=D0=B0=D0=B4=D1=8C=D0=B5=D0=B2 wrote: > > Hello. Gentoo users find that it is not possible to cross compile musl.= See > > here https://bugs.gentoo.org/645626 more details. > > > > I am sending to you proposed patch that is related to upstream. Please = keep > > all installed symlinks relative. Thank you. > > > diff --git a/Makefile b/Makefile > > index bd8f5c38..81bf33d5 100644 > > --- a/Makefile > > +++ b/Makefile > > @@ -209,7 +209,7 @@ $(DESTDIR)$(includedir)/%: $(srcdir)/include/% > > $(INSTALL) -D -m 644 $< $@ > > > > $(DESTDIR)$(LDSO_PATHNAME): $(DESTDIR)$(libdir)/libc.so > > - $(INSTALL) -D -l $(libdir)/libc.so $@ || true > > + $(INSTALL) -D -l $$(realpath --no-symlinks --relative-to=3D$$(dir= name $@) $(DESTDIR)$(libdir)/libc.so) $@ || true > > > > install-libs: $(ALL_LIBS:lib/%=3D$(DESTDIR)$(libdir)/%) $(if $(SHARED_= LIBS),$(DESTDIR)$(LDSO_PATHNAME),) > > > > I don't understand what you mean by it "breaks cross compilation". The > ldso link produced is not used for compiling anything; it's only used > for executing programs, which you don't do when cross compiling musl > or cross compiling applications against it. The link is setup to be > installed on the $host, not to be used on the $build where it's not > needed. > > Could you could explain what specifically you're trying to do that's > not working as desired? > If you look at commit msg for https://github.com/kraj/musl/commit/102f35b194a3405b30001ff08cfd5475217= 9376f then you will see the usecase we have in for Yocto/OE > Rich From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.2 Received: from mother.openwall.net (mother.openwall.net [195.42.179.200]) by inbox.vuxu.org (OpenSMTPD) with SMTP id 87b7dc53 for ; Sat, 18 Jan 2020 21:55:10 +0000 (UTC) Received: (qmail 28489 invoked by uid 550); 18 Jan 2020 21:55:09 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 28470 invoked from network); 18 Jan 2020 21:55:08 -0000 Date: Sat, 18 Jan 2020 16:54:55 -0500 From: Rich Felker To: musl@lists.openwall.com Message-ID: <20200118215455.GZ30412@brightrain.aerifal.cx> References: <20200118051447.GV30412@brightrain.aerifal.cx> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: Rich Felker Subject: Re: [musl] Absolute symlink breaks cross compilation On Sat, Jan 18, 2020 at 11:27:43AM -0800, Khem Raj wrote: > On Fri, Jan 17, 2020 at 9:15 PM Rich Felker wrote: > > > > On Sat, Jan 18, 2020 at 02:24:49AM +0300, Андрей Аладьев wrote: > > > Hello. Gentoo users find that it is not possible to cross compile musl. See > > > here https://bugs.gentoo.org/645626 more details. > > > > > > I am sending to you proposed patch that is related to upstream. Please keep > > > all installed symlinks relative. Thank you. > > > > > diff --git a/Makefile b/Makefile > > > index bd8f5c38..81bf33d5 100644 > > > --- a/Makefile > > > +++ b/Makefile > > > @@ -209,7 +209,7 @@ $(DESTDIR)$(includedir)/%: $(srcdir)/include/% > > > $(INSTALL) -D -m 644 $< $@ > > > > > > $(DESTDIR)$(LDSO_PATHNAME): $(DESTDIR)$(libdir)/libc.so > > > - $(INSTALL) -D -l $(libdir)/libc.so $@ || true > > > + $(INSTALL) -D -l $$(realpath --no-symlinks --relative-to=$$(dirname $@) $(DESTDIR)$(libdir)/libc.so) $@ || true > > > > > > install-libs: $(ALL_LIBS:lib/%=$(DESTDIR)$(libdir)/%) $(if $(SHARED_LIBS),$(DESTDIR)$(LDSO_PATHNAME),) > > > > > > > I don't understand what you mean by it "breaks cross compilation". The > > ldso link produced is not used for compiling anything; it's only used > > for executing programs, which you don't do when cross compiling musl > > or cross compiling applications against it. The link is setup to be > > installed on the $host, not to be used on the $build where it's not > > needed. > > > > Could you could explain what specifically you're trying to do that's > > not working as desired? > > > > If you look at commit msg > for https://github.com/kraj/musl/commit/102f35b194a3405b30001ff08cfd54752179376f > > then you will see the usecase we have in for Yocto/OE OK. So it's specifically execution of target binaries via qemu-user that's broken. The above patch isn't suitable because it introduces a dependency on a nonstandard utility, GNU realpath, and thereby breaks cross compiling of musl from non-GNU-like systems. It also might introduce dependencies of the staged-area symlink structure into the link contents. I'd probably be happy with a solution that involves a make or shell expression to convert $(syslibdir) into a suitable number of repetitions of ../ to prepend to $(libdir)/libc.so, but I'm mildly concerned about whether there may be setups with symlinks where this breaks. There's also always been a school of thought that the direction of the symlink should be reversed, so that libc.so is the symlink and ldso is the actual file, but I believe I tried to do this at least once and ran into reasons it was problematic. I'd have to go dig up old conversations to try to remember why... Rich