emacs-devel
[Top][All Lists]
Advanced

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

[Andreas Jochens] Bug#300368: emacs21: FTBFS (ppc64): Please add support


From: Jérôme Marant
Subject: [Andreas Jochens] Bug#300368: emacs21: FTBFS (ppc64): Please add support for the ppc64 architecture
Date: Sat, 19 Mar 2005 15:34:12 +0100
User-agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.3 (gnu/linux)

Hi,

I've just received this patch porting Emacs to the ppc64 architecture.
I have no idea whether this is the right way to do it; maybe someone
will be able to improve it.

Cheers,

--- 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,



--- End Message ---

-- 
Jérôme Marant

reply via email to

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