[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: gcc 2.95.2



>>>>> Florian Lohoff writes:

 > Hi,
 > i tried to build the gcc 2.95.2 from plain source.

 > It basically builds but fails the tests afterwards - The tests say
 > that it is not capable of generating working code. I wanted to try
 > to compile the latest binutils with that gcc but it seems the configure
 > is not able to determin the system type (although running config.guess
 > is working correctly) ...

You need at least the following patches (the last one is for
config/mips/linux.h) which have been applied to the CVS version of gcc
already (get them from the current CVS version):

Tue Sep 14 03:58:44 1999  Andreas Jaeger  <aj@arthur.rhein-neckar.de>

        * configure.in: Add crtbeginS.o, crtendS.o for mips-linux; add 
        thread support.
        * configure: Rebuilt.

1999-08-20  Andreas Jaeger  <aj@arthur.rhein-neckar.de>

        * linux.h (LIB_SPEC): Added.


This should be enough to get a working compiler - *BUT* this isn't
enough.  Ralf Baechle told me to not compile a kernel with it -
there're still some things missings.  It's a pity that Ralf's patches
for MIPS-Linux have never been integrated into gcc.  I would really
appreciate if gcc 2.96 would work out of the box (without further
patches) for mips-linux - but until then somebody has to generate
patches and get them integrated.

Andreas

P.S. Here's one more patch which is neccessary but hasn't been added
to gcc yet:

CPP_PREDEFINES isn't set in mips/linux.h and therefore misses at least
"-Dlinux".  I'm appending a patch which defines CPP_PREDEFINES to
those values which are AFAIK at least needed.  I might have missed
some.

1999-08-22  Andreas Jaeger  <aj@arthur.rhein-neckar.de>

	* config/mips/linux.h (CPP_PREDEFINES): Define for little and big
	endian machines.

--- linux.h.~1~	Sat Aug 21 11:56:20 1999
+++ linux.h	Sun Aug 22 10:41:11 1999
@@ -72,6 +72,15 @@
         %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}} \
         %{static:-static}}}"
 
+/* Specify predefined symbols in preprocessor.  */
+#undef CPP_PREDEFINES
+#if TARGET_ENDIAN_DEFAULT == 0
+# define CPP_PREDEFINES "\
+-Dunix -Dmips -DR3000 -DMIPSEL -Dlinux -Asystem(posix) -Acpu(mips) -Amachine(mips)"
+#else
+# define CPP_PREDEFINES "\
+-Dunix -Dmips -DR3000 -DMIPSEB -Dlinux -Asystem(posix) -Acpu(mips) -Amachine(mips)"
+#endif
 
 #undef SUBTARGET_ASM_SPEC
 #define SUBTARGET_ASM_SPEC "-KPIC"


-- 
 Andreas Jaeger   
  SuSE Labs aj@suse.de	
   private aj@arthur.rhein-neckar.de


Reply to: