Where's the Cross-GCC FAQ ?

Dave Nadler Dave.Nadler@nadler.com
Tue Dec 2 23:31:00 GMT 2008


Thanks Mike. As I'm a newbie I'm going to need to
figure out where&how to pull the library sources
unfortunately omitted by the vendor. I hope to get
back to this project in a few days...
Thanks again,
Best Regards, Dave

At 02:30 PM 11/30/2008, Michael N. Moran wrote:
>Yann E. MORIN wrote:
>>>bare-metal libraries, including C++.
>>What are you calling "bare-metal libraries"?
>>"Bare-metal" (in my understanding) refer to a toolchain
>>that targets no "system". Generaly, you'd use a
>>bare-metal compiler to build whatever runs on the
>>bare-metal, without any underlying kernel of any sort.
>
>That is my understanding of the term.
>
>>C++ is certainly not available on bare-metal!
>
>That's wrong. Just as with C, some parts of the standard
>libraries may have dependencies on the OS, but the base
>language itself is readily usable on "bare-metal" ...
>I do it frequently.
>
>However, there's no need to use crosstool of any flavor
>to build a bare-metal toolchain. I use binutils, GCC and
>newlib to build cross bare metal toolchains.
>
>I've attached a script that I use to build C/C++ for
>a mips-elf target. It's nothing fancy (it doesn't
>download the pieces for you), but I think you
>can get the jist of building using this script. Just
>adjust the version numbers to suit your tastes. :)
>
>--
>Michael N. Moran           (h) 770 516 7918
>5009 Old Field Ct.         (c) 678 521 5460
>Kennesaw, GA, USA 30144    http://mnmoran.org
>
>"So often times it happens, that we live our lives in chains
>  and we never even know we have the key."
>"Already Gone" by Jack Tempchin (recorded by The Eagles)
>
>The Beatles were wrong: 1 & 1 & 1 is 1
>
>
>#!/bin/bash
>
># Note: need to set PATH to point at binutils mips-elf/bin
>
>rm -f ../gcc-4.1.1/newlib
>
>ln -s ../../../newlib/1.14.0/newlib-1.14.0/newlib ../gcc-4.1.1/newlib
>
>BINUTILS_PATH=/tools/gnu/gcc/4.1.1/mips-elf/bin
>
>export PATH=$BINUTILS_PATH:$PATH
>
>../gcc-4.1.1/configure \
>         --target=mips-elf \
>         --prefix=/tools/gnu/gcc/4.1.1/mips-elf \
>         --disable-newlib-supplied-syscalls \
>         --enable-languages=c,c++ \
>         --disable-shared \
>         --disable-libssp \
>         --with-newlib
>
>#nice -n 19 make CFLAGS="-O2 -fomit-frame-pointer" 2>&1 | tee make.temp
>#nice -n 19 make CFLAGS="-O2 -fomit-frame-pointer"
>#
># Since binutils showed a bug with -fomit-frame-pointer,
># I'm going to forego that optimization.
>#
>nice -n 19 make CFLAGS="-O2" CFLAGS_FOR_TARGET="-G0" CXXFLAGS_FOR_TARGET="-G0"
>
>#       AS_FOR_TARGET=${BINUTILS_PATH}/mips-elf-as \
>#       LD_FOR_TARGET=${BINUTILS_PATH}/mips-elf-ld \
>#       AR_FOR_TARGET=${BINUTILS_PATH}/mips-elf-ar \
>#       RANLIB_FOR_TARGET=${BINUTILS_PATH}/mips-elf-ranlib
>
>
>--
>For unsubscribe information see http://sourceware.org/lists.html#faq

Dave Nadler, USA East Coast voice (978) 263-0097,  drn@nadler.com 



--
For unsubscribe information see http://sourceware.org/lists.html#faq



More information about the crossgcc mailing list