bug-gnu-emacs
[Top][All Lists]
Advanced

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

Emacs 21: support for the ppc64 architecture


From: Rob Browning
Subject: Emacs 21: support for the ppc64 architecture
Date: Sat, 19 Mar 2005 12:57:30 -0600
User-agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux)

[Please preserve the forwarded CC if possible.]

Andreas Jochens <address@hidden> has just sumbmitted this patch to add
support for ppc64.

Thanks

--- Begin Message --- Subject: Bug#300368: emacs21: FTBFS (ppc64): Please add support for the ppc64 architecture Date: Sat, 19 Mar 2005 11:07:17 +0100
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 address@hidden
with a subject of "unsubscribe". Trouble? Contact address@hidden


--- End Message ---

-- 
Rob Browning
rlb @defaultvalue.org and @debian.org; previously @cs.utexas.edu
GPG starting 2002-11-03 = 14DD 432F AE39 534D B592  F9A0 25C8 D377 8C7E 73A4

reply via email to

[Prev in Thread] Current Thread [Next in Thread]