Subject: gcc 2.6.0 generation fails..

From: [email-masked] (Tero Manninen)

Hi there,

I have been trying (at a very low priority) upgrade my old gcc/g++
to version 2.6.0. The configuration and first pass of make seems
to go quite well until in comes to a point where newly generated
compiler is first used..

I configured the gcc by a command
./configure --prefix=/usr/gnu --target=m68k-cbm-netbsd
The only change that I made to configuration files before
that was to add "-Damiga" to CPP_PREDEFINES macro.

The compilation went fine until this point..

rm -f include/limits.h
cp xlimits.h include/limits.h
chmod a+r include/limits.h
rm -f include/README
cp ./README-fixinc include/README
chmod a+r include/README
touch stmp-int-hdrs
./xgcc -B./  -DIN_GCC   -g -I./include    -DNO_MEM -DNO_LONG_DOUBLE_IO -O0 -I. -c ./enquire.c

###
Here I have a more detailed output of the previous command..
###

nix@fructus /home/src/gnu/gcc-2.6.0> ./xgcc -v -B./ -DIN_GCC -g -I./include -DNO_MEM -DNO_LONG_DOU
BLE_IO -O0 -I. -c ./enquire.c
Reading specs from ./specs
gcc version 2.6.0
 ./cpp -lang-c -v -I./include -I. -isystem ./include -undef -D__GNUC__=2 -D__GNUC_MINOR__=6 -Damiga -Dunix -Dm68k -Dmc68000 -Dmc68020 -D__NetBSD__ -D__amiga__ -D__unix__ -D__m68k__ -D__mc68000__ -D__mc68020__ -D__NetBSD__ -D__amiga -D__unix -D__m68k -D__mc68000 -D__mc68020 -Asystem(unix) -Asystem(NetBSD) -Acpu(m68k) -Amachine(m68k) -g -D__HAVE_68881__ -D__HAVE_FPU__ -DIN_GCC -DNO_MEM -DNO_LONG_DOUBLE_IO ./enquire.c /var/tmp/cc009006.i
GNU CPP version 2.6.0 (68k, MIT syntax)
#include "..." search starts here:
#include <...> search starts here:
 ./include
 .
 ./include
 /usr/include
End of search list.
 ./cc1 /var/tmp/cc009006.i -quiet -dumpbase enquire.c -g -O0 -version -o /var/tmp/cc009006.s
GNU C version 2.6.0 (68k, MIT syntax) compiled by GNU C version 2.5.6.
 /usr/bin/as -o enquire.o /var/tmp/cc009006.s
/usr/bin/as: /var/tmp/cc009006.s:103: Error: Expected comma after symbol-name: rest of line ignored.
/usr/bin/as: /var/tmp/cc009006.s:103: Error: Rest of line ignored. First ignored character is `_'.
/usr/bin/as: /var/tmp/cc009006.s:111: Error: Expected comma after symbol-name: rest of line ignored.

####
The assembly at the line 103 is as follows:
####

Lfe1:
        .size    _overflow,Lfe1-_overflow
.stabs "overflow:F19",36,0,493,_overflow
.stabs "sig:p1",160,0,493,8
.globl _V

The first problem line is ".size   ".
My question is:
What version of gas (and possibly gnu ld) I need to compile gcc 2.6.0?
My version of gas is:
GNU assembler version 1.92.3, NetBSD $Revision: 1.3 $
This is most probably a relic from NetBSD early days, like NetBSD #500
or something..

Or is the problem somewhere else?

Regards,
Tero

---

From: Hubert Feyrer <[email-masked]> "gcc 2.6.0 generation fails.." (Sep 1, 12:32am)

> What version of gas (and possibly gnu ld) I need to compile gcc 2.6.0?
...
> This is most probably a relic from NetBSD early days, like NetBSD #500

No, I guess that "as" is the problem, too. It has been changed several times
since then.

Hubert

-- 
=============== Hubert Feyrer ============================================
      Weekdays: Rennerstr. 19, D-93053 Regensburg,  Tel. 0941/701788
      Weekends: Bachstr. 40,   D-84066 Mallersdorf, Tel. 08772/6084
      Internet: [email-masked] == IRC: hubertf
==========================================================================
    Click <A HREF="http://dusk.rz.uni-regensburg.de/~hubert">here.</A>

---

From: Ron Roskens <[email-masked]>

> that was to add "-Damiga" to CPP_PREDEFINES macro.

I compiled gcc-2.6.0 straight out of the box, but I did have to make some
changes to one file before I was able to get through stages 2 and 3.

The file ginclude/stddef.h has problems when it goes through stages 2 and 3, 
as the necessary type definitions are not set. Change the file to the same as 
/usr/include/stddef.h and it will work correctly.

My guess is that somehow it incorrectly assumed your system to be an AMIX
system.

Best way to fix that would be to copy the m68k-hp-netbsd config lines to the
m68k-cbm-netbsd and do a new configure for this. 

Ron