Merge
authorkatleman
Wed, 01 May 2013 14:59:55 -0700
changeset 17048 83fc67bd203a
parent 17045 e11a3c6cc076 (current diff)
parent 17047 ef3b89e2b4e0 (diff)
child 17049 a7caf0d4cb98
Merge
--- a/jdk/makefiles/GensrcX11Wrappers.gmk	Tue Apr 30 21:49:38 2013 -0700
+++ b/jdk/makefiles/GensrcX11Wrappers.gmk	Wed May 01 14:59:55 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 \