Subject: Re: gcc g77 and stuff
To: JOZE is great <email@example.com>
From: Jonathan Stone <jonathan@DSG.Stanford.EDU>
Date: 05/15/1997 18:11:55
"OZE is great" <firstname.lastname@example.org> writes:
>I tryed to compile gcc-126.96.36.199 with g77-0.5.20 on my pmax.
>I'm running this pmax with the stuff of snapshot-1997-05-01.
>I tryed several different compiler options as
>-fpic -fPIC ...
>(I'm not that much used to compile compilers ).
>Ok, the usual problem was this:
> .. ld: .. can't link PIC with non PIC files ..
>or something like this.
>Who can help me? - The person who compiled the gcc of the
>snapshot-1997-05-01 should perhaps know how things work and
>which CFLAGS etc. he/she used.
Well, since the person was me...
I configured an unmodified bintils-2.8, configured for mips-dec-netbsd
--prefix=/usr, and typed ``make; make install''.
I'm using the standard NetBSD version of gcc. In the snapshot, that's
gcc 2.7.2. The NetBSD source tree was updated to 188.8.131.52 yesterday.
You *need* to compile all files with -mabicalls. (That's the default
for the NetBSD/pmax gcc.)
You also need to compile .so files for shared libraries with
-mhalf-pic. Again, that's the default for NetBSD/pmax gcc. (This is
apparently what OpenBSD does too, and for the same reason: so that if
you compile foo.c to foo.o, you can link with either static or
I'd guess that g77 isn't configured properly for a NetBSD/mips target.
If you do *all* your g77 compiles with "-mhalf-pic -fpic -mabicalls",
then you shouldn't have any problems linking against the NetBSD/pmax
libraries, either shared or static. Did you try that?
If so, did it work?