Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
8dc70282
D
dragonwell8_jdk
项目概览
openanolis
/
dragonwell8_jdk
通知
4
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell8_jdk
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
8dc70282
编写于
1月 22, 2013
作者:
E
erikj
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8004151: build-infra: Generating X11 wrapper offset file is not cross compilable
Reviewed-by: dholmes, ohrstrom
上级
5772d1c6
变更
3
展开全部
显示空白变更内容
内联
并排
Showing
3 changed file
with
2094 addition
and
51 deletion
+2094
-51
makefiles/GensrcX11Wrappers.gmk
makefiles/GensrcX11Wrappers.gmk
+62
-51
src/solaris/classes/sun/awt/X11/generator/sizes.32
src/solaris/classes/sun/awt/X11/generator/sizes.32
+1016
-0
src/solaris/classes/sun/awt/X11/generator/sizes.64
src/solaris/classes/sun/awt/X11/generator/sizes.64
+1016
-0
未找到文件。
makefiles/GensrcX11Wrappers.gmk
浏览文件 @
8dc70282
...
...
@@ -23,84 +23,95 @@
# questions.
#
# This file is responsible for extracting the x11 native struct offsets to
# the xawt Java library. This is done by compiling and running a native
# binary, which dumps output to a text file. The offsets differ on 32 and 64
# bit systems, so care must be taken here.
# the xawt Java library. The tool needs to be run on the os/arch that
# will host the final jvm, thus the tool cannot be used when cross compiling.
# To enable cross compiling, the two versions of the generated offset file,
# sizes.32 and sizes.64 are committed into the source code repository.
# These are the ones used.
# Note: Some of the more complex logic here is most likely not needed anymore.
# However when not cross compiling, the offset generator tool is built and
# run, to verify that it still generates the same sizes.32 and sizes.64.
GENSRC_X11WRAPPERS :=
# Put temporary c-code and executable to calculate offsets here.
# Also put verification offset file here as well.
GENSRC_X11WRAPPERS_TMP := $(JDK_OUTPUTDIR)/gensrc_x11wrappers
GENSRC_X11WRAPPERS_DST := $(JDK_OUTPUTDIR)/gensrc
# Put the generated Java classes used to interface X11 from awt here.
GENSRC_X11WRAPPERS_DST := $(JDK_OUTPUTDIR)/gensrc/sun/awt/X11
GENSRC_SIZER_SRC := $(JDK_TOPDIR)/src/solaris/classes/sun/awt/X11/generator
# Normal case is to generate version according to target bits
GENSRC_SIZES := sizes.$(OPENJDK_TARGET_CPU_BITS)
# The pre-calculated offset file are stored here:
GENSRC_SIZER_DIR := $(JDK_TOPDIR)/src/solaris/classes/sun/awt/X11/generator
# Normal case is to generate only according to target bits
GENSRC_X11_VERSION := $(OPENJDK_TARGET_CPU_BITS)
ifeq ($(OPENJDK_TARGET_CPU_BITS), 64)
ifneq ($(OPENJDK_TARGET_OS), linux)
# On all 64-bit systems except Linux, generate both 32 and 64 bit versions
GENSRC_SIZES := sizes.32 sizes.
64
endif
ifneq ($(OPENJDK_TARGET_OS), linux)
# On all 64-bit systems except Linux, generate both 32 and 64 bit versions
GENSRC_X11_VERSION := 32
64
endif
else
ifeq ($(OPENJDK_TARGET_OS), solaris)
# As a special case, solaris 32-bit also generates the 64-bit version
GENSRC_SIZES := sizes.32 sizes.
64
endif
ifeq ($(OPENJDK_TARGET_OS), solaris)
# As a special case, solaris 32-bit also generates the 64-bit version
GENSRC_X11_VERSION := 32
64
endif
endif
##########################################################################################
GENSRC_X11_SIZES_USED := $(addprefix $(GENSRC_X11WRAPPERS_TMP)/sizes.,$(GENSRC_X11_VERSION))
# Copy only the sizes.* files that are actually needed. WrapperGenerator picks up any it finds from the
# file prefix it is given so those not needed need to be hidden.
$(GENSRC_X11WRAPPERS_TMP)/sizes.%: $(GENSRC_SIZER_DIR)/sizes.%
$(MKDIR) -p $(@D)
$(RM) '$@'
$(SORT) $< > $@
$(GENSRC_X11WRAPPERS_TMP)/sizer/sizer.%.c : $(GENSRC_SIZER_SRC)/xlibtypes.txt $(BUILD_TOOLS)
# Run the tool on the offset files copied from the source repository to generate several Java classes
# used in awt.
$(JDK_OUTPUTDIR)/gensrc/_the.generated.x11 : $(GENSRC_X11_SIZES_USED) $(BUILD_TOOLS)
$(MKDIR) -p $(GENSRC_X11WRAPPERS_DST)
$(TOOL_WRAPPERGENERATOR) $(GENSRC_X11WRAPPERS_DST) $(GENSRC_SIZER_DIR)/xlibtypes.txt "gen" $(GENSRC_X11WRAPPERS_TMP)/sizes
$(TOUCH) $@
GENSRC_X11WRAPPERS += $(JDK_OUTPUTDIR)/gensrc/_the.generated.x11
ifneq ($(COMPILE_TYPE),cross)
# This is not a cross compile, regenerate the offset file, so that we
# can compare it with the version in the source code repository.
# Generate the C code for the program that will output the offset file.
$(GENSRC_X11WRAPPERS_TMP)/sizer.%.c : $(GENSRC_SIZER_DIR)/xlibtypes.txt $(BUILD_TOOLS)
$(ECHO) "Generating X11 wrapper ($*-bit version)"
$(MKDIR) -p $(@D)
$(RM) $@
$(TOOL_WRAPPERGENERATOR) $(@D) $< "sizer" $*
$(TOOL_WRAPPERGENERATOR) $(@D) $(GENSRC_SIZER_DIR)/xlibtypes.txt "sizer" $*
$(GENSRC_X11WRAPPERS_TMP)/sizer/sizer.%.exe : $(GENSRC_X11WRAPPERS_TMP)/sizer/sizer.%.c
# Compile the C code into an executable.
$(GENSRC_X11WRAPPERS_TMP)/sizer.%.exe : $(GENSRC_X11WRAPPERS_TMP)/sizer.%.c
$(MKDIR) -p $(@D)
$(RM) $@ $@.tmp
(cd $(@D) && $(BUILD_CC) -m$* -o $@.tmp $< \
(cd $(@D) && $(CC) -m$* -o $@ $< \
$(X_CFLAGS) \
$(X_LIBS) \
-I$(JDK_OUTPUTDIR)/include \
-I$(JDK_TOPDIR)/src/share/javavm/export \
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/javavm/export \
-I$(JDK_TOPDIR)/
/
src/share/native/common \
-I$(JDK_TOPDIR)/src/share/native/common \
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/common \
-I$(JDK_TOPDIR)/src/solaris/native/sun/awt \
-I$(JDK_TOPDIR)/src/share/native/sun/awt/debug \
-I$(JDK_TOPDIR)/src/share/native/sun/awt/image/cvutils -lc)
$(MV) $@.tmp $@
# Run the generated sizer binary to create the sizes text file
$(GENSRC_X11WRAPPERS_TMP)/sizer/sizes.% : $(GENSRC_X11WRAPPERS_TMP)/sizer/sizer.%.exe
$(MKDIR) -p $(@D)
$(RM) $@ $@.tmp
$< > $@.tmp
$(MV) $@.tmp $@
ifeq ($(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU), solaris-x86)
# On solaris-x86 we also need to create the 64-bit version, but we can't run a 64-bit binary
# As a workaround, copy this from a pre-generated file.
$(GENSRC_X11WRAPPERS_TMP)/sizer/sizes.64 : $(JDK_TOPDIR)/src/solaris/classes/sun/awt/X11/generator/sizes.64-solaris-i386
.PRECIOUS: $(GENSRC_X11WRAPPERS_TMP)/sizer.%.exe $(GENSRC_X11WRAPPERS_TMP)/sizer.%.c
# Run the executable create the offset file and check that it is identical
# to the offset file in the source code repository.
$(GENSRC_X11WRAPPERS_TMP)/sizes.%.verification : $(GENSRC_X11WRAPPERS_TMP)/sizer.%.exe
$(MKDIR) -p $(@D)
$(RM) $@
$(CP) $< $@
endif
$(GENSRC_X11WRAPPERS_TMP)/sizer.$*.exe | $(SORT) > $@.tmp
$(ECHO) Verifying $(GENSRC_X11WRAPPERS_TMP)/sizes.$*.verification.tmp to $(GENSRC_X11WRAPPERS_TMP)/sizes.$*
$(DIFF) $(GENSRC_X11WRAPPERS_TMP)/sizes.$*.verification.tmp $(GENSRC_X11WRAPPERS_TMP)/sizes.$*
mv $@.tmp $@
$(GENSRC_X11WRAPPERS_DST)/_the.generated.x11 : $(foreach S,$(GENSRC_SIZES),$(GENSRC_X11WRAPPERS_TMP)/sizer/$(S)) $(BUILD_TOOLS)
$(RM) $@
$(MKDIR) -p $(@D)/sun/awt/X11
$(TOOL_WRAPPERGENERATOR) $(@D)/sun/awt/X11 $(GENSRC_SIZER_SRC)/xlibtypes.txt "gen" $(GENSRC_X11WRAPPERS_TMP)/sizer/sizes
ifeq ($(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU), solaris-x86_64)
# On solaris-x86_64, as a safety measure, compare the generated file with the checked-in version
$(ECHO) COMPARING $(GENSRC_X11WRAPPERS_TMP)/sizer/sizes.64 and $(GENSRC_SIZER_SRC)/sizes.64-solaris-i386
$(DIFF) $(GENSRC_X11WRAPPERS_TMP)/sizer/sizes.64 $(GENSRC_SIZER_SRC)/sizes.64-solaris-i386
GENSRC_X11WRAPPERS += $(GENSRC_X11WRAPPERS_TMP)/sizes.$(OPENJDK_TARGET_CPU_BITS).verification
endif
$(TOUCH) $@
GENSRC_X11WRAPPERS += $(GENSRC_X11WRAPPERS_DST)/_the.generated.x11
src/solaris/classes/sun/awt/X11/generator/sizes.32
0 → 100644
浏览文件 @
8dc70282
此差异已折叠。
点击以展开。
src/solaris/classes/sun/awt/X11/generator/sizes.64
0 → 100644
浏览文件 @
8dc70282
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录