--- Begin Message ---
- From: Riccardo Mottola <rollei at tiscalinet dot it>
- To: java-patches at gcc dot gnu dot org
- Cc: gadek at debian dot org
- Date: Wed, 24 Mar 2004 00:50:14 +0100
- Subject: libffi patch to make it compile on OpenBSD/sparc32
- Delivery-date: Tue, 23 Mar 2004 19:00:35 -0500
- Envelope-to: greg@localhost
Hello,
(I'm not subscribed here).
I need to compile libffi on OpenBSD/sparc. I have a v7 processor and
thus it is 32bit. I got the CVS sources as of 23 march 2004 and tried
configuring & compiling.
I had problems that I reconducted to the preprocessor not expanding
correctly defines of the type
#define uword long
when .uword was used I got error like
../gcc/libffi/src/sparc/v8.S:221: Error: Unknown pseudo-op: `.'
what I did was to manually substitute the values for sparc32 and then it
compiled. This is probably not a clean thing, I saw sparc64/v9 Ifdef's
and I suppose that code is for v9 operating in 32 bit mode.
Also I added in "configure" a support line for openbsd.
"make check" gave no errors at the end.
I am on OpenBSD 3.4/sparc, gcc 2.95.3
The same error occurs on NetBSD/sparc (on a v8 processor), 1.6.2, gcc
2.95, when compiling the libffi package. The port system retrieves gcc
3.0 sources and tries to compile libffi of it and I get the same error.
I did not test this patch on NetBSD, but I assume it would fix it too.
(patch attached)
-Riccardo
? config.log
Index: configure
===================================================================
RCS file: /cvsroot/gcc/gcc/libffi/configure,v
retrieving revision 1.58
diff -u -r1.58 configure
--- configure 19 Mar 2004 22:34:16 -0000 1.58
+++ configure 23 Mar 2004 23:29:01 -0000
@@ -4282,6 +4282,7 @@
sparc-sun-4*) TARGET=SPARC; TARGETDIR=sparc;;
sparc*-sun-*) TARGET=SPARC; TARGETDIR=sparc;;
sparc-*-linux* | sparc-*-netbsdelf*) TARGET=SPARC; TARGETDIR=sparc;;
+sparc-*-openbsd*) TARGET=SPARC; TARGETDIR=sparc;;
sparc64-*-linux* | sparc64-*-netbsd*) TARGET=SPARC; TARGETDIR=sparc;;
alpha*-*-linux* | alpha*-*-osf* | alpha*-*-freebsd* | alpha*-*-netbsd*) TARGET=ALPHA; TARGETDIR=alpha;;
ia64*-*-*) TARGET=IA64; TARGETDIR=ia64;;
Index: src/sparc/v8.S
===================================================================
RCS file: /cvsroot/gcc/gcc/libffi/src/sparc/v8.S,v
retrieving revision 1.11
diff -u -r1.11 v8.S
--- src/sparc/v8.S 25 Jan 2004 06:58:33 -0000 1.11
+++ src/sparc/v8.S 23 Mar 2004 23:29:01 -0000
@@ -218,8 +218,8 @@
.uaword .LLFE1-.LLFB1 ! FDE address range
#else
.align WS
- .nword .LLFB1
- .uanword .LLFE1-.LLFB1 ! FDE address range
+ .long .LLFB1
+ .uaword .LLFE1-.LLFB1 ! FDE address range
#endif
.byte 0x0 ! uleb128 0x0; Augmentation size
.byte 0x4 ! DW_CFA_advance_loc4
@@ -241,8 +241,8 @@
.uaword .LLFE2-.LLFB2 ! FDE address range
#else
.align WS
- .nword .LLFB2
- .uanword .LLFE2-.LLFB2 ! FDE address range
+ .long .LLFB2
+ .uaword .LLFE2-.LLFB2 ! FDE address range
#endif
.byte 0x0 ! uleb128 0x0; Augmentation size
.byte 0x4 ! DW_CFA_advance_loc4
--- End Message ---