[8u]RFR: 8263061: copy wrong unpack200.diz to bin directory on linux after 8252395
Severin Gehwolf
sgehwolf at redhat.com
Fri Mar 5 17:54:59 UTC 2021
On Fri, 2021-03-05 at 07:35 +0000, kalinshi(施慧) wrote:
> Hi,
>
> Please help review this fix.
> After 8252395, unpack200 executable is wrongly copied to bin directory
> as unpack200.diz when configure with debuginfo.
>
> Makefile sets same prerequisite for unpack200 executable and debuginfo
> file. install-file function always copies first prerequisite, which is
> executable.
> Fix is use debuginfo file as first prerequisite and copy it.
>
> webrev: http://cr.openjdk.java.net/~hshi/8263061/webrev1/
> bug: https://bugs.openjdk.java.net/browse/JDK-8263061
558 # move DEBUGINFO_EXT suffix prerequisite to first prerequisite
559 BUILD_UNPACK_DEBUGINFO := $(filter %$(DEBUGINFO_EXT), $(BUILD_UNPACKEXE))
560 BUILD_UNPACK_DEBUGINFO += $(filter-out %$(DEBUGINFO_EXT), $(BUILD_UNPACKEXE))
561 $(JDK_OUTPUTDIR)/bin$(OUTPUT_SUBDIR)/unpack200$(DEBUGINFO_EXT): $(BUILD_UNPACK_DEBUGINFO)
562 $(call install-file)
Rather than sorting dependencies to be in the right order (make
unpack200.(debuginfo|diz) the first dependency) just to suit the
install-file macro, have you considered using a similar pattern than is
used for the java launcher? I.e. lets just not use install-file for
this one.
This perhaps?
diff --git a/make/CompileLaunchers.gmk b/make/CompileLaunchers.gmk
--- a/make/CompileLaunchers.gmk
+++ b/make/CompileLaunchers.gmk
@@ -556,7 +556,9 @@
$(call install-file)
$(JDK_OUTPUTDIR)/bin$(OUTPUT_SUBDIR)/unpack200$(DEBUGINFO_EXT): $(BUILD_UNPACKEXE)
- $(call install-file)
+ $(MKDIR) -p $(@D)
+ $(RM) $@
+ $(CP) -R $(JDK_OUTPUTDIR)/objs/unpackexe$(OUTPUT_SUBDIR)/unpack200$(DEBUGINFO_EXT) $@
BUILD_LAUNCHERS += $(JDK_OUTPUTDIR)/bin$(OUTPUT_SUBDIR)/unpack200$(EXE_SUFFIX)
ifeq ($(ENABLE_DEBUG_SYMBOLS), true)
Thanks,
Severin
More information about the jdk8u-dev
mailing list