changeset 7363:12af7c32c648

8013480: fix zero build on arm Reviewed-by: erikj
author omajid
date Mon, 29 Apr 2013 12:34:53 -0400
parents d5228e624826
children 7a96ead5ea89
files makefiles/GensrcX11Wrappers.gmk
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/makefiles/GensrcX11Wrappers.gmk	Tue Apr 23 18:25:52 2013 -0700
+++ b/makefiles/GensrcX11Wrappers.gmk	Mon Apr 29 12:34:53 2013 -0400
@@ -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 \