Package: emacs21
Severity: wishlist
Tags: patch

With the attached patch, 'emacs21' can be compiled on ppc64.

This patch is similar to the patch which is used by Fedora for ppc64.

Regards
Andreas Jochens

diff -urN ../tmp-orig/emacs21-21.3+1/src/m/macppc.h ./src/m/macppc.h
--- ../tmp-orig/emacs21-21.3+1/src/m/macppc.h   2001-10-23 08:43:33.000000000 
+0200
+++ ./src/m/macppc.h    2005-02-09 10:51:27.925283755 +0100
@@ -95,11 +95,47 @@
 
 #ifdef LINUX
 #define LINKER $(CC) -nostdlib
-#define LD_SWITCH_MACHINE -Xlinker -m -Xlinker elf32ppc
+#ifdef __powerpc64__
+#define LD_SWITCH_MACHINE -m64 -Xlinker -m -Xlinker elf64ppc
+#else
+#define LD_SWITCH_MACHINE -m32 -Xlinker -m -Xlinker elf32ppc
+#endif
 /* 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 __powerpc64__
+/* Misc 64-bit fixups, patterned after the x86_64 file */
+#undef BITS_PER_LONG
+#undef BITS_PER_EMACS_INT
+#undef VALBITS
+#undef PNTR_COMPARISON_TYPE
+#undef MARKBIT
+#undef XINT
+#undef XUINT
+#undef XPNTR
+#undef START_FILES
+#undef LIB_STANDARD
+#undef EMACS_INT
+#undef EMACS_UINT
+#undef SPECIAL_EMACS_INT
+
+#define BITS_PER_LONG 64
+#define BITS_PER_EMACS_INT 64
+#define VALBITS 60
+#define PNTR_COMPARISON_TYPE unsigned long
+#define MARKBIT         0x8000000000000000L
+
+#define XINT(a)  (((long) (a) << (BITS_PER_LONG - VALBITS)) >> (BITS_PER_LONG 
- VALBITS))
+#define XUINT(a) ((long) (a) & VALMASK)
+#define XPNTR(a) XUINT (a)
+#define START_FILES pre-crt0.o /usr/lib/crt1.o /usr/lib/crti.o
+#define LIB_STANDARD -lgcc -lc -lgcc /usr/lib/crtn.o
+#define EMACS_INT               long
+#define EMACS_UINT              unsigned long
+#define SPECIAL_EMACS_INT
+#endif
 #endif
 
 #if 0  /* This breaks things on PPC GNU/Linux ecept for Yellowdog,


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to