# HG changeset patch # User katleman # Date 1367358054 25200 # Node ID 7a96ead5ea89cd3c432ea4d52f2200bd10dda901 # Parent 53be90fb39d6b2e00bcad37f1fc0f7cf59da11b3# Parent 12af7c32c6484a0fb6aa94ee2692c525951d959f Merge diff -r 53be90fb39d6 -r 7a96ead5ea89 makefiles/GensrcX11Wrappers.gmk --- a/makefiles/GensrcX11Wrappers.gmk Thu Apr 25 09:24:24 2013 -0700 +++ b/makefiles/GensrcX11Wrappers.gmk Tue Apr 30 14:40:54 2013 -0700 @@ -86,10 +86,15 @@ $(MKDIR) -p $(@D) $(TOOL_WRAPPERGENERATOR) $(@D) $(GENSRC_SIZER_DIR)/xlibtypes.txt "sizer" $* + # use -m32/-m64 only if the compiler supports it + ifeq ($(COMPILER_SUPPORTS_TARGET_BITS_FLAG),true) + MEMORY_MODEL_FLAG="-m$*" + endif + # Compile the C code into an executable. $(GENSRC_X11WRAPPERS_TMP)/sizer.%.exe : $(GENSRC_X11WRAPPERS_TMP)/sizer.%.c $(MKDIR) -p $(@D) - (cd $(@D) && $(CC) -m$* -o $@ $< \ + (cd $(@D) && $(CC) $(MEMORY_MODEL_FLAG) -o $@ $< \ $(X_CFLAGS) \ $(X_LIBS) \ -I$(JDK_OUTPUTDIR)/include \