This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
Re: Qs about runtime support libs like crt0.o
So, I tried to follow your instructions, first building a basic C
compiler targeting the PXA320, then building newlib. However, newlib
gets MANY errors when building. Here's what I did:
1) Build C compiler
$ ../configure --prefix=/usr/local/myarm --target=arm-elf --with-
cpu=xscale --with-arch=armv5te --with-float=soft --with-newlib --
disable-nls --enable-threads=no --enable-symvers=gnu --enable-
__cxa_atexit --enable-languages=c --disable-shared
$ make all-gcc all-install
2) Adjust path to put /usr/local/myarm/bin at the start
3) Build newlib
$ ../newlib-1.15.0/configure --prefix=/usr/local/myarm --target=arm-
elf --disable-newlib-supplied-syscalls --enable-newlib-io-long-long --
enable-newlib-multithreading --enable-newlib-io-pos-args --enable--
newlib-io-long-double --disable-multilib
$ make
At this point, I get a great many errors, starting with the argz
subdirectory build. They look like the following. It's calling my
host's native as, as far as I can tell, and I would think that's
incorrect. Does anyone have any ideas?
TIA,
Rick
------------------------------------------------
$ arm-elf-gcc -v -B/Users/rmann/Desktop/Downloads/arm-newlib/arm-elf/
newlib/ -isystem /Users/rmann/Desktop/Downloads/arm-newlib/arm-elf/
newlib/targ-include -isystem /Users/rmann/Desktop/Downloads/
newlib-1.15.0/newlib/libc/include -DPACKAGE_NAME=\"newlib\" -
DPACKAGE_TARNAME=\"newlib\" -DPACKAGE_VERSION=\"1.15.0\" -
DPACKAGE_STRING=\"newlib\ 1.15.0\" -DPACKAGE_BUGREPORT=\"\" -I. -
I../../../../../newlib-1.15.0/newlib/libc/argz -O2 -D__NO_SYSCALLS__ -
fno-builtin -O2 -g -O2 -c -o lib_a-dummy.o `test -f 'dummy.c'
|| echo '../../../../../newlib-1.15.0/newlib/libc/argz/'`dummy.c
Using built-in specs.
Target: arm-elf
Configured with: ../configure --prefix=/usr/local/myarm --target=arm-
elf --with-cpu=xscale --with-arch=armv5te --with-float=soft --with-
newlib --disable-nls --enable-threads=no --enable-symvers=gnu --
enable-__cxa_atexit --enable-languages=c --disable-shared
Thread model: single
gcc version 4.2.1
/usr/local/myarm/libexec/gcc/arm-elf/4.2.1/cc1 -quiet -v -I. -
I../../../../../newlib-1.15.0/newlib/libc/argz -D__USES_INITFINI__ -
DPACKAGE_NAME="newlib" -DPACKAGE_TARNAME="newlib" -
DPACKAGE_VERSION="1.15.0" -DPACKAGE_STRING="newlib 1.15.0" -
DPACKAGE_BUGREPORT="" -D__NO_SYSCALLS__ -isystem /Users/rmann/Desktop/
Downloads/arm-newlib/arm-elf/newlib/targ-include -isystem /Users/
rmann/Desktop/Downloads/newlib-1.15.0/newlib/libc/
include ../../../../../newlib-1.15.0/newlib/libc/argz/dummy.c -quiet -
dumpbase dummy.c -march=armv5te -mfloat-abi=soft -auxbase-strip lib_a-
dummy.o -g -O2 -O2 -O2 -version -fno-builtin -o /var/tmp//ccpm04Cr.s
ignoring nonexistent directory "/usr/local/myarm/lib/gcc/arm-elf/
4.2.1/../../../../arm-elf/sys-include"
ignoring nonexistent directory "/usr/local/myarm/lib/gcc/arm-elf/
4.2.1/../../../../arm-elf/include"
#include "..." search starts here:
#include <...> search starts here:
.
../../../../../newlib-1.15.0/newlib/libc/argz
/Users/rmann/Desktop/Downloads/arm-newlib/arm-elf/newlib/targ-include
/Users/rmann/Desktop/Downloads/newlib-1.15.0/newlib/libc/include
/usr/local/myarm/lib/gcc/arm-elf/4.2.1/include
End of search list.
GNU C version 4.2.1 (arm-elf)
compiled by GNU C version 4.0.1 (Apple Computer, Inc. build
5367).
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-
heapsize=131072
Compiler executable checksum: 70cf289f6287b9023e5b4eaf7d1988d8
as -march=armv5te -mfloat-abi=soft -o lib_a-dummy.o /var/tmp//
ccpm04Cr.s
/usr/libexec/gcc/darwin/i386/as: I don't understand 'm' flag!
/usr/libexec/gcc/darwin/i386/as: I don't understand 'a' flag!
/usr/libexec/gcc/darwin/i386/as: I don't understand 'r' flag!
/usr/libexec/gcc/darwin/i386/as: I don't understand 'c' flag!
/usr/libexec/gcc/darwin/i386/as: I don't understand 'h' flag!
/usr/libexec/gcc/darwin/i386/as: I don't understand '=' flag!
/usr/libexec/gcc/darwin/i386/as: I don't understand 'a' flag!
/usr/libexec/gcc/darwin/i386/as: Flag option -r has already been seen!
/usr/libexec/gcc/darwin/i386/as: I don't understand 'r' flag!
/usr/libexec/gcc/darwin/i386/as: Flag option -m has already been seen!
/usr/libexec/gcc/darwin/i386/as: I don't understand 'm' flag!
Apple Computer, Inc. version cctools-622.5.obj~13, GNU assembler
version 1.38
Unknown -v option ignored
/usr/libexec/gcc/darwin/i386/as: Flag option -m has already been seen!
/usr/libexec/gcc/darwin/i386/as: I don't understand 'm' flag!
/usr/libexec/gcc/darwin/i386/as: I don't understand 'l' flag!
/usr/libexec/gcc/darwin/i386/as: Flag option -o has already been seen!
dummy.c:2:unknown section type: %progbits
dummy.c:2:Rest of line ignored. 1st junk character valued 46 (.).
dummy.c:3:unknown section type: %progbits
dummy.c:3:Rest of line ignored. 1st junk character valued 46 (.).
dummy.c:4:unknown section type: %progbits
dummy.c:4:Rest of line ignored. 1st junk character valued 46 (.).
dummy.c:8:Expected comma after segment-name
dummy.c:8:Rest of line ignored. 1st junk character valued 9 ( ).
rmann1:~/Desktop/Downloads/arm-newlib/arm-elf/newlib/libc/argz rmann$
------------------------------------------------------