- 
    Bug 
- 
    Resolution: Fixed
- 
     P4 P4
- 
    10
- 
    None
- 
        b01
                    After  https://bugs.openjdk.java.net/browse/JDK-8173834  Erik Joelsson suggested a few more adjustments to the jspawnhelper build : 
* Inline BUILD_JSPAWNHELPER_SRC, JSPAWNHELPER_CFLAGS, BUILD_JSPAWNHELPER_DST_DIR and LINK_JSPAWNHELPER_OBJECTS.
Since these variables aren't conditionally changed anywhere, there is really no need for the indirection.
* The whole business of "BUILD_JSPAWNHELPER_LDFLAGS +=
$(COMPILER_TARGET_BITS_FLAG)64" is confusing to me. Don't we trust the compiler for a 64 bit target to produce a 64 bit binary given the
standard CFLAGS_JDKEXE and LDFLAGS_JDKLIB? I suspect this is just very old and confused code
* The src dir only has the one src file, no need to explicitly list it for include.
* The adding of childproc.o to LIBS can be accomplished using the parameter EXTRA_OBJECT_FILES. By using that you automatically get the dependency declaration so you can remove the line
"$(BUILD_JSPAWNHELPER): $(LINK_JSPAWNHELPER_OBJECTS)"
* The ifeq ($(BUILD_JSPAWNHELPER), 1) is also annoying, just move the
single conditional into it's place.
            
* Inline BUILD_JSPAWNHELPER_SRC, JSPAWNHELPER_CFLAGS, BUILD_JSPAWNHELPER_DST_DIR and LINK_JSPAWNHELPER_OBJECTS.
Since these variables aren't conditionally changed anywhere, there is really no need for the indirection.
* The whole business of "BUILD_JSPAWNHELPER_LDFLAGS +=
$(COMPILER_TARGET_BITS_FLAG)64" is confusing to me. Don't we trust the compiler for a 64 bit target to produce a 64 bit binary given the
standard CFLAGS_JDKEXE and LDFLAGS_JDKLIB? I suspect this is just very old and confused code
* The src dir only has the one src file, no need to explicitly list it for include.
* The adding of childproc.o to LIBS can be accomplished using the parameter EXTRA_OBJECT_FILES. By using that you automatically get the dependency declaration so you can remove the line
"$(BUILD_JSPAWNHELPER): $(LINK_JSPAWNHELPER_OBJECTS)"
* The ifeq ($(BUILD_JSPAWNHELPER), 1) is also annoying, just move the
single conditional into it's place.