Posted on: 2009-03-29 14:00
Attached files:servus all, i try to build a cross gcc for some days already; host is windows xp sp3, target should be arm-elf and the build environment is mingw/msys. mingw is separately composed of binutils-2.18.50-20080109-2 gcc-core-3.4.5-20060117-3 mingwrt-3.15.1-mingw32 mingw32-make-3.81-2 mingw-utils-0.3 w32api-3.12-mingw32-dev msys is composed of msysCORE-1.0.11-20080826 flex-2.5.33-MSYS-1.0.11-1 crypt-1.1-1-MSYS-1.0.11-1 regex-0.12-MSYS-1.0.11-1 perl-5.6.1-MSYS-1.0.11-1 bison-2.3-MSYS-1.0.11-1 m4-1.4.7-MSYS additionally i've build autoconf-2.63 automake-1.10 and install them into "msys/home/install". source archives for cross gcc are binutils-2.19 gcc-4.3.3 gmp-4.2.4 mpfr-2.4.1 newlib-1.17.0 "msys/home/install/bin" and mingw bin directory are added to msys PATH environment variable. based on this configuration and lots of tutorials from the inet i wrote a simple shell script (see attachment) for building my cross gcc. but i've no success. everytime i run the script, i get following errors:
make[3]: Entering directory `/home/widar/src_gcc/gcc-4.3.3_build/libiberty/testsuite' make[3]: Nothing to be done for `install'. make[3]: Leaving directory `/home/widar/src_gcc/gcc-4.3.3_build/libiberty/testsuite' make[2]: Leaving directory `/home/widar/src_gcc/gcc-4.3.3_build/libiberty' /bin/sh: line 3: cd: arm-elf/libstdc++-v3: No such file or directory make[1]: *** [install-target-libstdc++-v3] Error 1 make[1]: Leaving directory `/home/widar/src_gcc/gcc-4.3.3_build' make: *** [install] Error 2 |
furthermore i get some STATUS_ACCESS_VIOLATIONS during build process:
make[3]: Entering directory `/home/widar/src_gcc/gcc-4.3.3_build/gcc'
/home/widar/src_gcc/gcc-4.3.3_build/./gcc/xgcc -B/home/widar/src_gcc/gcc-4.3.3_build/./gcc/ -nostdinc -B/home/widar/src_gcc/gcc-4.3.3_build/arm-elf/newlib/ -isystem /home/widar/src_gcc/gcc-4.3.3_build/arm-elf/newlib/targ-include -isystem /home/widar/src_gcc/gcc-4.3.3/newlib/libc/include -B/home/widar/src_gcc/gcc-4.3.3_build/arm-elf/libgloss/arm -L/home/widar/src_gcc/gcc-4.3.3_build/arm-elf/libgloss/libnosys -L/home/widar/src_gcc/gcc-4.3.3/libgloss/arm -B/home/widar/gcc_arm_elf/arm-elf/bin/ -B/home/widar/gcc_arm_elf/arm-elf/lib/ -isystem /home/widar/gcc_arm_elf/arm-elf/include -isystem /home/widar/gcc_arm_elf/arm-elf/sys-include -O2 -g -Os -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -I. -I/home/widar/src_gcc/gcc-4.3.3_build/arm-elf/libgcc -I../../gcc-4.3.3/gcc -I../../gcc-4.3.3/gcc//home/widar/src_gcc/gcc-4.3.3_build/arm-elf/libgcc -I../../gcc-4.3.3/gcc/../include -I../../gcc-4.3.3/gcc/../libcpp/include -I/home/widar/src_gcc/gcc-4.3.3_build/./gmp -I/home/widar/src_gcc/gcc-4.3.3/gmp -I/home/widar/src_gcc/gcc-4.3.3_build/./mpfr -I/home/widar/src_gcc/gcc-4.3.3/mpfr -I../../gcc-4.3.3/gcc/../libdecnumber -I../../gcc-4.3.3/gcc/../libdecnumber/dpd -I../libdecnumber -g -Os -g0 -finhibit-size-directive -fno-inline-functions -fno-exceptions -fno-zero-initialized-in-bss -fno-toplevel-reorder -fno-tree-vectorize -Dinhibit_libc \
-c ../../gcc-4.3.3/gcc/crtstuff.c -DCRT_BEGIN \
-o /home/widar/src_gcc/gcc-4.3.3_build/arm-elf/libgcc/crtbegin.o
0 [main] sh" 3952 handle_exceptions: Exception: STATUS_ACCESS_VIOLATION
1449 [main] sh" 3952 open_stackdumpfile: Dumping stack trace to sh.exe.stackdump
/home/widar/src_gcc/gcc-4.3.3_build/./gcc/xgcc -B/home/widar/src_gcc/gcc-4.3.3_build/./gcc/ -nostdinc -B/home/widar/src_gcc/gcc-4.3.3_build/arm-elf/newlib/ -isystem /home/widar/src_gcc/gcc-4.3.3_build/arm-elf/newlib/targ-include -isystem /home/widar/src_gcc/gcc-4.3.3/newlib/libc/include -B/home/widar/src_gcc/gcc-4.3.3_build/arm-elf/libgloss/arm -L/home/widar/src_gcc/gcc-4.3.3_build/arm-elf/libgloss/libnosys -L/home/widar/src_gcc/gcc-4.3.3/libgloss/arm -B/home/widar/gcc_arm_elf/arm-elf/bin/ -B/home/widar/gcc_arm_elf/arm-elf/lib/ -isystem /home/widar/gcc_arm_elf/arm-elf/include -isystem /home/widar/gcc_arm_elf/arm-elf/sys-include -O2 -g -Os -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -I. -I/home/widar/src_gcc/gcc-4.3.3_build/arm-elf/libgcc -I../../gcc-4.3.3/gcc -I../../gcc-4.3.3/gcc//home/widar/src_gcc/gcc-4.3.3_build/arm-elf/libgcc -I../../gcc-4.3.3/gcc/../include -I../../gcc-4.3.3/gcc/../libcpp/include -I/home/widar/src_gcc/gcc-4.3.3_build/./gmp -I/home/widar/src_gcc/gcc-4.3.3/gmp -I/home/widar/src_gcc/gcc-4.3.3_build/./mpfr -I/home/widar/src_gcc/gcc-4.3.3/mpfr -I../../gcc-4.3.3/gcc/../libdecnumber -I../../gcc-4.3.3/gcc/../libdecnumber/dpd -I../libdecnumber -g -Os -g0 -finhibit-size-directive -fno-inline-functions -fno-exceptions -fno-zero-initialized-in-bss -fno-toplevel-reorder -fno-tree-vectorize -Dinhibit_libc \
-c ../../gcc-4.3.3/gcc/crtstuff.c -DCRT_END \
-o /home/widar/src_gcc/gcc-4.3.3_build/arm-elf/libgcc/crtend.o
0 [main] sh" 2516 handle_exceptions: Exception: STATUS_ACCESS_VIOLATION
14209 [main] sh" 2516 open_stackdumpfile: Dumping stack trace to sh.exe.stackdump
/home/widar/src_gcc/gcc-4.3.3_build/./gcc/xgcc -B/home/widar/src_gcc/gcc-4.3.3_build/./gcc/ -nostdinc -B/home/widar/src_gcc/gcc-4.3.3_build/arm-elf/newlib/ -isystem /home/widar/src_gcc/gcc-4.3.3_build/arm-elf/newlib/targ-include -isystem /home/widar/src_gcc/gcc-4.3.3/newlib/libc/include -B/home/widar/src_gcc/gcc-4.3.3_build/arm-elf/libgloss/arm -L/home/widar/src_gcc/gcc-4.3.3_build/arm-elf/libgloss/libnosys -L/home/widar/src_gcc/gcc-4.3.3/libgloss/arm -B/home/widar/gcc_arm_elf/arm-elf/bin/ -B/home/widar/gcc_arm_elf/arm-elf/lib/ -isystem /home/widar/gcc_arm_elf/arm-elf/include -isystem /home/widar/gcc_arm_elf/arm-elf/sys-include -g -Os -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -g -Os -I. -I/home/widar/src_gcc/gcc-4.3.3_build/arm-elf/libgcc -I../../gcc-4.3.3/gcc -I../../gcc-4.3.3/gcc//home/widar/src_gcc/gcc-4.3.3_build/arm-elf/libgcc -I../../gcc-4.3.3/gcc/../include -I../../gcc-4.3.3/gcc/../libcpp/include -I/home/widar/src_gcc/gcc-4.3.3_build/./gmp -I/home/widar/src_gcc/gcc-4.3.3/gmp -I/home/widar/src_gcc/gcc-4.3.3_build/./mpfr -I/home/widar/src_gcc/gcc-4.3.3/mpfr -I../../gcc-4.3.3/gcc/../libdecnumber -I../../gcc-4.3.3/gcc/../libdecnumber/dpd -I../libdecnumber \
-c -o /home/widar/src_gcc/gcc-4.3.3_build/arm-elf/libgcc/crti.o -x assembler-with-cpp ../../gcc-4.3.3/gcc/config/arm/crti.asm
|
i become desperate. actually the goal is to create a arm-elf cross gcc with project specific customizable newlib syscalls and no generally os dependecy or bareboard support only. can anybody help me? thank you, daniel
Posted on: 2009-03-29 16:56
Hello Daniel, > actually the goal is to create a arm-elf cross gcc with project specific > customizable newlib syscalls and no generally os dependecy or bareboard > support only. Take a look at YAGARTO (http://www.yagarto.de/), the new version was built with the following options: -DREENTRANT_SYSCALLS_PROVIDED --disable-newlib-supplied-syscalls You can take a look at my build script too, perhapse this can help to solve your build problems? Under the download table you will find a link to the source. Regards, Michael
Posted on: 2009-03-30 23:15
> i become desperate. > actually the goal is to create a arm-elf cross gcc with project specific > customizable newlib syscalls and no generally os dependecy or bareboard > support only. > can anybody help me? > That is exactly what the Yagarto, WinARM, and CodeSourcery builds already do. Why do you feel you need to build your own with that selection? Take a look at the "ARM-GCC development resources" sticky thread at the top of the forum (http://embdev.net/topic/129986), it has links to a number of GNU tool-chains for ARM. Also the entry "Building bare-metal ARM with GNU" describes exactly what you are trying to do with already available built tool-chains (those already mentioned in fact). Clifford
Posted on: 2009-03-31 12:23
hi, thanks for your responses. @michael: why do you build GMP and MPFR separately in your newest build script? i thought i've read that it will also work / it's equivalent if GMP and MPFR sources will copy or link into GCC source directory. do you know something about that? do you have experiences with both procedures? @clifford: i know that there are a lot of working toolchains for arm :o) i use yagarto and crossworks. allthough i want to to build a toolchain just for my interest ... but for a current demand :o) @all: has anybody take a look at the attached build script? are there any fundamental errors or is it a possible solution for building a gcc arm toolchain? thnx daniel
Posted on: 2009-03-31 13:43
daniel wrote: > @clifford: i know that there are a lot of working toolchains for arm :o) > i use yagarto and crossworks. allthough i want to to build a toolchain > just for my interest ... but for a current demand :o) In that case I object to the 'desparate' plea for help when it was not really that important after all! The phrase "i become desperate" kind of implied to me that this was stopping you getting work done. I think perhaps you overstated your desperation since this is obviously not stopping you from doing productive work. If your stated goal were real, you would use an existing tool-chain. Bit now you have changed your goal, which is merely to build the tool-chain for interest. You are in it for the journey, not the destination. > ... but for a current demand :o) That kind of contradicts the "just for interest" statement. If you mean for a project, do you need to risk your project schedule by building and testing your own tool-chain? Clifford
Posted on: 2009-03-31 19:38
Hello Daniel, >@michael: why do you build GMP and MPFR separately in your newest build >script? The GCC 4.3.x need GMP and MPFR, but I do not have these tools installed on my build machine. The same with expat. Regards, Michael
Posted on: 2009-04-06 20:29
hi all, last weekend i tested around like announced. i varied the GMP and MPFR handling, i also used the unchanged YAGARTO build scripts and i edited MSYS. all trails finished without success, but with various errors. i capitulate. @clifford: i tested around for 5 or 6 weekends to build my own GCC/NEWLIB toolchain (newlib = -DREENTRANT_SYSCALLS_PROVIDED & --disable-newlib-supplied-syscalls). YAGARTO wasn't available in this configuration at this time (released on 29.03.2009) and even there is no other toolchain i think. and because there where no improvement to the last part of my build process for such a long time i became desperate. further the absence of a working toolchain that fits my requests stopps me from doing very interessting, productive private work. @michael: thanks for your help. because i didn't get my toolchain work, i will use YAGARTO again and suspend my intent to build a own toolchain. apparently YAGARTO meets my requests now :o) thanks again, daniel