Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 286911 | Differences between
and this patch

Collapse All | Expand All

(-)configure.ac.orig (-3 / +4 lines)
Lines 100-109 case "$host" in Link Here
100
	;;
100
	;;
101
101
102
  mips-sgi-irix5.* | mips-sgi-irix6.*)
102
  mips-sgi-irix5.* | mips-sgi-irix6.*)
103
	TARGET=MIPS; TARGETDIR=mips
103
	TARGET=MIPS_IRIX; TARGETDIR=mips
104
	;;
104
	;;
105
  mips*-*-linux*)
105
  mips*-*-linux*)
106
	TARGET=MIPS; TARGETDIR=mips
106
	TARGET=MIPS_LINUX; TARGETDIR=mips
107
	;;
107
	;;
108
108
109
  powerpc*-*-linux* | powerpc-*-sysv*)
109
  powerpc*-*-linux* | powerpc-*-sysv*)
Lines 156-162 if test $TARGETDIR = unknown; then Link Here
156
  AC_MSG_ERROR(["libffi has not been ported to $host."])
156
  AC_MSG_ERROR(["libffi has not been ported to $host."])
157
fi
157
fi
158
158
159
AM_CONDITIONAL(MIPS, test x$TARGET = xMIPS)
159
AM_CONDITIONAL(MIPS, test x$TARGET = xMIPS_IRIX)
160
AM_CONDITIONAL(MIPS, test x$TARGET = xMIPS_LINUX)
160
AM_CONDITIONAL(SPARC, test x$TARGET = xSPARC)
161
AM_CONDITIONAL(SPARC, test x$TARGET = xSPARC)
161
AM_CONDITIONAL(X86, test x$TARGET = xX86)
162
AM_CONDITIONAL(X86, test x$TARGET = xX86)
162
AM_CONDITIONAL(X86_FREEBSD, test x$TARGET = xX86_FREEBSD)
163
AM_CONDITIONAL(X86_FREEBSD, test x$TARGET = xX86_FREEBSD)
(-)configure.orig (-3 / +11 lines)
Lines 21015-21024 case "$host" in Link Here
21015
	;;
21015
	;;
21016
21016
21017
  mips-sgi-irix5.* | mips-sgi-irix6.*)
21017
  mips-sgi-irix5.* | mips-sgi-irix6.*)
21018
	TARGET=MIPS; TARGETDIR=mips
21018
	TARGET=MIPS_IRIX; TARGETDIR=mips
21019
	;;
21019
	;;
21020
  mips*-*-linux*)
21020
  mips*-*-linux*)
21021
	TARGET=MIPS; TARGETDIR=mips
21021
	TARGET=MIPS_LINUX; TARGETDIR=mips
21022
	;;
21022
	;;
21023
21023
21024
  powerpc*-*-linux* | powerpc-*-sysv*)
21024
  powerpc*-*-linux* | powerpc-*-sysv*)
Lines 21073-21079 echo "$as_me: error: \"libffi has not be Link Here
21073
   { (exit 1); exit 1; }; }
21073
   { (exit 1); exit 1; }; }
21074
fi
21074
fi
21075
21075
21076
 if test x$TARGET = xMIPS; then
21076
 if test x$TARGET = xMIPS_IRIX; then
21077
  MIPS_TRUE=
21078
  MIPS_FALSE='#'
21079
else
21080
  MIPS_TRUE='#'
21081
  MIPS_FALSE=
21082
fi
21083
21084
 if test x$TARGET = xMIPS_LINUX; then
21077
  MIPS_TRUE=
21085
  MIPS_TRUE=
21078
  MIPS_FALSE='#'
21086
  MIPS_FALSE='#'
21079
else
21087
else
(-)src/mips/n32.S.orig (-2 / +3 lines)
Lines 40-46 Link Here
40
40
41
#define SIZEOF_FRAME	( 8 * FFI_SIZEOF_ARG )
41
#define SIZEOF_FRAME	( 8 * FFI_SIZEOF_ARG )
42
42
43
	.abicalls
43
/*	.abicalls */
44
	.text
44
	.text
45
	.align	2
45
	.align	2
46
	.globl	ffi_call_N32
46
	.globl	ffi_call_N32
Lines 474-480 cls_epilogue: Link Here
474
.LFE2:	
474
.LFE2:	
475
	.end	ffi_closure_N32
475
	.end	ffi_closure_N32
476
476
477
        .section        .eh_frame,"aw",@progbits
477
/*      .section        .eh_frame,"aw",@progbits
478
.Lframe1:
478
.Lframe1:
479
        .4byte  .LECIE1-.LSCIE1		# length
479
        .4byte  .LECIE1-.LSCIE1		# length
480
.LSCIE1:
480
.LSCIE1:
Lines 530-534 cls_epilogue: Link Here
530
	.uleb128 (SIZEOF_FRAME2 - RA_OFF2)/4
530
	.uleb128 (SIZEOF_FRAME2 - RA_OFF2)/4
531
	.align	EH_FRAME_ALIGN
531
	.align	EH_FRAME_ALIGN
532
.LEFDE3:
532
.LEFDE3:
533
*/
533
	
534
	
534
#endif
535
#endif
(-)src/mips/ffitarget.h.orig (-6 / +23 lines)
Lines 27-34 Link Here
27
#ifndef LIBFFI_TARGET_H
27
#ifndef LIBFFI_TARGET_H
28
#define LIBFFI_TARGET_H
28
#define LIBFFI_TARGET_H
29
29
30
#ifdef linux
30
#if defined(linux) || defined (__sgi)
31
#include <asm/sgidefs.h>
31
#  ifdef linux
32
#    include <asm/sgidefs.h>
33
#  endif
34
#  ifdef __sgi
35
#    include <sgidefs.h>
36
#  endif
32
#  ifndef _ABIN32
37
#  ifndef _ABIN32
33
#    define _ABIN32 _MIPS_SIM_NABI32
38
#    define _ABIN32 _MIPS_SIM_NABI32
34
#  endif
39
#  endif
Lines 41-47 Link Here
41
#endif
46
#endif
42
47
43
#if !defined(_MIPS_SIM)
48
#if !defined(_MIPS_SIM)
44
-- something is very wrong --
49
# error -- something is very wrong --
45
#else
50
#else
46
#  if (_MIPS_SIM==_ABIN32 && defined(_ABIN32)) || (_MIPS_SIM==_ABI64 && defined(_ABI64))
51
#  if (_MIPS_SIM==_ABIN32 && defined(_ABIN32)) || (_MIPS_SIM==_ABI64 && defined(_ABI64))
47
#    define FFI_MIPS_N32
52
#    define FFI_MIPS_N32
Lines 49-55 Link Here
49
#    if (_MIPS_SIM==_ABIO32 && defined(_ABIO32))
54
#    if (_MIPS_SIM==_ABIO32 && defined(_ABIO32))
50
#      define FFI_MIPS_O32
55
#      define FFI_MIPS_O32
51
#    else
56
#    else
52
-- this is an unsupported platform --
57
#     error -- this is an unsupported platform --
53
#    endif
58
#    endif
54
#  endif
59
#  endif
55
#endif
60
#endif
Lines 145-158 Link Here
145
# endif /* _MIPS_SIM==_ABI64 */
150
# endif /* _MIPS_SIM==_ABI64 */
146
#endif /* !FFI_MIPS_O32 */
151
#endif /* !FFI_MIPS_O32 */
147
#else /* !LIBFFI_ASM */
152
#else /* !LIBFFI_ASM */
148
#ifdef FFI_MIPS_O32
153
#ifdef __GNUC__
154
#  ifdef FFI_MIPS_O32
149
/* O32 stack frames have 32bit integer args */
155
/* O32 stack frames have 32bit integer args */
150
typedef unsigned int     ffi_arg __attribute__((__mode__(__SI__)));
156
typedef unsigned int     ffi_arg __attribute__((__mode__(__SI__)));
151
typedef signed   int     ffi_sarg __attribute__((__mode__(__SI__)));
157
typedef signed   int     ffi_sarg __attribute__((__mode__(__SI__)));
152
#else
158
#  else
153
/* N32 and N64 frames have 64bit integer args */
159
/* N32 and N64 frames have 64bit integer args */
154
typedef unsigned int     ffi_arg __attribute__((__mode__(__DI__)));
160
typedef unsigned int     ffi_arg __attribute__((__mode__(__DI__)));
155
typedef signed   int     ffi_sarg __attribute__((__mode__(__DI__)));
161
typedef signed   int     ffi_sarg __attribute__((__mode__(__DI__)));
162
#  endif
163
#else
164
#  ifdef FFI_MIPS_O32
165
/* O32 stack frames have 32bit integer args */
166
typedef __uint32_t ffi_arg;
167
typedef __int32_t ffi_sarg;
168
#  else
169
/* N32 and N64 frames have 64bit integer args */
170
typedef __uint64_t ffi_arg;
171
typedef __int64_t ffi_sarg;
172
#  endif
156
#endif
173
#endif
157
174
158
typedef enum ffi_abi {
175
typedef enum ffi_abi {
(-)include/ffi.h.in.orig (+10 lines)
Lines 249-260 size_t ffi_java_raw_size (ffi_cif *cif); Link Here
249
249
250
#if FFI_CLOSURES
250
#if FFI_CLOSURES
251
251
252
#ifdef __sgi
253
# pragma pack 8
254
#endif
252
typedef struct {
255
typedef struct {
253
  char tramp[FFI_TRAMPOLINE_SIZE];
256
  char tramp[FFI_TRAMPOLINE_SIZE];
254
  ffi_cif   *cif;
257
  ffi_cif   *cif;
255
  void     (*fun)(ffi_cif*,void*,void**,void*);
258
  void     (*fun)(ffi_cif*,void*,void**,void*);
256
  void      *user_data;
259
  void      *user_data;
260
#ifdef __GNUC__
257
} ffi_closure __attribute__((aligned (8)));
261
} ffi_closure __attribute__((aligned (8)));
262
#else
263
} ffi_closure;
264
# ifdef __sgi
265
#  pragma pack 0
266
# endif
267
#endif
258
268
259
void *ffi_closure_alloc (size_t size, void **code);
269
void *ffi_closure_alloc (size_t size, void **code);
260
void ffi_closure_free (void *);
270
void ffi_closure_free (void *);
(-)include/ffi_common.h.orig (+19 lines)
Lines 44-49 char *alloca (); Link Here
44
# endif
44
# endif
45
#endif
45
#endif
46
46
47
#if HAVE_INTTYPES_H
48
# include <inttypes.h>
49
#else
50
# if HAVE_SYS_TYPES_H
51
#  include <sys/types.h>
52
# endif
53
#endif
54
47
#if defined(FFI_DEBUG)
55
#if defined(FFI_DEBUG)
48
#include <stdio.h>
56
#include <stdio.h>
49
#endif
57
#endif
Lines 77-82 typedef struct Link Here
77
} extended_cif;
85
} extended_cif;
78
86
79
/* Terse sized type definitions.  */
87
/* Terse sized type definitions.  */
88
#if defined(__GNUC__)
80
typedef unsigned int UINT8  __attribute__((__mode__(__QI__)));
89
typedef unsigned int UINT8  __attribute__((__mode__(__QI__)));
81
typedef signed int   SINT8  __attribute__((__mode__(__QI__)));
90
typedef signed int   SINT8  __attribute__((__mode__(__QI__)));
82
typedef unsigned int UINT16 __attribute__((__mode__(__HI__)));
91
typedef unsigned int UINT16 __attribute__((__mode__(__HI__)));
Lines 85-90 typedef unsigned int UINT32 __attribute_ Link Here
85
typedef signed int   SINT32 __attribute__((__mode__(__SI__)));
94
typedef signed int   SINT32 __attribute__((__mode__(__SI__)));
86
typedef unsigned int UINT64 __attribute__((__mode__(__DI__)));
95
typedef unsigned int UINT64 __attribute__((__mode__(__DI__)));
87
typedef signed int   SINT64 __attribute__((__mode__(__DI__)));
96
typedef signed int   SINT64 __attribute__((__mode__(__DI__)));
97
#else
98
typedef uint8_t  UINT8;
99
typedef int8_t   SINT8;
100
typedef uint16_t UINT16;
101
typedef int16_t  SINT16;
102
typedef uint32_t UINT32;
103
typedef int32_t  SINT32;
104
typedef uint64_t UINT64;
105
typedef int64_t  SINT64;
106
#endif
88
107
89
typedef float FLOAT32;
108
typedef float FLOAT32;
90
109
(-)src/java_raw_api.c.dist (-1 / +1 lines)
Lines 314-320 ffi_java_translate_args (ffi_cif *cif, v Link Here
314
  ffi_raw_closure *cl = (ffi_raw_closure*)user_data;
314
  ffi_raw_closure *cl = (ffi_raw_closure*)user_data;
315
315
316
  ffi_java_ptrarray_to_raw (cif, avalue, raw);
316
  ffi_java_ptrarray_to_raw (cif, avalue, raw);
317
  (*cl->fun) (cif, rvalue, raw, cl->user_data);
317
  (*cl->fun) (cif, rvalue, (ffi_raw*)raw, cl->user_data);
318
  ffi_java_raw_to_rvalue (cif, rvalue);
318
  ffi_java_raw_to_rvalue (cif, rvalue);
319
}
319
}
320
320

Return to bug 286911