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

Re: gcc-2.95.1?

"GJ" == Greg Johnson <gjohnson@physics.clarku.edu>
"DJ" == Daniel Jacobowitz <dan@debian.org> writes:

GJ> Is someone working on building gcc-2.95.1 for powerpc?  It
GJ> doesn't build out of the box.  It looks like some of the
GJ> patches in the source package have been applied upstream.
GJ> After removing these from debian/rules.patch, it starts to
GJ> build.  However, my ld doesn't like "-m elf32ppclinux".  Is
GJ> binutils out of date, or should it be changed back to elf32ppc?

DJ> Binutils is out of date.  You need to use an experimental one;
DJ> I uploaded a working one today, and it should be available
DJ> tomorrow afternoon, in project/experimental/.

Hmm, gcc v. 2.95.1 built fine on our machine with binutils and one change to one line:

--- gcc-2.95.1/gcc/config/rs6000/linux.h.orig	Mon May 31 02:37:25 1999
+++ gcc-2.95.1/gcc/config/rs6000/linux.h	Thu Aug 19 11:53:55 1999
@@ -35,9 +35,9 @@
 #define CPP_OS_DEFAULT_SPEC "%(cpp_os_linux)"
 #undef LINK_SPEC
-#define LINK_SPEC "-m elf32ppclinux %{G*} %{shared:-shared} \
+#define LINK_SPEC "-m elf32ppc %{G*} %{shared:-shared} \
   %{!shared: \
     %{!static: \
       %{rdynamic:-export-dynamic} \
       %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}} \

You might also want to make another change that fixes a big with
-ffixed support on the PowerPC -- without it, -ffixed is *totally*
broken.  Not many people use this feature, but those who do *need*
this patch.  (For various reasons, this patch never made it into the
main source tree, despite having been posted two years ago.  It's just
been resubmitted and will (hopefully) make it in soon.)

--- gcc-2.95.1/gcc/config/rs6000/rs6000.c.orig	Thu Aug 19 01:21:45 1999
+++ gcc-2.95.1/gcc/config/rs6000/rs6000.c	Fri Sep  3 00:54:28 1999
@@ -3240,10 +3240,12 @@
   int first_reg;
   /* Find lowest numbered live register.  */
-  for (first_reg = 13; first_reg <= 31; first_reg++)
-    if (regs_ever_live[first_reg])
+  for (first_reg = 13 + FIXED_R13; first_reg <= 31; first_reg++)
+    if (regs_ever_live[first_reg]
+	&& !call_used_regs[first_reg]
+	&& !fixed_regs[first_reg])
   if (profile_flag)

 Behind the counter a boy with a shaven head stared vacantly into space, 
 a dozen spikes of microsoft protruding from the socket behind his ear.
   C.M. Connelly               c@eskimo.com                   SHC, DS

Reply to: