From: Albert Chin <libffi-discuss@mlists.thewrittenword.com>
To: libffi-discuss@sourceware.org
Subject: Re: 3.2.1 on Solaris 10/x86
Date: Thu, 02 Aug 2018 00:46:00 -0000 [thread overview]
Message-ID: <20180802004640.GB29252@thewrittenword.com> (raw)
In-Reply-To: <20180801233807.GA29252@thewrittenword.com>
[-- Attachment #1: Type: text/plain, Size: 1398 bytes --]
On Wed, Aug 01, 2018 at 06:38:07PM -0500, Albert Chin wrote:
> [[ snip snip ]]
> libtool: compile: cc -DHAVE_CONFIG_H -I. -I.. -I. -I../include -Iinclude -I../src -I. -I../include -Iinclude -I../src -c ../src/x86/win32.S -KPIC -DPIC -o src/x86/.libs/win32.o
> Assembler:
> "../src/x86/win32.S", line 935 : Illegal character: <7e>
> "../src/x86/win32.S", line 935 : Syntax error
> Near line: " movl ((10 + 3) & ~3)(%eax), %esi "
> "../src/x86/win32.S", line 936 : Illegal character: <7e>
> "../src/x86/win32.S", line 936 : Syntax error
> Near line: " movl ((((10 + 3) & ~3) + 4) + 4)(%eax), %edx "
> "../src/x86/win32.S", line 944 : Illegal character: <7e>
> "../src/x86/win32.S", line 944 : Syntax error
> Near line: " call *(((10 + 3) & ~3) + 4)(%eax) "
> "../src/x86/win32.S", line 1079 : Illegal character: <7e>
> "../src/x86/win32.S", line 1079 : Syntax error
> Near line: " movl ((10 + 3) & ~3)(%eax), %eax"
> cc: fbe failed for ../src/x86/win32.S
> gmake[2]: *** [src/x86/win32.lo] Error 1
Based on https://bugs.python.org/issue25413, I am using the attached
patch which causes the build to succeed. We basically avoid win32.S on
Solaris/x86.
--
albert chin (china@thewrittenword.com)
[-- Attachment #2: x86_win32.patch --]
[-- Type: text/x-diff, Size: 2830 bytes --]
Index: Makefile.am
===================================================================
--- Makefile.am.orig 2014-11-08 12:47:24.000000000 +0000
+++ Makefile.am 2018-08-01 23:54:10.532235224 +0000
@@ -126,7 +126,7 @@
nodist_libffi_la_SOURCES += src/bfin/ffi.c src/bfin/sysv.S
endif
if X86
-nodist_libffi_la_SOURCES += src/x86/ffi.c src/x86/sysv.S src/x86/win32.S
+nodist_libffi_la_SOURCES += src/x86/ffi.c src/x86/sysv.S
endif
if X86_FREEBSD
nodist_libffi_la_SOURCES += src/x86/ffi.c src/x86/freebsd.S src/x86/win32.S
Index: src/x86/ffi.c
===================================================================
--- src/x86/ffi.c.orig 2014-11-08 12:47:24.000000000 +0000
+++ src/x86/ffi.c 2018-08-01 23:59:43.730599037 +0000
@@ -340,9 +340,11 @@
ffi_call_win64(unsigned int (*)(char *, extended_cif *), extended_cif *,
unsigned, unsigned, unsigned *, void (*fn)(void));
#else
+#ifdef X86_WIN32
extern void
ffi_call_win32(unsigned int (*)(char *, extended_cif *), extended_cif *,
unsigned, unsigned, unsigned, unsigned *, void (*fn)(void));
+#endif
extern void ffi_call_SYSV(void (*)(char *, extended_cif *), extended_cif *,
unsigned, unsigned, unsigned *, void (*fn)(void));
#endif
@@ -393,11 +395,13 @@
case FFI_SYSV:
case FFI_MS_CDECL:
#endif
+#ifdef X86_WIN32
case FFI_STDCALL:
case FFI_THISCALL:
case FFI_FASTCALL:
case FFI_PASCAL:
case FFI_REGISTER:
+#endif
ffi_call_win32(ffi_prep_args, &ecif, cif->abi, cif->bytes, cif->flags,
ecif.rvalue, fn);
break;
@@ -428,10 +432,12 @@
__attribute__ ((regparm(1)));
#endif
#ifndef X86_WIN64
+#ifdef X86_WIN32
void FFI_HIDDEN ffi_closure_STDCALL (ffi_closure *);
void FFI_HIDDEN ffi_closure_THISCALL (ffi_closure *);
void FFI_HIDDEN ffi_closure_FASTCALL (ffi_closure *);
void FFI_HIDDEN ffi_closure_REGISTER (ffi_closure *);
+#endif
#else
void FFI_HIDDEN ffi_closure_win64 (ffi_closure *);
#endif
@@ -741,6 +747,7 @@
&ffi_closure_SYSV,
(void*)codeloc);
}
+#ifdef X86_WIN32
else if (cif->abi == FFI_REGISTER)
{
FFI_INIT_TRAMPOLINE_WIN32 (&closure->tramp[0],
@@ -765,7 +772,6 @@
&ffi_closure_STDCALL,
(void*)codeloc);
}
-#ifdef X86_WIN32
else if (cif->abi == FFI_MS_CDECL)
{
FFI_INIT_TRAMPOLINE (&closure->tramp[0],
@@ -910,11 +916,13 @@
case FFI_MS_CDECL:
#endif
#ifndef X86_WIN64
+#ifdef X86_WIN32
case FFI_STDCALL:
case FFI_THISCALL:
case FFI_FASTCALL:
case FFI_PASCAL:
case FFI_REGISTER:
+#endif
ffi_call_win32(ffi_prep_args_raw, &ecif, cif->abi, cif->bytes, cif->flags,
ecif.rvalue, fn);
break;
prev parent reply other threads:[~2018-08-02 0:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-01 23:38 Albert Chin
2018-08-01 23:54 ` Jeffrey Walton
2018-08-02 0:46 ` Albert Chin [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180802004640.GB29252@thewrittenword.com \
--to=libffi-discuss@mlists.thewrittenword.com \
--cc=libffi-discuss@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).