From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 74181 invoked by alias); 2 Aug 2018 00:46:45 -0000 Mailing-List: contact libffi-discuss-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libffi-discuss-owner@sourceware.org Received: (qmail 74165 invoked by uid 89); 2 Aug 2018 00:46:44 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-8.7 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_2,GIT_PATCH_3,KAM_ASCII_DIVIDERS,KAM_LAZY_DOMAIN_SECURITY,KAM_NUMSUBJECT autolearn=ham version=3.3.2 spammy=HTo:U*libffi-discuss, H*Ad:U*libffi-discuss, cif, chin X-HELO: mail1.thewrittenword.com Received: from mail1.thewrittenword.com (HELO mail1.thewrittenword.com) (50.194.72.151) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 02 Aug 2018 00:46:43 +0000 Received: from mail2.il.thewrittenword.com (emma-internal-gw.il.thewrittenword.com [192.168.13.25]) by mail1.thewrittenword.com (Postfix) with ESMTP id 5311F5C27 for ; Thu, 2 Aug 2018 01:45:51 +0000 (UTC) Received: from pom.il.thewrittenword.com (danger.il.thewrittenword.com [10.191.57.254]) by mail2.il.thewrittenword.com (Postfix) with ESMTP id 4006A139E7 for ; Thu, 2 Aug 2018 00:46:41 +0000 (UTC) Received: by pom.il.thewrittenword.com (Postfix, from userid 1000) id E97A910830BD; Wed, 1 Aug 2018 19:46:40 -0500 (CDT) Date: Thu, 02 Aug 2018 00:46:00 -0000 From: Albert Chin To: libffi-discuss@sourceware.org Subject: Re: 3.2.1 on Solaris 10/x86 Message-ID: <20180802004640.GB29252@thewrittenword.com> Reply-To: libffi-discuss@sourceware.org References: <20180801233807.GA29252@thewrittenword.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="0OAP2g/MAC+5xKAE" Content-Disposition: inline In-Reply-To: <20180801233807.GA29252@thewrittenword.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-IsSubscribed: yes X-SW-Source: 2018/txt/msg00037.txt.bz2 --0OAP2g/MAC+5xKAE Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-length: 1398 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) --0OAP2g/MAC+5xKAE Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="x86_win32.patch" Content-length: 2830 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; --0OAP2g/MAC+5xKAE--