This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Qs about runtime support libs like crt0.o


[a few days ago]
Rick Mann wrote:
[I'm responding after a vacation]

So, I tried to follow your instructions,
> 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

One thing I do is is include a "version number" in the --prefix= path. Reason: I need multiple versions of various tool chains in place. Sometimes I am working on older versions of things... and need to use
the *OLD* version of some tool chain without messing up my *NEW* tool chain.


So... I do this:

$ ./configure --prefix=/toolchain/arm-elf/rev1.0/install ... [snip]

I do the exact same thing with BinUtils, and Newlib, and GDB/Insight
and follow the same technique on Cygwin.

This makes tools "nicely self-contained" in a single directory with a revision number in place.

Then later, in Makefiles, or other places, I refer directly to the
specific tool chain revision via Make macros like this:

Something sort of like this:

TOOL_REV=rev1.0

    TARGET_ARCH=arm-elf
    TARGET_PREFIX=arm-elf-

TOOLCHAIN_HOME=/toolchain/${TARGET_ARCH}/${TOOL_REV}/install

CROSS_COMPILE=${TOOLCHAIN_HOME}/bin/${TARGET_ARCH}/${TARGET_PREFIX}

TARGET_GCC=${CROSS_COMPILE}gcc

And so forth for other things

There is an important distinction here:

I hard code a version number in the path.

Later, if I want something to work in 'in my $PATH' I insert symlinks in some 'bin' directory that point to the version I want to "have laying around in a handy sort of place" for tiny oddball things.

-Duane.









$ 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$



------------------------------------------------------









Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]