mailing list of musl libc
 help / color / mirror / code / Atom feed
* musl-cross-make build script.
@ 2017-02-16 22:57 Rob Landley
  2017-02-17 11:53 ` Szabolcs Nagy
  0 siblings, 1 reply; 6+ messages in thread
From: Rob Landley @ 2017-02-16 22:57 UTC (permalink / raw)
  To: musl

[-- Attachment #1: Type: text/plain, Size: 461 bytes --]

This is the script I use to build all the native and cross targets that
musl-cross-make currently supports. You should just be able to do:

  git clone https://github.com/richfelker/musl-cross-make
  cd musl-cross-make
  ~/mcm-buildall.sh

And then wait a long time and the result should wind up in "output".

I'm still testing to make sure this can build all the root filesystems
and kernels (teaching my https://github.com/landley/mkroot to do kernels).

Rob

[-- Attachment #2: mcm-buildall.sh --]
[-- Type: application/x-shellscript, Size: 2066 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: musl-cross-make build script.
  2017-02-16 22:57 musl-cross-make build script Rob Landley
@ 2017-02-17 11:53 ` Szabolcs Nagy
  2017-02-17 11:56   ` Szabolcs Nagy
  2017-02-18  8:45   ` Rob Landley
  0 siblings, 2 replies; 6+ messages in thread
From: Szabolcs Nagy @ 2017-02-17 11:53 UTC (permalink / raw)
  To: Rob Landley; +Cc: musl

* Rob Landley <rlandley@se-instruments.com> [2017-02-16 16:57:54 -0600]:
> 
>   git clone https://github.com/richfelker/musl-cross-make
>   cd musl-cross-make
>   ~/mcm-buildall.sh
> 
> And then wait a long time and the result should wind up in "output".

nice

> #!/bin/bash

isn't it posix sh compatible?

>   PATH="$LP" make OUTPUT="$OUTPUT" TARGET="$TARGET" \
>     GCC_CONFIG="--disable-nls --disable-libquadmath --disable-decimal-float $GCC_CONFIG" COMMON_CONFIG="$COMMON_CONFIG" \
>     install -j$(nproc)

i didnt know about -j$(nproc), what does it do?

> for i in i686:: \
>          armv5l:eabihf:--with-arch=armv5t armv7l:eabihf:--with-arch=armv7-a \
>          "armv7m:eabi:--with-arch=armv7-m --with-mode=thumb --disable-libatomic --enable-default-pie" \
>          armv7r:eabihf:--with-arch=armv7-r \
>          armv8l:eabihf:--with-arch=armv8-a i486:: sh2eb:fdpic:--with-cpu=mj2 \
>          mipsel:: mips:: powerpc:: sh4:: microblaze:: mips64:: powerpc64:: \
>          s390x:: x86_64::

aarch64 is missing (and i don't think it's useful to
build both armv7l and armv8l toolchains: the former
can produce binaries for armv8-a targets just fine and
i don't know about any code in the toolchain target
libs that would be different on armv8-a, well may be
the new float to int rounding and acquire/release
atomics insns could be used but that's about it)


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: musl-cross-make build script.
  2017-02-17 11:53 ` Szabolcs Nagy
@ 2017-02-17 11:56   ` Szabolcs Nagy
  2017-02-18  8:45   ` Rob Landley
  1 sibling, 0 replies; 6+ messages in thread
From: Szabolcs Nagy @ 2017-02-17 11:56 UTC (permalink / raw)
  To: Rob Landley, musl

* Szabolcs Nagy <nsz@port70.net> [2017-02-17 12:53:22 +0100]:
> * Rob Landley <rlandley@se-instruments.com> [2017-02-16 16:57:54 -0600]:
> >     install -j$(nproc)
> 
> i didnt know about -j$(nproc), what does it do?

never mind,
just got confused between make and shell syntax
and thought make had some magic nproc variable..


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: musl-cross-make build script.
  2017-02-17 11:53 ` Szabolcs Nagy
  2017-02-17 11:56   ` Szabolcs Nagy
@ 2017-02-18  8:45   ` Rob Landley
  2017-02-18 12:53     ` Szabolcs Nagy
  1 sibling, 1 reply; 6+ messages in thread
From: Rob Landley @ 2017-02-18  8:45 UTC (permalink / raw)
  To: musl, Szabolcs Nagy

Oh right, this list has the broken reply-to header that makes "reply
all" not reply to all. I need to come up with a thunderbird plugin to
disable that...

On 02/17/2017 05:53 AM, Szabolcs Nagy wrote:
> * Rob Landley <rlandley@se-instruments.com> [2017-02-16 16:57:54 -0600]:
>>
>>   git clone https://github.com/richfelker/musl-cross-make
>>   cd musl-cross-make
>>   ~/mcm-buildall.sh
>>
>> And then wait a long time and the result should wind up in "output".
> 
> nice
> 
>> #!/bin/bash
> 
> isn't it posix sh compatible?
> 
>>   PATH="$LP" make OUTPUT="$OUTPUT" TARGET="$TARGET" \
>>     GCC_CONFIG="--disable-nls --disable-libquadmath --disable-decimal-float $GCC_CONFIG" COMMON_CONFIG="$COMMON_CONFIG" \
>>     install -j$(nproc)
>
> i didnt know about -j$(nproc), what does it do?

You answered your own question, but I note you can go "taskset 1
./thingy.sh" to do a single processor build with this. :)

>> for i in i686:: \
>>          armv5l:eabihf:--with-arch=armv5t armv7l:eabihf:--with-arch=armv7-a \
>>          "armv7m:eabi:--with-arch=armv7-m --with-mode=thumb --disable-libatomic --enable-default-pie" \
>>          armv7r:eabihf:--with-arch=armv7-r \
>>          armv8l:eabihf:--with-arch=armv8-a i486:: sh2eb:fdpic:--with-cpu=mj2 \
>>          mipsel:: mips:: powerpc:: sh4:: microblaze:: mips64:: powerpc64:: \
>>          s390x:: x86_64::
> 
> aarch64 is missing

In theory armv8l is what they used to call aaaarrcchh64 before they
decided to stutter and pretend it wasn't arm or whatever that nonsense
is. (I've done my best to ignore it.)

https://www.arm.com/products/processors/armv8-architecture.php

In practice I haven't tested that one yet and it looks like it's broken,
have to figure out how to hit it with a rock...

(The armv7r target is also broken because it's nommu but not pie, need
to tweak that...)

> (and i don't think it's useful to
> build both armv7l and armv8l toolchains: the former
> can produce binaries for armv8-a targets just fine

These are not multilib toolchains. If armv7l is 32 bit, armv8l is 64
bit, they have different libgcc.a and so on...

> and i don't know about any code in the toolchain target
> libs that would be different on armv8-a,

One is 32 bit, one is 64 bit?

> well may be
> the new float to int rounding and acquire/release
> atomics insns could be used but that's about it)

Rob


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: musl-cross-make build script.
  2017-02-18  8:45   ` Rob Landley
@ 2017-02-18 12:53     ` Szabolcs Nagy
  2017-02-18 13:39       ` Szabolcs Nagy
  0 siblings, 1 reply; 6+ messages in thread
From: Szabolcs Nagy @ 2017-02-18 12:53 UTC (permalink / raw)
  To: Rob Landley; +Cc: musl

* Rob Landley <rlandley@se-instruments.com> [2017-02-18 02:45:38 -0600]:
> On 02/17/2017 05:53 AM, Szabolcs Nagy wrote:
> > i didnt know about -j$(nproc), what does it do?
> 
> You answered your own question, but I note you can go "taskset 1
> ./thingy.sh" to do a single processor build with this. :)

nice


> >> for i in i686:: \
> >>          armv5l:eabihf:--with-arch=armv5t armv7l:eabihf:--with-arch=armv7-a \
> >>          "armv7m:eabi:--with-arch=armv7-m --with-mode=thumb --disable-libatomic --enable-default-pie" \
> >>          armv7r:eabihf:--with-arch=armv7-r \
> >>          armv8l:eabihf:--with-arch=armv8-a i486:: sh2eb:fdpic:--with-cpu=mj2 \
> >>          mipsel:: mips:: powerpc:: sh4:: microblaze:: mips64:: powerpc64:: \
> >>          s390x:: x86_64::
> > 
> > aarch64 is missing
> 
> In theory armv8l is what they used to call aaaarrcchh64 before they
> decided to stutter and pretend it wasn't arm or whatever that nonsense
> is. (I've done my best to ignore it.)
> 
> https://www.arm.com/products/processors/armv8-architecture.php
> 
> In practice I haven't tested that one yet and it looks like it's broken,
> have to figure out how to hit it with a rock...
> 
> (The armv7r target is also broken because it's nommu but not pie, need
> to tweak that...)
> 
> > (and i don't think it's useful to
> > build both armv7l and armv8l toolchains: the former
> > can produce binaries for armv8-a targets just fine
> 
> These are not multilib toolchains. If armv7l is 32 bit, armv8l is 64
> bit, they have different libgcc.a and so on...
> 
> > and i don't know about any code in the toolchain target
> > libs that would be different on armv8-a,
> 
> One is 32 bit, one is 64 bit?
> 

no,

in a triplet "armv8" means the armv8 architecture in
32bit execution state (which arm calls aarch32) and
that is backward compatible (and almost identical to)
armv7 (at least the -a profile, armv8-m and armv7-m
have more differences afaik)

in a triplet "aarch64" means the armv8 architecture in
64bit execution state.

so if you configure for armv8l-linux-musleabihf you
get a toolchain that follows a 32bit arm abi and uses
a 32bit arm isa (thumb or arm like with armv7).

the 64bit triplet is aarch64-linux-musl (there is no
soft float abi nor eabi suffix), there is an ilp32
abi for aarch64 which uses 64bit isa (like x32) which
is not supported by musl, and a bigendian variant
which can be configured with "aarch64_be" (but not
used in practice i think).


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: musl-cross-make build script.
  2017-02-18 12:53     ` Szabolcs Nagy
@ 2017-02-18 13:39       ` Szabolcs Nagy
  0 siblings, 0 replies; 6+ messages in thread
From: Szabolcs Nagy @ 2017-02-18 13:39 UTC (permalink / raw)
  To: Rob Landley, musl

* Szabolcs Nagy <nsz@port70.net> [2017-02-18 13:53:01 +0100]:
> in a triplet "armv8" means the armv8 architecture in
> 32bit execution state (which arm calls aarch32) and
> that is backward compatible (and almost identical to)
> armv7 (at least the -a profile, armv8-m and armv7-m
> have more differences afaik)
> 
> in a triplet "aarch64" means the armv8 architecture in
> 64bit execution state.
> 
> so if you configure for armv8l-linux-musleabihf you
> get a toolchain that follows a 32bit arm abi and uses
> a 32bit arm isa (thumb or arm like with armv7).
> 
> the 64bit triplet is aarch64-linux-musl (there is no
> soft float abi nor eabi suffix), there is an ilp32
> abi for aarch64 which uses 64bit isa (like x32) which
> is not supported by musl, and a bigendian variant
> which can be configured with "aarch64_be" (but not
> used in practice i think).

one more note: there are various isa levels and
extensions, e.g.

 --with-arch=armv8.2-a+crypto+fp16

will configure for armv8.2-a isa level with the
optional crypto and 16bit float instructions enabled.
(this affects both 32bit and 64bit arm isas)

there is no softfloat abi, but you can still compile
something without float instructions using cflag like

 -march=armv8-a+nofp

(the -mgeneral-regs-only flag works too, but +noXXX
is a generic way to turn extensions off.. so there
is a zoo of variants, but binary distros will care
about the baseline armv8-a only i guess)


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-02-18 13:39 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-16 22:57 musl-cross-make build script Rob Landley
2017-02-17 11:53 ` Szabolcs Nagy
2017-02-17 11:56   ` Szabolcs Nagy
2017-02-18  8:45   ` Rob Landley
2017-02-18 12:53     ` Szabolcs Nagy
2017-02-18 13:39       ` Szabolcs Nagy

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).