This is the mail archive of the mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.

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: Where's the Cross-GCC FAQ ?

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

"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

# 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



../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 \

#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.

#	AS_FOR_TARGET=${BINUTILS_PATH}/mips-elf-as \
#	LD_FOR_TARGET=${BINUTILS_PATH}/mips-elf-ld \
#	AR_FOR_TARGET=${BINUTILS_PATH}/mips-elf-ar \

For unsubscribe information see

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