  
  GENSC_SRC = $(PLATFORM_SRC)/native/sun/nio/fs/genSolarisConstants.c
  
-@@ -889,7 +881,7 @@ GENSC_COPYRIGHT_YEARS = $(shell $(CAT) $(GENSC_SRC) | \
- 
- $(GENSC_EXE) : $(GENSC_SRC)
- 	$(prep-target)
--	$(CC) $(CPPFLAGS) -o $@ $(GENSC_SRC)
-+	$(CC_FOR_BUILD) $(CPPFLAGS) -o $@ $(GENSC_SRC)
- 
- ifdef NIO_PLATFORM_CLASSES_ROOT_DIR
- $(SFS_GEN)/SolarisConstants.java: $(NIO_PLATFORM_CLASSES_ROOT_DIR)/sun/nio/fs/SolarisConstants-$(PLATFORM)-$(ARCH).java
-@@ -899,11 +891,7 @@ else
+@@ -999,11 +991,7 @@
  $(SFS_GEN)/SolarisConstants.java: $(GENSC_EXE)
  	$(prep-target)
  	NAWK="$(NAWK)" SH="$(SH)" $(SH) -e addNotices.sh "$(GENSC_COPYRIGHT_YEARS)" > $@

 #
 # Generated sun.nio.cs SingleByte classes
 #
@@ -863,7 +859,7 @@ GENUC_COPYRIGHT_YEARS = $(shell $(CAT) $(GENUC_SRC) | \
 
 $(GENUC_EXE) : $(GENUC_SRC)
 	$(prep-target)
-	$(CC) $(CPPFLAGS) -o $@ $(GENUC_SRC)
+	$(CC_FOR_BUILD) $(CPPFLAGS) -o $@ $(GENUC_SRC)
 
 ifdef NIO_PLATFORM_CLASSES_ROOT_DIR
 $(SFS_GEN)/UnixConstants.java: $(NIO_PLATFORM_CLASSES_ROOT_DIR)/sun/nio/fs/UnixConstants-$(PLATFORM)-$(ARCH).java
@@ -873,12 +869,8 @@ else
 $(SFS_GEN)/UnixConstants.java: $(GENUC_EXE)
 	$(prep-target)
 	NAWK="$(NAWK)" SH="$(SH)" $(SH) -e addNotices.sh "$(GENUC_COPYRIGHT_YEARS)" > $@

Index: openjdk/jdk/make/java/nio/Makefile
===================================================================
--- openjdk/jdk/make/java/nio/Makefile	2013-10-01 21:20:11.000000000 -0700
+++ openjdk/jdk/make/java/nio/Makefile	2013-10-01 21:30:40.901837422 -0700
@@ -918,7 +918,7 @@
 ifeq ($(PLATFORM), macosx)
   NIO_CC=$(HOST_CC)
 else
-  NIO_CC=$(CC)
+  NIO_CC=$(CC_FOR_BUILD)
 endif
 
 $(GENSOR_EXE) : $(TEMPDIR)/$(GENSOR_SRC)
@@ -934,12 +934,8 @@
 $(SCH_GEN)/SocketOptionRegistry.java: $(GENSOR_EXE)
 	$(prep-target)
 	NAWK="$(NAWK)" SH="$(SH)" $(SH) -e addNotices.sh "$(SOR_COPYRIGHT_YEARS)" > $@
