Linux/x32 libtool fix
This commit is contained in:
38
patches/icc128
Normal file
38
patches/icc128
Normal file
@@ -0,0 +1,38 @@
|
||||
Index: libffi/ChangeLog
|
||||
===================================================================
|
||||
--- libffi.orig/ChangeLog
|
||||
+++ libffi/ChangeLog
|
||||
@@ -1,5 +1,10 @@
|
||||
2012-04-06 Anthony Green <green@moxielogic.com>
|
||||
|
||||
+ * src/x86/ffi64.c (UINT128): Define differently for Intel and GNU
|
||||
+ compilers, then use it.
|
||||
+
|
||||
+2012-04-06 Anthony Green <green@moxielogic.com>
|
||||
+
|
||||
* testsuite/Makefile.am (EXTRA_DIST): Add missing test cases.
|
||||
* testsuite/Makefile.in: Rebuilt.
|
||||
|
||||
Index: libffi/src/x86/ffi64.c
|
||||
===================================================================
|
||||
--- libffi.orig/src/x86/ffi64.c
|
||||
+++ libffi/src/x86/ffi64.c
|
||||
@@ -37,11 +37,17 @@
|
||||
#define MAX_GPR_REGS 6
|
||||
#define MAX_SSE_REGS 8
|
||||
|
||||
+#ifdef __INTEL_COMPILER
|
||||
+#define UINT128 __m128
|
||||
+#else
|
||||
+#define UINT128 __int128_t
|
||||
+#endif
|
||||
+
|
||||
struct register_args
|
||||
{
|
||||
/* Registers for argument passing. */
|
||||
UINT64 gpr[MAX_GPR_REGS];
|
||||
- __int128_t sse[MAX_SSE_REGS];
|
||||
+ UINT128 sse[MAX_SSE_REGS];
|
||||
};
|
||||
|
||||
extern void ffi_call_unix64 (void *args, unsigned long bytes, unsigned flags,
|
||||
@@ -10,3 +10,5 @@ msvc-changes
|
||||
win32-return-sign
|
||||
apple-fixes
|
||||
dist-tests
|
||||
icc128
|
||||
x32libtool
|
||||
|
||||
52
patches/x32libtool
Normal file
52
patches/x32libtool
Normal file
@@ -0,0 +1,52 @@
|
||||
Index: libffi/ChangeLog
|
||||
===================================================================
|
||||
--- libffi.orig/ChangeLog
|
||||
+++ libffi/ChangeLog
|
||||
@@ -1,3 +1,7 @@
|
||||
+2012-04-06 H.J. Lu <hongjiu.lu@intel.com>
|
||||
+
|
||||
+ * m4/libtool.m4 (_LT_ENABLE_LOCK): Support x32.
|
||||
+
|
||||
2012-04-06 Anthony Green <green@moxielogic.com>
|
||||
|
||||
* src/x86/ffi64.c (UINT128): Define differently for Intel and GNU
|
||||
Index: libffi/m4/libtool.m4
|
||||
===================================================================
|
||||
--- libffi.orig/m4/libtool.m4
|
||||
+++ libffi/m4/libtool.m4
|
||||
@@ -1280,7 +1280,14 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*
|
||||
LD="${LD-ld} -m elf_i386_fbsd"
|
||||
;;
|
||||
x86_64-*linux*)
|
||||
- LD="${LD-ld} -m elf_i386"
|
||||
+ case `/usr/bin/file conftest.o` in
|
||||
+ *x86-64*)
|
||||
+ LD="${LD-ld} -m elf32_x86_64"
|
||||
+ ;;
|
||||
+ *)
|
||||
+ LD="${LD-ld} -m elf_i386"
|
||||
+ ;;
|
||||
+ esac
|
||||
;;
|
||||
ppc64-*linux*|powerpc64-*linux*)
|
||||
LD="${LD-ld} -m elf32ppclinux"
|
||||
Index: libffi/configure
|
||||
===================================================================
|
||||
--- libffi.orig/configure
|
||||
+++ libffi/configure
|
||||
@@ -6840,7 +6840,14 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*
|
||||
LD="${LD-ld} -m elf_i386_fbsd"
|
||||
;;
|
||||
x86_64-*linux*)
|
||||
- LD="${LD-ld} -m elf_i386"
|
||||
+ case `/usr/bin/file conftest.o` in
|
||||
+ *x86-64*)
|
||||
+ LD="${LD-ld} -m elf32_x86_64"
|
||||
+ ;;
|
||||
+ *)
|
||||
+ LD="${LD-ld} -m elf_i386"
|
||||
+ ;;
|
||||
+ esac
|
||||
;;
|
||||
ppc64-*linux*|powerpc64-*linux*)
|
||||
LD="${LD-ld} -m elf32ppclinux"
|
||||
Reference in New Issue
Block a user