 -endif
  
  .PHONY: sources 
---- openjdk/jdk/make/sun/Makefile.khem	2012-08-10 19:32:40.695550897 -0700
-+++ openjdk/jdk/make/sun/Makefile	2012-08-10 19:33:39.195550853 -0700
-@@ -55,7 +55,7 @@ ifneq ($(PLATFORM), windows)
+Index: openjdk/jdk/make/sun/Makefile
+===================================================================
+--- openjdk/jdk/make/sun/Makefile	2013-07-25 09:10:09.000000000 -0700
++++ openjdk/jdk/make/sun/Makefile	2013-10-01 21:32:01.625839149 -0700
+@@ -55,7 +55,7 @@
      endif
    endif
    HEADLESS_SUBDIR = headless

diff --git openjdk/jdk/make/java/nio/Makefile openjdk/jdk/make/java/nio/Makefile
index 7906531..afa5d46 100644
--- openjdk/jdk/make/java/nio/Makefile
+++ openjdk/jdk/make/java/nio/Makefile
@@ -823,7 +823,7 @@ $(TEMPDIR)/$(GENSOR_SRC) : $(GENSOR_SRC)
 
 $(GENSOR_EXE) : $(TEMPDIR)/$(GENSOR_SRC)
 	$(prep-target)
-	($(CD) $(TEMPDIR); $(CC) $(CPPFLAGS) $(LDDFLAGS) \
+	($(CD) $(TEMPDIR); $(CC_FOR_BUILD) $(CPPFLAGS) $(LDDFLAGS) \
 	   -o genSocketOptionRegistry$(EXE_SUFFIX) $(GENSOR_SRC))
 
 ifdef NIO_PLATFORM_CLASSES_ROOT_DIR
@@ -834,12 +834,8 @@ else
 $(SCH_GEN)/SocketOptionRegistry.java: $(GENSOR_EXE)
 	$(prep-target)
 	NAWK="$(NAWK)" SH="$(SH)" $(SH) -e addNotices.sh "$(SOR_COPYRIGHT_YEARS)" > $@

 
 GENSC_SRC = $(PLATFORM_SRC)/native/sun/nio/fs/genSolarisConstants.c
 
@@ -999,11 +991,7 @@
 $(SFS_GEN)/SolarisConstants.java: $(GENSC_EXE)
 	$(prep-target)
 	NAWK="$(NAWK)" SH="$(SH)" $(SH) -e addNotices.sh "$(GENSC_COPYRIGHT_YEARS)" > $@
