[Clfs-dev] why there isn't any standard CLFS ARM Book?

Michele Bucca michele.bucca at gmail.com
Wed Nov 21 16:41:26 PST 2018


Il giorno gio 22 nov 2018 alle ore 01:10 Michele Bucca
<michele.bucca at gmail.com> ha scritto:
>
> Hello There
>
> I was wondering why there wasn't a regular CLFS book for the ARM
> architecture. Yes, we have clfs-embedded but we don't have a regular
> CLFS Book. The only architectures supported are x86, x86_64, sparc,
> mips, but not ARM. Why?
>
> Nowadays there are a lot of ARM based Single Board Computers like the
> Raspberry Pi so I think that maybe the ARM community would benefit
> from a book like this.
>
> I know that there's a PiLFS project out there, but it's not a book,
> rather a set of scripts that build LFS for the RPI. Still it's a
> pretty useful resource.
>
> I'm having trouble building a Cross-compiler for ARMv7 (soft float)
> using the latest packages used in LFS-8.3, glibc-2.28. I don't know if
> you're interested in helping me with my problem. I Tried to build a
> toolchain for ARMv5 (also soft float) and glibc builds fine if I
> disable werrors. The toolchain can build several packages such as
> busybox, binutils, make, GCC but it fails with *tar*.
>

Sorry for my bad writing. As I was saing: I built TWO toolchains with
the packages provided by LFS-8.3. Both toolchains seems to have
problems with glibc. One toolchain targets ARMv7 (soft floating
point), where GLIBC fails to build because of this error:

arm-linux-gnueabi-gcc ../sysdeps/arm/crti.S -c     -I../include
-I/home/michele/x-tools/obj/build.glibc-2.28/csu
-I/home/michele/x-tools/obj/build.glibc-2.28
-I../sysdeps/unix/sysv/linux/arm  -I../sysdeps/arm/nptl
-I../sysdeps/unix/sysv/linux/include -I../sysdeps/unix/sysv/linux
-I../sysdeps/nptl  -I../sysdeps/pthread  -I../sysdeps/gnu
-I../sysdeps/unix/inet  -I../sysdeps/unix/sysv  -I../sysdeps/unix/arm
-I../sysdeps/unix  -I../sysdeps/posix  -I../sysdeps/arm/nofpu
-I../sysdeps/ieee754/soft-fp  -I../sysdeps/arm/include
-I../sysdeps/arm  -I../sysdeps/wordsize-32
-I../sysdeps/ieee754/flt-32  -I../sysdeps/ieee754/dbl-64
-I../sysdeps/ieee754  -I../sysdeps/generic  -I.. -I../libio -I.
-D_LIBC_REENTRANT -include
/home/michele/x-tools/obj/build.glibc-2.28/libc-modules.h
-DMODULE_NAME=libc -include ../include/libc-symbols.h
-DTOP_NAMESPACE=glibc -DASSEMBLER
-I/home/michele/x-tools/obj/build.glibc-2.28/csu/. -g0 -Werror=undef
-Wa,--noexecstack   -o
/home/michele/x-tools/obj/build.glibc-2.28/csu/crti.o -MD -MP -MF
/home/michele/x-tools/obj/build.glibc-2.28/csu/crti.o.dt -MT
/home/michele/x-tools/obj/build.glibc-2.28/csu/crti.o
../sysdeps/arm/sysdep.h: Assembler messages:
../sysdeps/arm/sysdep.h:144: Error: selected processor does not
support ARM opcodes
../sysdeps/arm/crti.S:64: Error: attempt to use an ARM instruction on
a Thumb-only processor -- `ldr r3,.LGOT'
../sysdeps/arm/crti.S:65: Error: attempt to use an ARM instruction on
a Thumb-only processor -- `ldr r2,.LGOT+4'
../sysdeps/arm/crti.S:67: Error: attempt to use an ARM instruction on
a Thumb-only processor -- `add r3,pc,r3'
../sysdeps/arm/crti.S:68: Error: attempt to use an ARM instruction on
a Thumb-only processor -- `ldr r2,[r3,r2]'
../sysdeps/arm/crti.S:69: Error: attempt to use an ARM instruction on
a Thumb-only processor -- `cmp r2,#0'
../sysdeps/arm/crti.S:70: Error: attempt to use an ARM instruction on
a Thumb-only processor -- `bxeq lr'
../sysdeps/arm/crti.S:71: Error: attempt to use an ARM instruction on
a Thumb-only processor -- `b __gmon_start__'
../sysdeps/arm/crti.S:84: Error: attempt to use an ARM instruction on
a Thumb-only processor -- `push {r3,lr}'
../sysdeps/arm/crti.S:86: Error: attempt to use an ARM instruction on
a Thumb-only processor -- `bl call_weak_fn'
../sysdeps/arm/crti.S:97: Error: attempt to use an ARM instruction on
a Thumb-only processor -- `push {r3,lr}'
/home/michele/x-tools/obj/build.glibc-2.28/sysd-rules:449: recipe for
target '/home/michele/x-tools/obj/build.glibc-2.28/csu/crti.o' failed
make[2]: *** [/home/michele/x-tools/obj/build.glibc-2.28/csu/crti.o] Error 1
make[2]: Leaving directory '/home/michele/x-tools/obj/glibc-2.28/csu'
Makefile:258: recipe for target 'csu/subdir_lib' failed
make[1]: *** [csu/subdir_lib] Error 2
make[1]: Leaving directory '/home/michele/x-tools/obj/glibc-2.28'
Makefile:9: recipe for target 'all' failed
make: *** [all] Error 2

Then I have another Toolchain for ARMv5, also with soft floating
point. Glibc there builds only if I tell it to do not abort the builds
when there are warnings (../configure  --disable-werror [..]). This
toolchain was used to create a chroot: it builds all sort of things
such as binutils, gcc, make (only if I patch a file with a sed
command), busybox, xz but it fails to build tar with this error

 CC       areadlink-with-size.o
In file included from
/home/michele/x-tools/arm-linux-gnueabi/arm-linux-gnueabi/include/stdlib.h:1014,
                 from ./stdlib.h:36,
                 from areadlink-with-size.c:28:
/home/michele/x-tools/arm-linux-gnueabi/arm-linux-gnueabi/include/bits/stdlib.h:
In function ‘wctomb’:
/home/michele/x-tools/arm-linux-gnueabi/arm-linux-gnueabi/include/bits/stdlib.h:90:3:
error: #error "Assumed value of MB_LEN_MAX wrong"
 # error "Assumed value of MB_LEN_MAX wrong"
   ^~~~~
Makefile:1897: recipe for target "areadlink-with-size.o" failed
make[4]: *** [areadlink-with-size.o] Error 1
make[4]: uscita dalla directory "/home/michele/tmp/arm-bin/tar-1.30/gnu"
Makefile:1922: recipe for target "all-recursive" failed
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory "/home/michele/tmp/arm-bin/tar-1.30/gnu"
Makefile:1583: recipe for target "all" failed
make[2]: *** [all] Error 2
make[2]: leaving directory "/home/michele/tmp/arm-bin/tar-1.30/gnu"
Makefile:1388: recipe for target "all-recursive" failed
make[1]: *** [all-recursive] Error 1
make[1]: leaving directory "/home/michele/tmp/arm-bin/tar-1.30"
Makefile:1327: recipe for target "all" failed
make: *** [all] Error 2

I'm asking for a book for ARM because maybe with that I would be able
to build these core packages without all these issues.

> If I had a book maybe it would be easier for me to build a working
> toolchain without this kind of issues. Let me guess, ARM processors
> have too many differences between them and it is difficult to build a
> book that works for all of them, right? Let me know what you think. I
> really like the ARM architecture and it would be a shame for me to
> abandon it.
>
> Best Wishes
> Michele Bucca



More information about the Clfs-dev mailing list