From 8706b6ad4a5cb61830074a512b1b55e6adcf73af Mon Sep 17 00:00:00 2001 From: Joel Dice Date: Fri, 6 Jul 2012 11:21:53 -0600 Subject: [PATCH] fall back to x86_64-w64-mingw32 compiler for 32-bit Windows builds if i686-w64-mingw32 compiler not found A multilib-capable x86_64-w64-mingw32 compiler should work just fine, but since we don't know if it's mutilib or not, we try the i686-w64-mingw32 version first. --- makefile | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/makefile b/makefile index 5d2a6b2f52..eeb2ce4ffe 100755 --- a/makefile +++ b/makefile @@ -407,12 +407,14 @@ ifeq ($(platform),windows) ifeq (,$(filter mingw32 cygwin,$(build-platform))) openjdk-extra-cflags += -I$(src)/openjdk/caseSensitive - cxx = i686-w64-mingw32-g++ -m32 - cc = i686-w64-mingw32-gcc -m32 - dlltool = i686-w64-mingw32-dlltool -mi386 --as-flags=--32 - ar = i686-w64-mingw32-ar - ranlib = i686-w64-mingw32-ranlib - strip = i686-w64-mingw32-strip --strip-all + prefix := $(shell i686-w64-mingw32-gcc --version >/dev/null 2>&1 \ + && echo i686-w64-mingw32- || echo x86_64-w64-mingw32-) + cxx = $(prefix)g++ -m32 + cc = $(prefix)gcc -m32 + dlltool = $(prefix)dlltool -mi386 --as-flags=--32 + ar = $(prefix)ar + ranlib = $(prefix)ranlib + strip = $(prefix)strip --strip-all else build-system = windows common-cflags += "-I$(JAVA_HOME)/include/win32"