提交 4f49502b 编写于 作者: C cl

Merge

...@@ -325,11 +325,11 @@ License instead of this License. ...@@ -325,11 +325,11 @@ License instead of this License.
"CLASSPATH" EXCEPTION TO THE GPL "CLASSPATH" EXCEPTION TO THE GPL
Certain source files distributed by Sun Microsystems, Inc. are subject to Certain source files distributed by Oracle America and/or its affiliates are
the following clarification and special exception to the GPL, but only where subject to the following clarification and special exception to the GPL, but
Sun has expressly included in the particular source file's header the words only where Oracle has expressly included in the particular source file's header
"Sun designates this particular file as subject to the "Classpath" exception the words "Oracle designates this particular file as subject to the "Classpath"
as provided by Sun in the LICENSE file that accompanied this code." exception as provided by Oracle in the LICENSE file that accompanied this code."
Linking this library statically or dynamically with other modules is making Linking this library statically or dynamically with other modules is making
a combined work based on this library. Thus, the terms and conditions of a combined work based on this library. Thus, the terms and conditions of
......
...@@ -359,7 +359,13 @@ ifeq ($(CC_VERSION),msvc) ...@@ -359,7 +359,13 @@ ifeq ($(CC_VERSION),msvc)
# VS2008 has bufferoverflow baked in: # VS2008 has bufferoverflow baked in:
LFLAGS_VS2008 = LFLAGS_VS2008 =
LFLAGS_VS2010 =
# VS2010, always need safe exception handlers, not needed on 64bit
ifeq ($(ARCH_DATA_MODEL), 32)
LFLAGS_VS2010 = -SAFESEH
else
LFLAGS_VS2010 =
endif
# LFLAGS are the flags given to $(LINK) and used to build the actual DLL file # LFLAGS are the flags given to $(LINK) and used to build the actual DLL file
BASELFLAGS = -nologo /opt:REF /incremental:no BASELFLAGS = -nologo /opt:REF /incremental:no
......
...@@ -124,9 +124,11 @@ JRE_MAN_PAGES = \ ...@@ -124,9 +124,11 @@ JRE_MAN_PAGES = \
tnameserv.1 \ tnameserv.1 \
unpack200.1 unpack200.1
ifndef OPENJDK
ifeq ($(ARCH_DATA_MODEL),32) ifeq ($(ARCH_DATA_MODEL),32)
JRE_MAN_PAGES += javaws.1 JRE_MAN_PAGES += javaws.1
endif endif
endif
JDK_MAN_PAGES = \ JDK_MAN_PAGES = \
$(JRE_MAN_PAGES) \ $(JRE_MAN_PAGES) \
......
...@@ -772,9 +772,20 @@ else ...@@ -772,9 +772,20 @@ else
BANNED_DLLS=msvcp100[.]dll|msvcr100d[.]dll|msvcrtd[.]dll BANNED_DLLS=msvcp100[.]dll|msvcr100d[.]dll|msvcrtd[.]dll
endif endif
# Macro to check it's input file for banned dependencies and verify the # Check for /safeseh (only used on 32bit)
# binary was built properly. Relies on process exit code. define binary_file_safeseh_verification # binary_file
define binary_file_verification # binary_file ( \
$(ECHO) "Checking for /SAFESEH usage in: $1" && \
if [ "`$(DUMPBIN) /loadconfig $1 | $(EGREP) -i 'Safe Exception Handler Table'`" = "" ] ; then \
$(ECHO) "ERROR: Did not find 'Safe Exception Handler Table' in loadconfig: $1" ; \
$(DUMPBIN) /loadconfig $1 ; \
exit 6 ; \
fi ; \
)
endef
# Check for /NXCOMPAT usage
define binary_file_nxcompat_verification # binary_file
( \ ( \
$(ECHO) "Checking for /NXCOMPAT usage in: $1" && \ $(ECHO) "Checking for /NXCOMPAT usage in: $1" && \
if [ "`$(DUMPBIN) /headers $1 | $(EGREP) -i 'NX compatible'`" = "" ] ; then \ if [ "`$(DUMPBIN) /headers $1 | $(EGREP) -i 'NX compatible'`" = "" ] ; then \
...@@ -782,12 +793,24 @@ define binary_file_verification # binary_file ...@@ -782,12 +793,24 @@ define binary_file_verification # binary_file
$(DUMPBIN) /headers $1 ; \ $(DUMPBIN) /headers $1 ; \
exit 7 ; \ exit 7 ; \
fi ; \ fi ; \
)
endef
# Check for /DYNAMICBASE usage
define binary_file_dynamicbase_verification # binary_file
( \
$(ECHO) "Checking for /DYNAMICBASE usage in: $1" && \ $(ECHO) "Checking for /DYNAMICBASE usage in: $1" && \
if [ "`$(DUMPBIN) /headers $1 | $(EGREP) -i 'Dynamic base'`" = "" ] ; then \ if [ "`$(DUMPBIN) /headers $1 | $(EGREP) -i 'Dynamic base'`" = "" ] ; then \
$(ECHO) "ERROR: Did not find 'Dynamic base' in headers: $1" ; \ $(ECHO) "ERROR: Did not find 'Dynamic base' in headers: $1" ; \
$(DUMPBIN) /headers $1 ; \ $(DUMPBIN) /headers $1 ; \
exit 8 ; \ exit 8 ; \
fi ; \ fi ; \
)
endef
# Check for banned dll usage
define binary_file_dll_verification # binary_file
( \
$(ECHO) "Checking for banned dependencies in: $1" && \ $(ECHO) "Checking for banned dependencies in: $1" && \
if [ "`$(DUMPBIN) /dependents $1 | $(EGREP) -i '$(BANNED_DLLS)'`" != "" ] ; then \ if [ "`$(DUMPBIN) /dependents $1 | $(EGREP) -i '$(BANNED_DLLS)'`" != "" ] ; then \
$(ECHO) "ERROR: Found use of $(BANNED_DLLS)"; \ $(ECHO) "ERROR: Found use of $(BANNED_DLLS)"; \
...@@ -797,6 +820,27 @@ define binary_file_verification # binary_file ...@@ -797,6 +820,27 @@ define binary_file_verification # binary_file
) )
endef endef
# Macro to check it's input file for properly built executables.
# Relies on process exit code. Different for 32bit vs 64bit.
ifeq ($(ARCH_DATA_MODEL),32)
define binary_file_verification # binary_file
( \
$(call binary_file_safeseh_verification,$1); \
$(call binary_file_nxcompat_verification,$1); \
$(call binary_file_dynamicbase_verification,$1); \
$(call binary_file_dll_verification,$1); \
)
endef
else
define binary_file_verification # binary_file
( \
$(call binary_file_nxcompat_verification,$1); \
$(call binary_file_dynamicbase_verification,$1); \
$(call binary_file_dll_verification,$1); \
)
endef
endif
else else
# Macro to check it's input file for banned dependencies and verify the # Macro to check it's input file for banned dependencies and verify the
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册