Gentoo Archives: gentoo-musl

From: Stuart Longland <stuartl@×××××××××××××××.au>
To: gentoo-musl <gentoo-musl@l.g.o>
Subject: [gentoo-musl] Anyone had any luck with an ARMv5 softfloat toolchain?
Date: Sun, 07 May 2017 06:30:55
Message-Id: c5999c44-aa7b-3ca8-a01f-8f1a0f19757d@longlandclan.id.au
1 Hi all,
2
3 Has anyone had any luck building a cross toolchain for ARMv5 (softfloat)?
4
5 binutils and gcc (stage 1) build without issue:
6 > # armv5tel-softfloat-linux-musleabi-gcc --version
7 > armv5tel-softfloat-linux-musleabi-gcc (Gentoo 5.4.0-r3 p1.3, pie-0.6.5) 5.4.0
8 > Copyright (C) 2015 Free Software Foundation, Inc.
9 > This is free software; see the source for copying conditions. There is NO
10 > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
11 > # armv5tel-softfloat-linux-musleabi-as --version
12 > GNU assembler (Gentoo 2.27 p1.0) 2.27
13 > Copyright (C) 2016 Free Software Foundation, Inc.
14 > This program is free software; you may redistribute it under the terms of
15 > the GNU General Public License version 3 or later.
16 > This program has absolutely no warranty.
17 > This assembler was configured for a target of `armv5tel-softfloat-linux-musleabi'.
18
19 musl libc? Not so much:
20
21 > armv5tel-softfloat-linux-musleabi-gcc -std=c99 -nostdinc -ffreestanding -fexcess-precision=standard -frounding-math -Wa,--n
22 > oexecstack -D_XOPEN_SOURCE=700 -I./arch/arm -I./arch/generic -Iobj/src/internal -I./src/internal -Iobj/include -I./include
23 > -pipe -fomit-frame-pointer -fno-unwind-tables -fno-asynchronous-unwind-tables -ffunction-sections -fdata-sections -Werror=
24 > implicit-function-declaration -Werror=implicit-int -Werror=pointer-sign -Werror=pointer-arith -include vis.h -O2 -pipe -Wl,
25 > --sort-section,alignment -Wl,--sort-common -Wl,--gc-sections -Wl,--hash-style=both -Wl,--no-undefined -Wl,--exclude-libs=AL
26 > L -Wl,-Bsymbolic-functions -Wl,-O1 -Wl,--as-needed -nostdlib -shared \
27 > -Wl,-e,_dlstart -o lib/libc.so (… lots of .lo files…) -lgcc
28 > rm -f lib/libc.a
29 > armv5tel-softfloat-linux-musleabi-ar rc lib/libc.a (… lots of files)
30 > armv5tel-softfloat-linux-musleabi-ranlib lib/libc.a
31 > /usr/libexec/gcc/armv5tel-softfloat-linux-musleabi/ld: cannot find crt1.o: No such file or directory
32 > /usr/libexec/gcc/armv5tel-softfloat-linux-musleabi/ld: cannot find crti.o: No such file or directory
33 > /usr/libexec/gcc/armv5tel-softfloat-linux-musleabi/ld: cannot find -lc
34 > /usr/libexec/gcc/armv5tel-softfloat-linux-musleabi/ld: cannot find crtn.o: No such file or directory
35 > collect2: error: ld returned 1 exit status
36
37 For the sake of brevity on a mailing list I have chopped a bit out of
38 that build log, but I can post the full version somewhere if people want
39 to have a look.
40
41 My aim is to bootstrap an armv5te environment for running on some
42 industrial computers, which could really benefit from use of musl rather
43 than glibc. (128MB RAM only goes so far.)
44
45 Regards,
46 --
47 Stuart Longland (aka Redhatter, VK4MSL)
48
49 I haven't lost my mind...
50 ...it's backed up on a tape somewhere.