[v850] cross compiler - file v850.md

p0ulp3 p0ulp3@gmail.com
Mon Apr 14 16:04:00 GMT 2008


Hi,

>  You must use the some options when linking as when compiling.  Add -mv850e
> to LDFLAGS and your problem will go away, as that tells gcc to use the v850e
> version of libgcc.  And drop the explicit -L option, that isn't necessary or
> useful.
>
>  Jim

You solved a part of the problem, the flag -mv850e was missing for the
linker, and now the symbols callt_... are resolved, but the symbols
___DI() and ___EI() are still unresolved :

$ make clean && make 2>&1 | tee make.out
rm -rf src/*.o
rm -rf *.i
rm -rf *.s
/tools/gnu/bin/v850-elf-gcc.exe -o src/Display.o -c -mv850e -I/tools/gnu/v850-el
f/include/ src/Display.c
/tools/gnu/bin/v850-elf-gcc.exe -o src/main.o -c -mv850e -I/tools/gnu/v850-elf/i
nclude/ src/main.c
src/main.c: In function 'main':
src/main.c:39: warning: return type of 'main' is not 'int'
/tools/gnu/bin/v850-elf-gcc.exe -o test -mv850e src/Display.o src/main.o
src/main.o: In function `_main':
main.c:(.text+0x10): undefined reference to `___DI'
main.c:(.text+0x30): undefined reference to `___EI'
src/main.o: In function `_INTP5':
main.c:(.text+0x370): undefined reference to `___EI'
collect2: ld returned 1 exit status
make: *** [test] Error 1

So I have replaced each call of __DI() and __EI() by asm("di") and
asm("ei") and the program is linked now but if anyone has an idea to
solve this problem, let me know.

Thanks again for your help
p0ulp3



More information about the Gcc-help mailing list