Subject: getting gcc-2.95.2 working
To: None <port-macppc@netbsd.org>
From: Brad Chapman <chapmanb@arches.uga.edu>
List: port-macppc
Date: 06/30/2001 10:56:42
Hello all;
I've been working on trying to get gcc-2.95.2 running on my 1.5.1
(Beta2) system, and am hoping maybe some people here have had some
luck with this and could provide some pointers. 

I'm working from the ports (lang/gcc) and added NetBSD-*-powerpc to
the ONLY_FOR_PLATFORM variable in the Makefile , so that I could start
 trying to get it working. From there, I have just been dealing with 
errors as best I could, and am currently stuck with what looks like 
some assembler issues I have no idea how to deal with.

So far, I have made the following changes (patches for these are at
the end of the mail):

-> I added a powerpc-*-netbsd* target to the configure file, so
configure would not complain about the platform not being
supported. Right now this is empty, which it probably shouldn't be,
but it isn't clear to me what variables should be added, so I punted
:-)

-> I made two changes in the objdir/gcc Makefile, which try to do
things which I guess are not available on netbsd macppc. The first is
that it tries to link in ld, which I couldn't find. Second, it tries
to use collect2.c, which #include's ldcfn.h, which I also couldn't find. 

These changes are probably not right, but they've got me this far, so 
it is something to start with. With these patches, compiling gives me:

/var/tmp/ccGZuEjI.s: Assembler messages:
/var/tmp/ccGZuEjI.s:2: Error: Unknown pseudo-op:  `.toc'
/var/tmp/ccGZuEjI.s:3: Error: Unknown pseudo-op:  `.csect'
[..snip..Tons more errors of a similar sort ..]

which I'm stuck on.

Has anyone got gcc-2.95.2 or better working on netbsd/macppc? Can
anyone offer any advice to help? 

Thanks in advance!
Brad

[work/gcc-2.95.2/gcc]$ diff -c configure.orig configure
*** configure.orig      Sat Jun 30 07:02:16 2001
--- configure   Sat Jun 30 09:37:35 2001
***************
*** 5068,5073 ****
--- 5068,5075 ----
        powerpc-*-openbsd*)
                tmake_file="${tmake_file} rs6000/t-rs6000 rs6000/t-openbsd"
                ;;
+       powerpc-*-netbsd*)
+               ;;
        powerpc-*-beos*)
                cpu_type=rs6000
                tm_file=rs6000/beos.h

[work/objdir/gcc]$ diff -u Makefile.orig Makefile
--- Makefile.orig       Sat Jun 30 09:38:54 2001
+++ Makefile    Sat Jun 30 10:23:29 2001
@@ -401,7 +401,7 @@
 MAYBE_USE_COLLECT2 = 
 # It is convenient for configure to add the assignment at the beginning,
 # so don't override it here.
-USE_COLLECT2 = collect2$(exeext)
+#USE_COLLECT2 = collect2$(exeext)
 
 # List of extra C and assembler files to add to libgcc1.a.
 # Assembler files should have names ending in `.asm'.
@@ -566,7 +566,7 @@
 # We need -lld for collect2 (actually this only matters
 # for a native compiler, but this is as good a place as any
 # to define the symbol).
-CLIB=-lld
+# CLIB=-lld
 
 ####cross overrides