From be50b87a490e794362cb4a27ada2fbaab202adb8 Mon Sep 17 00:00:00 2001 From: Josh Triplett Date: Mon, 24 Mar 2014 21:44:13 -0700 Subject: [PATCH] Always use configure to detect whether global symbols need underscores 64-bit Windows already used this check; make it universal, and use it in place of an ifdef on X86_WIN32, to handle non-Windows platforms that use the underscore, such as Darwin. --- configure.ac | 8 +++----- src/x86/win32.S | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/configure.ac b/configure.ac index 3169c434..ffcdd49f 100644 --- a/configure.ac +++ b/configure.ac @@ -439,11 +439,9 @@ AC_ARG_ENABLE(pax_emutramp, [Define this if you want to enable pax emulated trampolines]) fi) -if test x$TARGET = xX86_WIN64; then - LT_SYS_SYMBOL_USCORE - if test "x$sys_symbol_underscore" = xyes; then - AC_DEFINE(SYMBOL_UNDERSCORE, 1, [Define if symbols are underscored.]) - fi +LT_SYS_SYMBOL_USCORE +if test "x$sys_symbol_underscore" = xyes; then + AC_DEFINE(SYMBOL_UNDERSCORE, 1, [Define if symbols are underscored.]) fi FFI_EXEC_TRAMPOLINE_TABLE=0 diff --git a/src/x86/win32.S b/src/x86/win32.S index 826a5a0f..d71c8b86 100644 --- a/src/x86/win32.S +++ b/src/x86/win32.S @@ -473,7 +473,7 @@ END #else -#if defined(X86_WIN32) +#if defined(SYMBOL_UNDERSCORE) #define USCORE_SYMBOL(x) _##x #else #define USCORE_SYMBOL(x) x