public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] gentoo-x86 commit in dev-libs/libffi/files: libffi-3.0.9-x32.patch
@ 2012-02-16 22:50 Mike Frysinger (vapier)
  0 siblings, 0 replies; 2+ messages in thread
From: Mike Frysinger (vapier) @ 2012-02-16 22:50 UTC (permalink / raw
  To: gentoo-commits

vapier      12/02/16 22:50:01

  Added:                libffi-3.0.9-x32.patch
  Log:
  Add patch from upstream for x32 targets.
  
  (Portage version: 2.2.0_alpha86/cvs/Linux x86_64)

Revision  Changes    Path
1.1                  dev-libs/libffi/files/libffi-3.0.9-x32.patch

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/libffi/files/libffi-3.0.9-x32.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/libffi/files/libffi-3.0.9-x32.patch?rev=1.1&content-type=text/plain

Index: libffi-3.0.9-x32.patch
===================================================================
From cd0b9991c76903b66ad3c938d6135aedbf4e1ef0 Mon Sep 17 00:00:00 2001
From: H.J. Lu <hjl.tools@gmail.com>
Date: Tue, 6 Dec 2011 19:51:28 -0800
Subject: [PATCH] Fix libffi for x32.

2011-12-06  H.J. Lu  <hongjiu.lu@intel.com>

	* src/x86/ffi64.c (ffi_call): Cast the return value to
	unsigned long.

	* src/x86/ffitarget.h (ffi_arg): Set to unsigned long long for
	x32.
	(ffi_sarg): Set to long for x32.
---
 libffi/ChangeLog.x32       |    8 ++++++++
 libffi/src/x86/ffi64.c     |    2 +-
 libffi/src/x86/ffitarget.h |    5 +++++
 3 files changed, 14 insertions(+), 1 deletions(-)
 create mode 100644 libffi/ChangeLog.x32

diff --git a/libffi/ChangeLog.x32 b/libffi/ChangeLog.x32
new file mode 100644
index 0000000..c733789
--- /dev/null
+++ b/libffi/ChangeLog.x32
@@ -0,0 +1,8 @@
+2011-12-06  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* src/x86/ffi64.c (ffi_call): Cast the return value to
+	unsigned long.
+
+	* src/x86/ffitarget.h (ffi_arg): Set to unsigned long long for
+	x32.
+	(ffi_sarg): Set to long for x32.
diff --git a/libffi/src/x86/ffi64.c b/libffi/src/x86/ffi64.c
index bd907d7..4d87ddb 100644
--- a/libffi/src/x86/ffi64.c
+++ b/libffi/src/x86/ffi64.c
@@ -426,7 +426,7 @@ ffi_call (ffi_cif *cif, void (*fn)(void), void *rvalue, void **avalue)
   /* If the return value is passed in memory, add the pointer as the
      first integer argument.  */
   if (ret_in_memory)
-    reg_args->gpr[gprcount++] = (long) rvalue;
+    reg_args->gpr[gprcount++] = (unsigned long) rvalue;
 
   avn = cif->nargs;
   arg_types = cif->arg_types;
diff --git a/libffi/src/x86/ffitarget.h b/libffi/src/x86/ffitarget.h
index b85016c..7a7d7a5 100644
--- a/libffi/src/x86/ffitarget.h
+++ b/libffi/src/x86/ffitarget.h
@@ -53,9 +53,14 @@ typedef unsigned long long     ffi_arg;
 typedef long long              ffi_sarg;
 #endif
 #else
+#if defined __x86_64__ && !defined __LP64__
+typedef unsigned long long     ffi_arg;
+typedef long long              ffi_sarg;
+#else
 typedef unsigned long          ffi_arg;
 typedef signed long            ffi_sarg;
 #endif
+#endif
 
 typedef enum ffi_abi {
   FFI_FIRST_ABI = 0,
-- 
1.7.3.4







^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] gentoo-x86 commit in dev-libs/libffi/files: libffi-3.0.9-x32.patch
@ 2013-02-11 21:00 Samuli Suominen (ssuominen)
  0 siblings, 0 replies; 2+ messages in thread
From: Samuli Suominen (ssuominen) @ 2013-02-11 21:00 UTC (permalink / raw
  To: gentoo-commits

ssuominen    13/02/11 21:00:37

  Removed:              libffi-3.0.9-x32.patch
  Log:
  old
  
  (Portage version: 2.2.0_alpha161/cvs/Linux x86_64, signed Manifest commit with key 4868F14D)


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-02-11 21:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-16 22:50 [gentoo-commits] gentoo-x86 commit in dev-libs/libffi/files: libffi-3.0.9-x32.patch Mike Frysinger (vapier)
  -- strict thread matches above, loose matches on Subject: below --
2013-02-11 21:00 Samuli Suominen (ssuominen)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox