> I think you are right, i need to build binutils for arm first. Actually
> i change my configuration, both gcc and binutils
> ../gcc/configure --host=mingw32 --target=arm-thumb-pe
Ok, your target is this, but what the hell it is ? You seem to know
what it is, so please tell us too! When you are going to produce tools
for no-opsys embedded aims, you should know the basics of terms like
'compiler', 'headers', 'startups', 'libraries' and 'linker scripts', or
get a book like "Programming Embedded Systems in C and C++" or
"Programming with GNU Software", both from O'Reilly (http://www.ora.com)
if you don't yet have the prerequisitities in your know-how...
If your target would be the well-known WinCE/ARM (arm-wince-pe) or
EPOC/ARM (arm-epoc-pe), quite many would be capable to give you advices
here. These should be much more Windows-like and Windows-related than
these embedded issues, for which the crossgcc maillist or the
'comp.arch.embedded' NG could be fine...
> after that , gcc compiling run much far without big mistakes, but stop
> at this point:
> checking whether the C compiler (/d/souces/gcc/armobj/gcc/xgcc
> -B/d/souces/gcc/armobj/gcc/ -B/mingwarm/arm-thumb-pe/bin/
> -B/mingwarm/arm-thumb-pe/lib/ -isystem /mingwarm/arm-thumb-pe/include
> -O2 ) works... no
> configure: error: installation or configuration problem: C compiler
> cannot create executables.
Here you should know what is the difference between "compiler" in the
Windows-world and in the GCC world. Meanwhile toolchains like 'MSVC',
'BCC', 'Watcom C++' and even 'Cygwin' and 'MinGW' include a 'Standard
C-library', a plain vanilla 'GCC' never includes it, GCC includes only
the "compilers". So the previous error message is for the dummies who
don't know that the "C compiler never creates executables", and that
"the linker creates ececutables by linking the produced object with
the startup(s) and against the standard C libraries". The startups and
libraries are provided by the target system, not by GCC. In the MinGW
case the MS-provided 'MSVCRT.DLL' etc. provide the "Standard C
Libraries" and the MinGW-project has provided startups and import
libs for the MS-stuff...
The 'arm-pe' probably is for a no-opsys ARM-target using the Demon or
Angel monitor on the target board, just like the 'arm-elf' or 'arm-coff'
targets. And the Standard C library will be provided by the newlib
(currently in version '1.11.0') sources...
> d:\msys\1.0\mingwarm\arm-thumb-pe\bin\ld.exe: cannot open crt0.o: No
> such file or directory
> that is clear crt0 is not built. but i check my source package, found
> nothing about crt0.*. so the PROBLEM is:
> as LD.EXE for arm is built from binutils package, crt0.* should not be a
> part of gcc package, and LD.EXE need it for linking starting code to
> executable, WHAT ELSE SOURCE PACKAGE(S) I need to build that lib?
You need the 'newlib-1.11.0.tar.gz' from:
and you MUST build newlib BEFORE building libiberty and libstdc++-v3. OR
you MUST use the 'configure' option '--with-newlib' which disables all
the Standard C library checking, this tells that it is the 'newlib', so
nothing is unclear...
> And i think xgcc is a temporary compiling driver like gcc, but invoking
> some arm compiler tools make arm code instead, is that right?
The 'xgcc.exe' is the becoming 'arm-thumb-pe-gcc' and the 'cc1*.exe',
'*cpp*.exe' etc. are other parts of the ARM/PE-target GCC. When these
are ready and the 'gcc' subdirectory is ready, your 'GCC' is ready,
only the extra libraries included with the GCC-sources are undone. There
are targets like the 8-bit 'avr', 'h8300', 'ip2k', 'm68hc11' etc. for
which the 'libiberty' and 'libstdc++-v3' will not be built at all. As
told, they are 'extra' parts and basically don't belong to 'GCC' at all.
Only the stuff in 'gcc' belongs to 'GCC' ! This should be obvious, but
surprisingly often it is not...
If you write: "make all-gcc", ONLY 'GCC' will be built. And writing
"make install-gcc" installs ONLY 'GCC'. So please write these and then
configure, build and install 'newlib' as your Standard C library for
After "demanding" all this info, you probably tell us that your REAL
target is WinCE for PDAs or EPOC for cellphones. If so, why on earth
you couldn't tell it immediately ? It really isn't a big shame to
work with EPOC, maybe it is to work with WinCE, but just remember that
many persons here work with 'Windoze' (Aargh...), so maybe you really
don't "loose your faces", although you can think so ;-)