From: John Found <johnfound@asm32.info>
To: musl@lists.openwall.com
Subject: Re: How to use MUSL without installing it?
Date: Tue, 4 Sep 2018 14:34:39 +0300 [thread overview]
Message-ID: <20180904143439.121b6867f3e7fb99d4f1b527@asm32.info> (raw)
In-Reply-To: <20180904094020.GM4418@port70.net>
On Tue, 4 Sep 2018 11:40:20 +0200
Szabolcs Nagy <nsz@port70.net> wrote:
> * John Found <johnfound@asm32.info> [2018-09-03 23:24:41 +0300]:
> > I am writing a script that to compile musl, then a program with musl, using the latest versions.
> >
> > I am doing it following way:
> >
> > mkdir muslsrc
> > tar --wildcards --strip-components 1 -C ./muslsrc/ -xzf ./musl*.tar.gz
> > cd muslsrc
> > ln -s /usr/bin/ar ./i386-ar
> > ln -s /usr/bin/ranlib ./i386-ranlib
> > ./configure --prefix=../musl --host=i386 CC="gcc -m32 -O3"
>
> i think you need . in PATH for this to work
Well, it works this way actually.
>
> i think you can pass 'CROSS_COMPILE=' to configure
> and then you don't need such symlinks.
>
What value should I set CROSS_COMPILE to? i386?
> > make
> > make install
> > cd ..
> >
> > Then I am compiling agains ./musl/ directory.
> >
> > But after "make" I have all needed files in ./muslsrc/ directory.
> > Is it possible to use them directly instead of making fake "installation"?
>
> no, the right way is to run make install
> (DESTDIR and --prefix works the usual way)
> there are only a small number of files that are copied
> this way, if you directly use the build directory then
> the target specific header files are not set up correctly,
> i think you can hack that around with a bits symlink and
> appropriate modifications to musl-gcc and the specs file,
> but such hacks are not guaranteed to work in the future.
Well, I will keep it the right way then. BTW, "make install"
tries to create symlink for ld-musl-i386.so in /usr/lib/ directory
How to prevent this attempt?
--
John Found <johnfound@asm32.info>
next prev parent reply other threads:[~2018-09-04 11:34 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-03 20:24 John Found
2018-09-04 9:40 ` Szabolcs Nagy
2018-09-04 11:34 ` John Found [this message]
2018-09-04 11:58 ` Szabolcs Nagy
2018-09-04 12:20 ` John Found
2018-09-04 12:27 ` Rich Felker
2018-09-04 12:39 ` John Found
2018-09-04 14:30 ` Rich Felker
2018-09-04 13:00 ` Jon Chesterfield
2018-09-04 14:38 ` Rich Felker
2018-09-04 13:27 ` John Found
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=20180904143439.121b6867f3e7fb99d4f1b527@asm32.info \
--to=johnfound@asm32.info \
--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).