EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

Building gcc-3.3.1-3 in Cygwin 1.5.9-1 - help!

Started by Dennis C May 4, 2004
I have built binutils-20040312-1 on Cygwin and am trying to build
gcc-3.3.1-3, but I am getting the error below. Can someone give a
pointer why it is breaking?

What I did was:
  181  ../gcc-3.3.1-3/configure --target=arm-unknown-coff
--prefix=/usr/local/ -
-exec_prefix=/usr/local --without-fp --with-gnu-as --with-gnu-ld
  182  make all

Thanks for your help


/usr/local/gcc/gcc/xgcc -B/usr/local/gcc/gcc/
-B/usr/local/arm-unknown-coff/bin/
 -B/usr/local/arm-unknown-coff/lib/ -isystem
/usr/local/arm-unknown-coff/include
 -O2 -DIN_GCC -DCROSS_COMPILE   -W -Wall -Wwrite-strings
-Wstrict-prototypes -Wm
issing-prototypes -isystem ./include  -I. -I. -I../../gcc-3.3.1-3/gcc
-I../../gc
c-3.3.1-3/gcc/. -I../../gcc-3.3.1-3/gcc/config
-I../../gcc-3.3.1-3/gcc/../includ
e  -g0 -finhibit-size-directive -fno-inline-functions -fno-exceptions
-fno-zero-
initialized-in-bss  \
  -Dinhibit_libc -c ../../gcc-3.3.1-3/gcc/crtstuff.c -DCRT_BEGIN \
  -o crtbegin.o
../../gcc-3.3.1-3/gcc/crtstuff.c:420:2: #error "What are you doing
with crtstuff
.c, then?"
make[3]: *** [crtbegin.o] Error 1
make[3]: Leaving directory `/usr/local/gcc/gcc'
make[2]: *** [crtbegin.o] Error 2
make[2]: Leaving directory `/usr/local/gcc/gcc'
make[1]: *** [stmp-multilib] Error 2
make[1]: Leaving directory `/usr/local/gcc/gcc'
make: *** [all-gcc] Error 2
[Will you *please* start following Netiquette by restricting
Followup-To: of crossposts to a single group?  I've done it for you
for the third time in a row now...]

In comp.arch.embedded Dennis C <dchou4u@hotmail.com> wrote:
> I have built binutils-20040312-1 on Cygwin and am trying to build > gcc-3.3.1-3, but I am getting the error below. Can someone give a > pointer why it is breaking?
It is breaking itself deliberately, to tell you that some aspect of how you're trying to build GCC doesn't make sense.
> ../../gcc-3.3.1-3/gcc/crtstuff.c:420:2: #error "What are you doing > with crtstuff.c, then?"
You'll almost certainly find more explanations in crtstuff.c close to line 420 which contains this #error statement. E.g. it could be trying to tell you that the 'unknown' in the middle of your target name is ultimately unacceptable, because GCC can't understand how to set up a C RunTime (CRT) environment on an ARM platform of completely unspecified nature. "Use the source, Luke". And don't be afraid to Google for the text of that #error. -- Hans-Bernhard Broeker (broeker@physik.rwth-aachen.de) Even if all the snow were burnt, ashes would remain.
Thanks.

I looked at line 420, and it looks like this:

#else /* ! INIT_SECTION_ASM_OP && ! HAS_INIT_SECTION */
#error "What are you doing with crtstuff.c, then?"
#endif

I will try to use arm-9-coff next to see if it helps.

Thanks again for your help!

Hans-Bernhard Broeker <broeker@physik.rwth-aachen.de> wrote in message news:<c7adac$1h8bn$2@ID-231750.news.uni-berlin.de>...
> [Will you *please* start following Netiquette by restricting > Followup-To: of crossposts to a single group? I've done it for you > for the third time in a row now...] > > In comp.arch.embedded Dennis C <dchou4u@hotmail.com> wrote: > > I have built binutils-20040312-1 on Cygwin and am trying to build > > gcc-3.3.1-3, but I am getting the error below. Can someone give a > > pointer why it is breaking? > > It is breaking itself deliberately, to tell you that some aspect of > how you're trying to build GCC doesn't make sense. > > > ../../gcc-3.3.1-3/gcc/crtstuff.c:420:2: #error "What are you doing > > with crtstuff.c, then?" > > You'll almost certainly find more explanations in crtstuff.c close to > line 420 which contains this #error statement. > > E.g. it could be trying to tell you that the 'unknown' in the middle > of your target name is ultimately unacceptable, because GCC can't > understand how to set up a C RunTime (CRT) environment on an ARM > platform of completely unspecified nature. > > "Use the source, Luke". And don't be afraid to Google for the text of > that #error.
> I have built binutils-20040312-1 on Cygwin and am trying to build > gcc-3.3.1-3, but I am getting the error below. Can someone give a > pointer why it is breaking? > > What I did was: > 181 ../gcc-3.3.1-3/configure --target=arm-unknown-coff > --prefix=/usr/local/ - > -exec_prefix=/usr/local --without-fp --with-gnu-as --with-gnu-ld > 182 make all > > Thanks for your help > > > /usr/local/gcc/gcc/xgcc -B/usr/local/gcc/gcc/ > -B/usr/local/arm-unknown-coff/bin/ > -B/usr/local/arm-unknown-coff/lib/ -isystem > /usr/local/arm-unknown-coff/include > -O2 -DIN_GCC -DCROSS_COMPILE -W -Wall -Wwrite-strings > -Wstrict-prototypes -Wm > issing-prototypes -isystem ./include -I. -I. -I../../gcc-3.3.1-3/gcc > -I../../gc > c-3.3.1-3/gcc/. -I../../gcc-3.3.1-3/gcc/config > -I../../gcc-3.3.1-3/gcc/../includ > e -g0 -finhibit-size-directive -fno-inline-functions -fno-exceptions > -fno-zero- > initialized-in-bss \ > -Dinhibit_libc -c ../../gcc-3.3.1-3/gcc/crtstuff.c -DCRT_BEGIN \ > -o crtbegin.o > ../../gcc-3.3.1-3/gcc/crtstuff.c:420:2: #error "What are you doing > with crtstuff > .c, then?" > make[3]: *** [crtbegin.o] Error 1 > make[3]: Leaving directory `/usr/local/gcc/gcc' > make[2]: *** [crtbegin.o] Error 2 > make[2]: Leaving directory `/usr/local/gcc/gcc' > make[1]: *** [stmp-multilib] Error 2 > make[1]: Leaving directory `/usr/local/gcc/gcc' > make: *** [all-gcc] Error 2
Hi! First of all, you probably don't want to use the arm-unknown-coff target. The only reason for using the coff target would be to develop code for WinCE in which case the OS is not unknown. I would recommend using the arm-elf target. The reason is that in COFF format GCC can't remove unreferenced functions and/or data from your code, so your binary image will be unnecessarily large. Next, you will probably need a runtime library otherwise you won't be able to link your C code together. I suggest using the Newlib CRT unless you have some known problems with it. There's also a configuration issue with GCC in that it will try to compile collect2 (and will fail it) even though it's not required. You might also want to take a look at my page, where you can find a pre-compiled arm cross-compiler for Windows (for MinGW, actually). It's newer than the one you're trying to compile and so it contains some important bug-fixes for the ARM target. http://andras.tantos.homedns.org/work/gcc/arm.htm -- Regards, Andras Tantos <http://andrast.tantos.homedns.org>
Hi Dennis,

I had the same problem with the sh-coff/sh-elf targets!

Don't use the sources delivered by Cygwin !!
Download the sources form any GCC mirror sites
and the build runs well just as the bins work fin.

regards EW


"Dennis C" <dchou4u@hotmail.com> schrieb im Newsbeitrag
news:65ee8e47.0405041601.565f82c8@posting.google.com...
> I have built binutils-20040312-1 on Cygwin and am trying to build > gcc-3.3.1-3, but I am getting the error below. Can someone give a > pointer why it is breaking? > > What I did was: > 181 ../gcc-3.3.1-3/configure --target=arm-unknown-coff > --prefix=/usr/local/ - > -exec_prefix=/usr/local --without-fp --with-gnu-as --with-gnu-ld > 182 make all > > Thanks for your help > > > /usr/local/gcc/gcc/xgcc -B/usr/local/gcc/gcc/ > -B/usr/local/arm-unknown-coff/bin/ > -B/usr/local/arm-unknown-coff/lib/ -isystem > /usr/local/arm-unknown-coff/include > -O2 -DIN_GCC -DCROSS_COMPILE -W -Wall -Wwrite-strings > -Wstrict-prototypes -Wm > issing-prototypes -isystem ./include -I. -I. -I../../gcc-3.3.1-3/gcc > -I../../gc > c-3.3.1-3/gcc/. -I../../gcc-3.3.1-3/gcc/config > -I../../gcc-3.3.1-3/gcc/../includ > e -g0 -finhibit-size-directive -fno-inline-functions -fno-exceptions > -fno-zero- > initialized-in-bss \ > -Dinhibit_libc -c ../../gcc-3.3.1-3/gcc/crtstuff.c -DCRT_BEGIN \ > -o crtbegin.o > ../../gcc-3.3.1-3/gcc/crtstuff.c:420:2: #error "What are you doing > with crtstuff > .c, then?" > make[3]: *** [crtbegin.o] Error 1 > make[3]: Leaving directory `/usr/local/gcc/gcc' > make[2]: *** [crtbegin.o] Error 2 > make[2]: Leaving directory `/usr/local/gcc/gcc' > make[1]: *** [stmp-multilib] Error 2 > make[1]: Leaving directory `/usr/local/gcc/gcc' > make: *** [all-gcc] Error 2

The 2024 Embedded Online Conference