This is the mail archive of the crossgcc@sources.redhat.com 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]

Mips cross compiler for cygwin


Dan Kegel wrote:
> I've integrated the cygwin and macosx compatibility patches,
> so crosstool should build there now.  I've tried it on
> cygwin, still haven't tried on macosx.  Please give it a shot
> and let me know how it goes.
>
> This is not really a release of crosstool, just a snapshot for
> testing.

Thanks Dan. I already downloaded the crosstool, but I still have to try it
out. In fact, I'm first figuring out how to alter the scripts to fit my
purpose, and how I can use the files in contrib/newlib to make it compile
the newlib libraries.

In the meantime I continued my attempts to build the cross compiler
following the instructions by Bill Gatliff. For this build I'm using gcc
sources 3.3.3, binutils 2.14 and newlib 1.12.0. I'm able to compile the
binutils (well, I don't get any errors anyway), as well as the newlib
library and the bootstrap cross compiler. I created a directory gcc on the c
drive and put the gcc sources in a subdirectory gcc-sources, the binutils
sources in binutils-2.14 and the newlib sources in newlib-1.12.0. I made
four directories (again as subdirectories of c:\gcc) to perform the builds
in : build-gcc (for the bootstrap compiler), build-newlib, build-binutils
and build-gcc-final (for the actual cross compiler). I compiled the
different sources in this order :

from the directory build-binutils :
../binutils-2.14/configure --target=mipsel-elf --host=i686-pc-cygwin --build
=i686-pc-cygwin --prefix=/gcc-mips --with-gnu-as --with-gnu-ld
make all install
from the directory build-gcc :
../gcc-sources/configure --target=mipsel-elf --host=i686-pc-cygwin --build=i
686-pc-cygwin --prefix=/gcc-mips --with-gnu-as --with-gnu-ld --without-heade
rs --with-newlib -v
make all-gcc install-gcc
from the directory build-newlib :
../newlib-1.12.0/configure --target=mipsel-elf --host=i686-pc-cygwin --build
=i686-pc-cygwin --prefix=/gcc-mips --with-gnu-as --with-gnu-ld
make all install
from the directory build-gcc-final :
../gcc-sources/configure --target=mipsel-elf --host=i686-pc-cygwin --build=i
686-pc-cygwin --prefix=/gcc-mips --with-gnu-as --with-gnu-ld -v
make all install

Running this final make to build the actual cross compiler results in an
error while executing the following command :

/cygdrive/c/gcc/build-gcc-final/gcc/xgcc -shared-libgcc -B/cygdrive/c/gcc/bu
ild-gcc-final/gcc/ -nostdinc++ -L/cygdrive/c/gcc/build-gcc-final/mipsel-elf/
soft-float/libstdc++-v3/src -L/cygdrive/c/gcc/build-gcc-final/mipsel-elf/sof
t-float/libstdc++-v3/src/.libs -B/gcc-mips/mipsel-elf/bin/ -B/gcc-mips/mipse
l-elf/lib/ -isystem
/gcc-mips/mipsel-elf/include -msoft-float -I../../../../../gcc-sources/libst
dc++-v3/../gcc -I../../../../../gcc-sources/libstdc++-v3/../include -I/cygdr
ive/c/gcc/build-gcc-final/mipsel-elf/soft-float/libstdc++-v3/include/mipsel-
elf -I/cygdrive/c/gcc/build-gcc-final/mipsel-elf/soft-float/libstdc++-v3/inc
lude -I../../../../../gcc-sources/libstdc++-v3/libsupc++ -g -O2 -msoft-float
 -fno-implicit-templates -Wall -Wno-format -W -Wwrite-strings -fdiagnostics-
show-location=once -c
../../../../../gcc-sources/libstdc++-v3/libsupc++/eh_alloc.cc -o eh_alloc.o

The resulting error is :

In file included from
../../../../../gcc-sources/libstdc++-v3/libsupc++/eh_alloc
.cc:33:
/cygdrive/c/gcc/build-gcc-final/mipsel-elf/soft-float/libstdc++-v3/include/c
stdl
ib:86: error: `
   div_t' not declared
/cygdrive/c/gcc/build-gcc-final/mipsel-elf/soft-float/libstdc++-v3/include/c
stdl
ib:87: error: `
   ldiv_t' not declared
/cygdrive/c/gcc/build-gcc-final/mipsel-elf/soft-float/libstdc++-v3/include/c
stdl
ib:97: error: `
   div' not declared
/cygdrive/c/gcc/build-gcc-final/mipsel-elf/soft-float/libstdc++-v3/include/c
stdl
ib:102: error: `
   ldiv' not declared
/cygdrive/c/gcc/build-gcc-final/mipsel-elf/soft-float/libstdc++-v3/include/c
stdl
ib:104: error: `
   mblen' not declared
/cygdrive/c/gcc/build-gcc-final/mipsel-elf/soft-float/libstdc++-v3/include/c
stdl
ib:105: error: `
   mbstowcs' not declared
/cygdrive/c/gcc/build-gcc-final/mipsel-elf/soft-float/libstdc++-v3/include/c
stdl
ib:106: error: `
   mbtowc' not declared
/cygdrive/c/gcc/build-gcc-final/mipsel-elf/soft-float/libstdc++-v3/include/c
stdl
ib:115: error: `
   wcstombs' not declared
/cygdrive/c/gcc/build-gcc-final/mipsel-elf/soft-float/libstdc++-v3/include/c
stdl
ib:116: error: `
   wctomb' not declared
/cygdrive/c/gcc/build-gcc-final/mipsel-elf/soft-float/libstdc++-v3/include/c
stdl
ib:122: error: syntax
   error before `(' token
make[6]: *** [eh_alloc.lo] Error 1
make[6]: Leaving directory
`/cygdrive/c/gcc/build-gcc-final/mipsel-elf/soft-floa
t/libstdc++-v3/libsupc++'
make[5]: *** [all-recursive] Error 1
make[5]: Leaving directory
`/cygdrive/c/gcc/build-gcc-final/mipsel-elf/soft-floa
t/libstdc++-v3'
make[4]: *** [all-recursive-am] Error 2
make[4]: Leaving directory
`/cygdrive/c/gcc/build-gcc-final/mipsel-elf/soft-floa
t/libstdc++-v3'
make[3]: *** [multi-do] Error 1
make[3]: Leaving directory
`/cygdrive/c/gcc/build-gcc-final/mipsel-elf/libstdc++
-v3'
make[2]: *** [all-multi] Error 2
make[2]: Leaving directory
`/cygdrive/c/gcc/build-gcc-final/mipsel-elf/libstdc++
-v3'
make[1]: *** [all-recursive-am] Error 2
make[1]: Leaving directory
`/cygdrive/c/gcc/build-gcc-final/mipsel-elf/libstdc++
-v3'
make: *** [all-target-libstdc++-v3] Error 2

To attempt a little debugging I concentrated on the first error : 'div_t'
not declared. I found some stdlib.h files scattered over the different
directories in which this define could be found. The stdlib.h file used by
this last command however, was the stdlib.h file in the directory
c:\gcc\build-gcc-final\gcc\include which of course did not contain a
declaration of div_t.

Does anyone have an idea of what goes wrong?

Harry Kaes.








------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com


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