[Debian-ppc64-devel] Correct ppc64 Emacs patch

Jérôme Marant jmarant@free.fr
Sun, 01 May 2005 14:59:21 +0200


Hi,

Here is the correct patch. Forget about the previous one.

Thanks.

diff -urNad emacs21-21.4a/configure.in /tmp/dpep.HHmGHE/emacs21-21.4a/configure.in
--- emacs21-21.4a/configure.in	2005-05-01 14:24:47.769683616 +0200
+++ /tmp/dpep.HHmGHE/emacs21-21.4a/configure.in	2005-05-01 14:56:03.818480848 +0200
@@ -278,11 +278,6 @@
     machine=arm opsys=gnu-linux
   ;;
 
-  ppc-*-linux | \
-  powerpc-*-linux* )
-    machine=macppc opsys=gnu-linux
-  ;;
-
   ## Altos 3068
   m68*-altos-sysv* )
     machine=altos opsys=usg5-2
diff -urNad emacs21-21.4a/src/m/macppc.h /tmp/dpep.HHmGHE/emacs21-21.4a/src/m/macppc.h
--- emacs21-21.4a/src/m/macppc.h	2001-10-23 08:43:33.000000000 +0200
+++ /tmp/dpep.HHmGHE/emacs21-21.4a/src/m/macppc.h	2005-05-01 14:55:48.356831376 +0200
@@ -95,11 +95,16 @@
 
 #ifdef LINUX
 #define LINKER $(CC) -nostdlib
-#define LD_SWITCH_MACHINE -Xlinker -m -Xlinker elf32ppc
 /* s/gnu-linux.h defines this to `-z nocombreloc' which does not work here
    because prefix-args is not used.  */
 #undef LD_SWITCH_SYSTEM_TEMACS
 #define LD_SWITCH_MACHINE_TEMACS -Xlinker -znocombreloc
+#ifdef _ARCH_PPC64
+#undef START_FILES
+#define START_FILES pre-crt0.o /usr/lib/crt1.o /usr/lib/crti.o
+#undef LIB_STANDARD
+#define LIB_STANDARD -lgcc -lc -lgcc /usr/lib/crtn.o
+#endif
 #endif
 
 #if 0  /* This breaks things on PPC GNU/Linux ecept for Yellowdog,
@@ -113,3 +118,9 @@
 #endif
 #endif
 #endif /* 0 */
+
+#ifdef _ARCH_PPC64
+#ifndef _LP64
+#define _LP64
+#endif
+#endif


-- 
Jérôme Marant