From 74d2afd707293762f6500058b4d6391cfd99e2dc Mon Sep 17 00:00:00 2001 From: Joel Dice Date: Mon, 20 Dec 2010 12:11:29 -0700 Subject: [PATCH] use "no-underscore" naming convention for 64-bit Windows GCC 4.5.1 and later use a naming convention where functions are not prefixed with an underscore, whereas previous versions added the underscore. This change was made to ensure compatibility with Microsoft's compiler. Since GCC 4.5.0 has a serious code generation bug, we now only support later versions, so it makes sense to assume the newer convention. --- readme.txt | 2 +- src/boot.cpp | 4 ++-- src/compile-x86.S | 3 ++- src/x86.S | 3 ++- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/readme.txt b/readme.txt index 6a611da785..f8b7a51e06 100644 --- a/readme.txt +++ b/readme.txt @@ -62,7 +62,7 @@ Building Build requirements include: * GNU make 3.80 or later - * GCC 3.4 or later (4.5 or later for Windows/x86_64) + * GCC 3.4 or later (4.5.1 or later for Windows/x86_64) * JDK 1.5 or later * MinGW 3.4 or later (only if compiling for Windows) * zlib 1.2.3 or later diff --git a/src/boot.cpp b/src/boot.cpp index 1535584ace..7e074c0a14 100644 --- a/src/boot.cpp +++ b/src/boot.cpp @@ -32,7 +32,7 @@ extern "C" void __cxa_pure_virtual(void) { abort(); } #ifdef BOOT_IMAGE -#if (defined __MINGW32__) || (defined _MSC_VER) +#if (! defined __x86_64__) && ((defined __MINGW32__) || (defined _MSC_VER)) # define SYMBOL(x) binary_bootimage_bin_##x #else # define SYMBOL(x) _binary_bootimage_bin_##x @@ -58,7 +58,7 @@ extern "C" { #ifdef BOOT_CLASSPATH -#if (defined __MINGW32__) || (defined _MSC_VER) +#if (! defined __x86_64__) && ((defined __MINGW32__) || (defined _MSC_VER)) # define SYMBOL(x) binary_classpath_jar_##x #else # define SYMBOL(x) _binary_classpath_jar_##x diff --git a/src/compile-x86.S b/src/compile-x86.S index 07da66ae3f..41a0d2ae07 100644 --- a/src/compile-x86.S +++ b/src/compile-x86.S @@ -12,7 +12,8 @@ #define LOCAL(x) .L##x -#if defined __APPLE__ || defined __MINGW32__ || defined __CYGWIN32__ +#if defined __APPLE__ \ + || ((defined __MINGW32__ || defined __CYGWIN32__) && ! defined __x86_64__) # define GLOBAL(x) _##x #else # define GLOBAL(x) x diff --git a/src/x86.S b/src/x86.S index ebee7a4474..552e093bdc 100644 --- a/src/x86.S +++ b/src/x86.S @@ -12,7 +12,8 @@ #define LOCAL(x) .L##x -#if defined __APPLE__ || defined __MINGW32__ || defined __CYGWIN32__ +#if defined __APPLE__ \ + || ((defined __MINGW32__ || defined __CYGWIN32__) && ! defined __x86_64__) # define GLOBAL(x) _##x #else # define GLOBAL(x) x