From 8d3b0051f6d016b9362f47cdcb02dff816de25b6 Mon Sep 17 00:00:00 2001 From: Tom Ritter Date: Wed, 8 Feb 2017 09:36:04 -0600 Subject: [PATCH] Bug 1336569 Define SYMBOL_UNDERSCORE for ffi in the mingw build r=glandium MozReview-Commit-ID: 6BiTcohFDPk --HG-- extra : rebase_source : d783f2950009d07ea45cdcc693771f4141df6ee9 --- build/moz.configure/toolchain.configure | 2 ++ config/external/ffi/moz.build | 3 +++ 2 files changed, 5 insertions(+) diff --git a/build/moz.configure/toolchain.configure b/build/moz.configure/toolchain.configure index 3193a060d0c5..7496a26fa10a 100644 --- a/build/moz.configure/toolchain.configure +++ b/build/moz.configure/toolchain.configure @@ -763,6 +763,8 @@ def compiler(language, host_or_target, c_compiler=None, other_compiler=None, # Set CC_TYPE/CC_VERSION/HOST_CC_TYPE/HOST_CC_VERSION to allow # old-configure to do some of its still existing checks. if language == 'C': + set_config( + '%s_TYPE' % var, delayed_getattr(valid_compiler, 'type')) add_old_configure_assignment( '%s_TYPE' % var, delayed_getattr(valid_compiler, 'type')) add_old_configure_assignment( diff --git a/config/external/ffi/moz.build b/config/external/ffi/moz.build index d3761f8bb5b4..e9ef07de329c 100644 --- a/config/external/ffi/moz.build +++ b/config/external/ffi/moz.build @@ -85,6 +85,9 @@ else: elif CONFIG['FFI_TARGET'] == 'X86_64': ffi_srcs = ('ffi64.c', 'unix64.S', 'ffi.c', 'sysv.S') elif CONFIG['FFI_TARGET'] == 'X86_WIN32': + # MinGW Build for 32 bit + if CONFIG['CC_TYPE'] == 'gcc': + DEFINES['SYMBOL_UNDERSCORE'] = True ffi_srcs = ('ffi.c', 'win32.S') elif CONFIG['FFI_TARGET'] == 'X86_WIN64': ffi_srcs = ('ffi.c', 'win64.S')