1/1
Re: Problems building gcc with or32-rtems target
by Unknown on Jan 5, 2004 |
Not available! | ||
Hello,
I understand that it was suggested that I provide more detail. Here it is:
I started by extracting the tool trees from cvs at opencores.org:
or1k/binutils:
or1k/gcc-3.1
or1k/gcc-3.2.3 (wasn't sure which gcc tree to use; pulled them both)
or1k/newlib
I had not found any 0R32-rtems build documentation other than
'binutils/README.or' so i started
there. I ran 'configure as follows:
+ /bin/sh ../binutils/configure --prefix=/tools/local.or32-rtems
--target=or32-rtems --program-prefix=or32-rtems-
Configuring for a sparc-sun-solaris2.7 host.
Created "Makefile" in
/sd/c0t8d0/opt1/web/sites/www.opencores.org/openrisc_1000/cvs/or1k/binutils.or32-rtems
using "mh-frag"
...
This is a similar set of arguments that were used when I built RTEMS for
the M68K family using the rtems.com
gnu tool source tree early last week. The configure step worked OK and
I was subsequently able to make
and install the tools. I then moved on to GCC.
I started with the gcc-3.1 source tree. I 1st setup a minimal PATH
environment that included my new or32-binutils
tools in '/tools/local.or32-rtems'. I then ran 'configure as follows:
39 + /bin/sh ../gcc-3.1/configure
--prefix=/tools/local.or32-rtems --target=or32-rtems
--program-prefix=or32-rtems- --with-gnu-
39 as --with-gnu-ld --with-newlib --verbose --enable-threads
--enable-languages=c,c++ --disable-nls
40 Configuring for a sparc-sun-solaris2.7 host.
41 *** This configuration is not supported in the following
subdirectories:
42 target-libffi target-boehm-gc target-zlib
target-libjava target-libchill target-libf2c zlib fastjar target-libobjc
43 (Any other directories should still work fine.)
44 Created "Makefile" in
/sd/c0t8d0/opt1/web/sites/www.opencores.org/openrisc_1000/cvs/or1k/gcc-3.1-or32-rtems
using "mh-frag"
45 Configuring libiberty...
...
configure ran OK. I then ran 'make'. It built the cross-gcc (xgcc)
and died during a library build:
4496 /bin/sh ../libtool --tag CXX --tag disable-shared
--mode=compile
/sd/c0t8d0/opt1/web/sites/www.opencores.org/openrisc_1000/c
4496 vs/or1k/gcc-3.1-or32-rtems/gcc/xgcc
-B/sd/c0t8d0/opt1/web/sites/www.opencores.org/openrisc_1000/cvs/or1k/gcc-3.1-or32-rtems/
4496 gcc/ -nostdinc++
-L/sd/c0t8d0/opt1/web/sites/www.opencores.org/openrisc_1000/cvs/or1k/gcc-3.1-or32-rtems/or32-rtems/libstdc
4496 ++-v3/src
-L/sd/c0t8d0/opt1/web/sites/www.opencores.org/openrisc_1000/cvs/or1k/gcc-3.1-or32-rtems/or32-rtems/libstdc++-v3/sr
4496 c/.libs -nostdinc
-B/sd/c0t8d0/opt1/web/sites/www.opencores.org/openrisc_1000/cvs/or1k/gcc-3.1-or32-rtems/or32-rtems/newlib/
4497 -isystem
/sd/c0t8d0/opt1/web/sites/www.opencores.org/openrisc_1000/cvs/or1k/gcc-3.1-or32-rtems/or32-rtems/newlib/targ-inclu
4497 de -isystem
/sd/c0t8d0/opt1/web/sites/www.opencores.org/openrisc_1000/cvs/or1k/gcc-3.1/newlib/libc/include
-B/tools/local.or
4496 32-rtems/or32-rtems/bin/
-B/tools/local.or32-rtems/or32-rtems/lib/ -isystem
/tools/local.or32-rtems/or32-rtems/include -I../
4496 ../../../gcc-3.1/libstdc++-v3/../gcc
-I../../../../gcc-3.1/libstdc++-v3/../include
-I/sd/c0t8d0/opt1/web/sites/www.opencores
4497
.org/openrisc_1000/cvs/or1k/gcc-3.1-or32-rtems/or32-rtems/libstdc++-v3/include/or32-rtems
-I/sd/c0t8d0/opt1/web/sites/www.op
4497
encores.org/openrisc_1000/cvs/or1k/gcc-3.1-or32-rtems/or32-rtems/libstdc++-v3/include
-I../../../../gcc-3.1/libstdc++-v3/lib
4497 supc++ -g -O2 -fno-implicit-templates -Wall -Wno-format
-W -Wwrite-strings -Winline -fdiagnostics-show-location=once -g
4497 -c ../../../../gcc-3.1/libstdc++-v3/libsupc++/eh_catch.cc
4498
/sd/c0t8d0/opt1/web/sites/www.opencores.org/openrisc_1000/cvs/or1k/gcc-3.1-or32-rtems/gcc/xgcc
-B/sd/c0t8d0/opt1/web/sites/w
4498
ww.opencores.org/openrisc_1000/cvs/or1k/gcc-3.1-or32-rtems/gcc/
-nostdinc++ -L/sd/c0t8d0/opt1/web/sites/www.opencores.org/op
4498
enrisc_1000/cvs/or1k/gcc-3.1-or32-rtems/or32-rtems/libstdc++-v3/src
-L/sd/c0t8d0/opt1/web/sites/www.opencores.org/openrisc_1
4498
000/cvs/or1k/gcc-3.1-or32-rtems/or32-rtems/libstdc++-v3/src/.libs
-nostdinc -B/sd/c0t8d0/opt1/web/sites/www.opencores.org/op
4499 enrisc_1000/cvs/or1k/gcc-3.1-or32-rtems/or32-rtems/newlib/
-isystem /sd/c0t8d0/opt1/web/sites/www.opencores.org/openrisc_100
4499 0/cvs/or1k/gcc-3.1-or32-rtems/or32-rtems/newlib/targ-include
-isystem /sd/c0t8d0/opt1/web/sites/www.opencores.org/openrisc_1
4499 000/cvs/or1k/gcc-3.1/newlib/libc/include
-B/tools/local.or32-rtems/or32-rtems/bin/
-B/tools/local.or32-rtems/or32-rtems/lib/
4498 -isystem /tools/local.or32-rtems/or32-rtems/include
-I../../../../gcc-3.1/libstdc++-v3/../gcc -I../../../../gcc-3.1/libstdc
4498 ++-v3/../include
-I/sd/c0t8d0/opt1/web/sites/www.opencores.org/openrisc_1000/cvs/or1k/gcc-3.1-or32-rtems/or32-rtems/libstdc+
4499 +-v3/include/or32-rtems
-I/sd/c0t8d0/opt1/web/sites/www.opencores.org/openrisc_1000/cvs/or1k/gcc-3.1-or32-rtems/or32-rtems/l
4499 ibstdc++-v3/include
-I../../../../gcc-3.1/libstdc++-v3/libsupc++ -g -O2
-fno-implicit-templates -Wall -Wno-format -W -Wwrite
4499 -strings -Winline -fdiagnostics-show-location=once -g -c
../../../../gcc-3.1/libstdc++-v3/libsupc++/eh_catch.cc -o eh_catch.
4499 o
4500 ../../../../gcc-3.1/libstdc++-v3/libsupc++/eh_catch.cc: In
function `bool
4501 std::uncaught_exception()':
4502 ../../../../gcc-3.1/libstdc++-v3/libsupc++/eh_catch.cc:105:
Internal compiler
4503 error in emit_move_insn, at expr.c:2746
4504 Please submit a full bug report,
4505 with preprocessed source if appropriate.
4506 See http://www.gnu.org/software/gcc/bugs.html> for
instructions.
4507 make[3]: *** [eh_catch.lo] Error 1
4508 make[3]: Leaving directory
`/sd/c0t8d0/opt1/web/sites/www.opencores.org/openrisc_1000/cvs/or1k/gcc-3.1-or32-rtems/or32-rtems
4508 /libstdc++-v3/libsupc++'
4509 make[2]: *** [all-recursive] Error 1
4510 make[2]: Leaving directory
`/sd/c0t8d0/opt1/web/sites/www.opencores.org/openrisc_1000/cvs/or1k/gcc-3.1-or32-rtems/or32-rtems
4510 /libstdc++-v3'
4511 make[1]: *** [all-recursive-am] Error 2
4512 make[1]: Leaving directory
`/sd/c0t8d0/opt1/web/sites/www.opencores.org/openrisc_1000/cvs/or1k/gcc-3.1-or32-rtems/or32-rtems
4512 /libstdc++-v3'
4513 make: *** [all-target-libstdc++-v3] Error 2
This looked fairly serious (Internal compiler error) so I then decided
to try to build gcc-3.2.3 for a 'or32-rtems' target.
I started by running configure (with or32-rtems-as and or32-rtems-ld in
my path) as follows:
+ /bin/sh ../gcc-3.2.3/configure --prefix=/tools/local.or32-rtems
--target=or32-rtems --program-prefix=or32-rtems- --with-gnu-as --w
ith-gnu-ld --with-newlib --verbose --enable-threads
--enable-languages=c,c++ --disable-nls
Configuring for a sparc-sun-solaris2.7 host.
*** This configuration is not supported in the following subdirectories:
target-boehm-gc
(Any other directories should still work fine.)
Created "Makefile" in
/sd/c0t8d0/opt1/web/sites/www.opencores.org/openrisc_1000/cvs/or1k/gcc-3.2.3.or32-rtems
using "mh-frag"
Configuring gcc...
creating cache ../config.cache
...
Configure seemed to run OK.
I then ran 'make':
44 + make
45 make[1]: Entering directory
`/sd/c0t8d0/opt1/web/sites/www.opencores.org/openrisc_1000/cvs/or1k/gcc-3.2.3.or32-rtems/fastjar
45 '
46 /tools/local/bin/gcc -DHAVE_CONFIG_H -I.
-I../../gcc-3.2.3/fastjar -I. -I. -I../../gcc-3.2.3/fastjar
-I../../gcc-3.2.3/fastj
46 ar/../zlib -I../../gcc-3.2.3/fastjar/../include -W -Wall
-pedantic -Wstrict-prototypes -Wmissing-prototypes -Wwrite-string
46 s -g -O2 -c ../../gcc-3.2.3/fastjar/jartool.c
47 ../../gcc-3.2.3/fastjar/jartool.c:195: zlib.h: No such file
or directory
48 ../../gcc-3.2.3/fastjar/jartool.c:234: getopt.h: No such
file or directory
49 make[1]: *** [jartool.o] Error 1
50 make[1]: Leaving directory
`/sd/c0t8d0/opt1/web/sites/www.opencores.org/openrisc_1000/cvs/or1k/gcc-3.2.3.or32-rtems/fastjar'
51 make: *** [all-fastjar] Error 2
As you can see this died right away.
If there is a some document that describes an RTEMS build procedure that
is known to work I would
like to know about it.
Thanks much.
Paul
---------------------------------------------------------
P Caaret wrote:
Hello,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.opencores.org/forums/openrisc/attachments/20040104/e5a00824/attachment-0001.htm
I have been able to use the sources from the opencores.org site to build a Solaris-7 version of binutils for the or32-rtems target. However, I have not been able to get through a build of gcc-3.1 or gcc-3.2.3 for the or32-rtems target using the sources on the opencores.org site. The rtems.com site has a separate tool source tree and with those sources I cannot build anything for a or32-rtems target. The rtems community pointed me here for guidance. I would appreciate it if someone would point me to a build procedure for gcc and RTEMS. Is the OR32 target still being supported at all? If so, what OS's are supported? Thanks. Paul |
Re: Problems building gcc with or32-rtems target
by Unknown on Jan 5, 2004 |
Not available! | ||
* P Caaret (opencores@usd.com) wrote:
Hello,
I understand that it was suggested that I provide more detail. Here it is: [snip]
I was subsequently able to make
and install the tools. I then moved on to GCC. so far so good ;)
I started with the gcc-3.1 source tree. I 1st setup a minimal PATH
environment that included my new or32-binutils
tools in '/tools/local.or32-rtems'. I then ran 'configure as follows:
39 + /bin/sh ../gcc-3.1/configure
--prefix=/tools/local.or32-rtems --target=or32-rtems
--program-prefix=or32-rtems- --with-gnu-
39 as --with-gnu-ld --with-newlib --verbose --enable-threads
--enable-languages=c,c++ --disable-nls
40 Configuring for a sparc-sun-solaris2.7 host.
41 *** This configuration is not supported in the following
subdirectories:
42 target-libffi target-boehm-gc target-zlib
target-libjava target-libchill target-libf2c zlib fastjar target-libobjc
43 (Any other directories should still work fine.)
44 Created "Makefile" in
configure ran OK. I then ran 'make'. It built the cross-gcc (xgcc)
and died during a library build:
Internal compiler
4503 error in emit_move_insn, at expr.c:2746
4504 Please submit a full bug report,
4505 with preprocessed source if appropriate.
4506 See http://www.gnu.org/software/gcc/bugs.html> for
ok, if i remember correctly this bug is fixed in gcc-3.2.3...
This looked fairly serious (Internal compiler error) so I then decided
to try to build gcc-3.2.3 for a 'or32-rtems' target. I started by running configure (with or32-rtems-as and or32-rtems-ld in my path) as follows: + /bin/sh ../gcc-3.2.3/configure --prefix=/tools/local.or32-rtems --target=or32-rtems --program-prefix=or32-rtems- --with-gnu-as --w ith-gnu-ld --with-newlib --verbose --enable-threads --enable-languages=c,c++ --disable-nls Configuring for a sparc-sun-solaris2.7 host. *** This configuration is not supported in the following subdirectories: target-boehm-gc (Any other directories should still work fine.) Created "Makefile" in /sd/c0t8d0/opt1/web/sites/www.opencores.org/openrisc_1000/cvs/or1k/gcc-3.2.3.or32-rtems using "mh-frag" Configuring gcc... creating cache ../config.cache ... Configure seemed to run OK. well actually it didn't... read on...
I then ran 'make':
44 + make 45 make[1]: Entering directory `/sd/c0t8d0/opt1/web/sites/www.opencores.org/openrisc_1000/cvs/or1k/gcc-3.2.3.or32-rtems/fastjar 45 ' 46 /tools/local/bin/gcc -DHAVE_CONFIG_H -I. -I../../gcc-3.2.3/fastjar -I. -I. -I../../gcc-3.2.3/fastjar -I../../gcc-3.2.3/fastj 46 ar/../zlib -I../../gcc-3.2.3/fastjar/../include -W -Wall -pedantic -Wstrict-prototypes -Wmissing-prototypes -Wwrite-string 46 s -g -O2 -c ../../gcc-3.2.3/fastjar/jartool.c 47 ../../gcc-3.2.3/fastjar/jartool.c:195: zlib.h: No such file or directory 48 ../../gcc-3.2.3/fastjar/jartool.c:234: getopt.h: No such file or directory 49 make[1]: *** [jartool.o] Error 1 50 make[1]: Leaving directory `/sd/c0t8d0/opt1/web/sites/www.opencores.org/openrisc_1000/cvs/or1k/gcc-3.2.3.or32-rtems/fastjar' 51 make: *** [all-fastjar] Error 2 ok i think i see the problem. the rtems target configuration definition somewhere in gnu autoconfigure scripts is wrong i guess. the 'fastjar' target (and many others) should not be supported by your configuration (and thus should not even start to build). just check the gcc-3.1's configure output: 40 Configuring for a sparc-sun-solaris2.7 host. 41 *** This configuration is not supported in the following subdirectories: 42 target-libffi target-boehm-gc target-zlib target-libjava target-libchill target-libf2c zlib fastjar target-libobjc 43 (Any other directories should still work fine.) 44 Created "Makefile" in this should be pretty much the same for gcc-3.2.3 and it is on linux with (for example or32-elf target i'm looking at this moment)
As you can see this died right away.
If there is a some document that describes an RTEMS build procedure that is known to work I would like to know about it. i think you are on right track. if i remember correctly Heiko (I think) did some changes for rtems target configuration a few weeks ago. maybe the problem was introduced then, maybe it never worked for solaris, but i would certainly start looking in gnu autoconfig files. when you find the problem, please post a patch to the list. best regards, p. |
Re: Problems building gcc with or32-rtems target
by Unknown on Jan 5, 2004 |
Not available! | ||
One more hint, remove the C++ target. You need to build the C target first. And if I am not mistaken (don't shoot me if I am) the C++ target doesn't build at all. richard
-----Original Message-----
From: openrisc-bounces@opencores.org [mailto:openrisc-
bounces@opencores.org] On Behalf Of Matjaz Breskvar
Sent: Monday, January 05, 2004 4:11 AM
To: List about OpenRISC cores, free microprocessors
Subject: Re: [openrisc] Re: Problems building gcc with or32-rtems
target
* P Caaret (opencores@usd.com) wrote:
> Hello,
> I understand that it was suggested that I provide more detail. Here it
is:
[snip]
> I was subsequently able to make
> and install the tools. I then moved on to GCC. so far so good ;)
> I started with the gcc-3.1 source tree. I 1st setup a minimal PATH
> environment that included my new or32-binutils > tools in '/tools/local.or32-rtems'. I then ran 'configure as follows:
>
> 39 + /bin/sh ../gcc-3.1/configure > --prefix=/tools/local.or32-rtems --target=or32-rtems > --program-prefix=or32-rtems- --with-gnu- > 39 as --with-gnu-ld --with-newlib --verbose --enable-threads > --enable-languages=c,c++ --disable-nls > 40 Configuring for a sparc-sun-solaris2.7 host. > 41 *** This configuration is not supported in the following > subdirectories: > 42 target-libffi target-boehm-gc target-zlib > target-libjava target-libchill target-libf2c zlib fastjar target- libobjc
> 43 (Any other directories should still work fine.)
> 44 Created "Makefile" in > > configure ran OK. I then ran 'make'. It built the cross-gcc (xgcc)
> and died during a library build:
>
> Internal compiler
> 4503 error in emit_move_insn, at expr.c:2746
> 4504 Please submit a full bug report,
> 4505 with preprocessed source if appropriate.
> 4506 See http://www.gnu.org/software/gcc/bugs.html> for
ok, if i remember correctly this bug is fixed in gcc-3.2.3...
> This looked fairly serious (Internal compiler error) so I then
decided
> to try to build gcc-3.2.3 for a 'or32-rtems' target.
> > I started by running configure (with or32-rtems-as and or32-rtems-ld in
> my path) as follows:
> > + /bin/sh ../gcc-3.2.3/configure --prefix=/tools/local.or32-rtems > --target=or32-rtems --program-prefix=or32-rtems- --with-gnu-as --w
> ith-gnu-ld --with-newlib --verbose --enable-threads
> --enable-languages=c,c++ --disable-nls > Configuring for a sparc-sun-solaris2.7 host. > *** This configuration is not supported in the following subdirectories:
> target-boehm-gc
> (Any other directories should still work fine.) > Created "Makefile" in > /sd/c0t8d0/opt1/web/sites/www.opencores.org/openrisc_1000/cvs/or1k/gcc-
3.2.3.or32-rtems
> using "mh-frag"
> Configuring gcc... > creating cache ../config.cache > ... > > Configure seemed to run OK. well actually it didn't... read on...
> I then ran 'make':
> > 44 + make > 45 make[1]: Entering directory > `/sd/c0t8d0/opt1/web/sites/www.opencores.org/openrisc_1000/cvs/or1k/gcc-
3.2.3.or32-rtems/fastjar
> 45 '
> 46 /tools/local/bin/gcc -DHAVE_CONFIG_H -I. > -I../../gcc-3.2.3/fastjar -I. -I. -I../../gcc-3.2.3/fastjar > -I../../gcc-3.2.3/fastj > 46 ar/../zlib -I../../gcc-3.2.3/fastjar/../include -W -Wall
> -pedantic -Wstrict-prototypes -Wmissing-prototypes -Wwrite-string
> 46 s -g -O2 -c ../../gcc-3.2.3/fastjar/jartool.c > 47 ../../gcc-3.2.3/fastjar/jartool.c:195: zlib.h: No such file
> or directory
> 48 ../../gcc-3.2.3/fastjar/jartool.c:234: getopt.h: No such > file or directory > 49 make[1]: *** [jartool.o] Error 1 > 50 make[1]: Leaving directory > `/sd/c0t8d0/opt1/web/sites/www.opencores.org/openrisc_1000/cvs/or1k/gcc-
3.2.3.or32-rtems/fastjar'
> 51 make: *** [all-fastjar] Error 2
ok i think i see the problem. the rtems target configuration definition somewhere in gnu autoconfigure scripts is wrong i guess. the 'fastjar' target (and many others) should not be supported by
your configuration (and thus should not even start to build).
just check the gcc-3.1's configure output: 40 Configuring for a sparc-sun-solaris2.7 host. 41 *** This configuration is not supported in the following subdirectories: 42 target-libffi target-boehm-gc target-zlib target-libjava target-libchill target-libf2c zlib fastjar target- libobjc 43 (Any other directories should still work fine.) 44 Created "Makefile" in this should be pretty much the same for gcc-3.2.3 and it is on linux with (for example or32-elf target i'm looking at this moment)
> As you can see this died right away.
> > If there is a some document that describes an RTEMS build procedure that
> is known to work I would
i think you are on right track. if i remember correctly Heiko (I
think) did some changes for rtems target configuration a few weeks
ago. maybe the problem was introduced then, maybe it never
worked for solaris, but i would certainly start looking in gnu
autoconfig files.
when you find the problem, please post a patch to the list.
best regards,
p.
_______________________________________________
http://www.opencores.org/mailman/listinfo/openrisc
> like to know about it. |
Re: Problems building gcc with or32-rtems target
by Unknown on Jan 5, 2004 |
Not available! | ||
* Richard Herveille (richard@asics.ws) wrote:
One more hint, remove the C++ target. You need to build the C target first. And if I am not mistaken (don't shoot me if I am) the C++ target doesn't build at all. it builds actually, ;). there just some errors in the end, but you can just install it and you get g++,... (it's not the right way(tm) but it works) regards, p. |
1/1