提交 dc707916 编写于 作者: D dholmes

7039182: PPC: NIO: java.io.IOException: Invalid argument in sun.nio.ch.FileDispatcherImpl.read0

Summary: Allow platform specific files to be located at build time instead of generating them
Reviewed-by: alanb, ohair
上级 4f9e284c
......@@ -60,5 +60,10 @@ ifeq ($(PLATFORM), linux)
endif
endif
# NIO Platform specific source file location
ifdef CROSS_COMPILE_ARCH
NIO_PLATFORM_CLASSES_ROOT_DIR = $(CLOSED_PLATFORM_SRC)/classes/
endif
endif # JAVASE_EMBEDDED
......@@ -255,7 +255,7 @@ FILES_export += \
sun/nio/fs/LinuxWatchService.java \
sun/nio/fs/UnixCopyFile.java \
sun/nio/fs/UnixNativeDispatcher.java
FILES_gen += \
sun/nio/fs/UnixConstants.java
endif # PLATFORM = linux
......@@ -771,7 +771,7 @@ $(CS_GEN)/CharsetEncoder.java: $(CHARSET_X_CODER_TEMPLATE) $(GEN_CODER_SH)
#
GEN_EX_SH = genExceptions.sh
GEN_EX_CMD = NAWK="$(NAWK)" SH="$(SH)" $(SH) $(GEN_EX_SH)
$(CH_GEN)/%Exception.java: genExceptions.sh $(CH_SRC)/exceptions
......@@ -820,14 +820,19 @@ $(TEMPDIR)/$(GENSOR_SRC) : $(GENSOR_SRC)
$(GENSOR_EXE) : $(TEMPDIR)/$(GENSOR_SRC)
$(prep-target)
($(CD) $(TEMPDIR); $(HOST_CC) $(CPPFLAGS) $(LDDFLAGS) \
($(CD) $(TEMPDIR); $(CC) $(CPPFLAGS) $(LDDFLAGS) \
-o genSocketOptionRegistry$(EXE_SUFFIX) $(GENSOR_SRC))
ifdef NIO_PLATFORM_CLASSES_ROOT_DIR
$(SCH_GEN)/SocketOptionRegistry.java: $(NIO_PLATFORM_CLASSES_ROOT_DIR)/sun/nio/ch/SocketOptionRegistry-$(PLATFORM)-$(ARCH).java
$(prep-target)
$(CP) $< $@
else
$(SCH_GEN)/SocketOptionRegistry.java: $(GENSOR_EXE)
$(prep-target)
NAWK="$(NAWK)" SH="$(SH)" $(SH) -e addNotices.sh "$(SOR_COPYRIGHT_YEARS)" > $@
$(GENSOR_EXE) >> $@
endif
#
# Generated sun.nio.cs SingleByte classes
#
......@@ -851,12 +856,18 @@ GENUC_COPYRIGHT_YEARS = $(shell $(CAT) $(GENUC_SRC) | \
$(GENUC_EXE) : $(GENUC_SRC)
$(prep-target)
$(HOST_CC) $(CPPFLAGS) -o $@ $(GENUC_SRC)
$(CC) $(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
$(prep-target)
$(CP) $< $@
else
$(SFS_GEN)/UnixConstants.java: $(GENUC_EXE)
$(prep-target)
NAWK="$(NAWK)" SH="$(SH)" $(SH) -e addNotices.sh "$(GENUC_COPYRIGHT_YEARS)" > $@
$(GENUC_EXE) >> $@
endif
GENSC_SRC = $(PLATFORM_SRC)/native/sun/nio/fs/genSolarisConstants.c
......@@ -867,11 +878,17 @@ GENSC_COPYRIGHT_YEARS = $(shell $(CAT) $(GENSC_SRC) | \
$(GENSC_EXE) : $(GENSC_SRC)
$(prep-target)
$(HOST_CC) $(CPPFLAGS) -o $@ $(GENSC_SRC)
$(CC) $(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
$(prep-target)
$(CP) $< $@
else
$(SFS_GEN)/SolarisConstants.java: $(GENSC_EXE)
$(prep-target)
NAWK="$(NAWK)" SH="$(SH)" $(SH) -e addNotices.sh "$(GENSC_COPYRIGHT_YEARS)" > $@
$(GENSC_EXE) >> $@
endif
.PHONY: sources
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册