From: Rich Felker <dalias@libc.org>
To: musl@lists.openwall.com
Subject: Re: [musl] Absolute symlink breaks cross compilation
Date: Sat, 18 Jan 2020 00:14:47 -0500 [thread overview]
Message-ID: <20200118051447.GV30412@brightrain.aerifal.cx> (raw)
In-Reply-To: <CAMw0szLp2XHhf5Enfb5AVv3qrs_HRnsJL72Kt-7zii6EdEJ15A@mail.gmail.com>
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
next prev parent reply other threads:[~2020-01-18 5:15 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-17 23:24 Андрей Аладьев
2020-01-18 4:29 ` Khem Raj
2020-01-18 5:14 ` Rich Felker [this message]
2020-01-18 19:27 ` Khem Raj
2020-01-18 21:54 ` Rich Felker
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200118051447.GV30412@brightrain.aerifal.cx \
--to=dalias@libc.org \
--cc=musl@lists.openwall.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).