[v850] cross compiler - file v850.md

Brian Dessent brian@dessent.net
Fri Apr 11 12:14:00 GMT 2008


p0ulp3 wrote:

> /tmp/src/gcc-4.3.0/configure --target=v850-elf --prefix=/tools
> --exec-prefix=/tools/gnu --with-gnu-as --with-gnu-ld --with-newlib -v
> 2>&1 | tee configure.out
> 
> make -w all-gcc install-gcc LANGUAGES="c c++" 2>&1 | tee make.out

You should really do --enable-languages=c,c++ when configuring and skip
overloading LANGUAGES at make time.  I think that's a gcc 3.x-ism that
is obsolete with the toplevel bootstrap changes in 4.x (just like "make
bootstrap" is now obsolete and is replaced by
--{enable,disable}-bootstrap.)

> main.c:(.text+0x24e): undefined reference to `__callt_save_interrupt'

I suspect that this function is part of libgcc.  When you use the
"all-gcc" or "install-gcc" targets you tell the build system to build
only the bare compiler itself, not any of its supporting target
libraries.  So it's no surprise then that you can't link with the
result, because libgcc is an essential support library that gcc uses for
all kinds of internal functions.

This "make all-gcc" target is not supposed to make a fully working
compiler, it's only to be used in situations where you don't yet have
target libc headers and thus can't link libgcc.  You're supposed to use
the resulting bare gcc to then configure/build/install your libc and
headers, and then use those to rebuild gcc correctly and in full,
without the all-gcc hack.

> After a search, I have realized that those symbols are defined in the
> file v850.md but this file and the complete directory is not present
> on my installation. Actually I can see the directory here :

.md files are never installed, they are source code for the compiler,
similar to all the other .c files.  You're chasing after the wrong thing
here.  You need to build libgcc, i.e. "make" not "make all-gcc".

Brian



More information about the Gcc-help mailing list