--- old/make/common/NativeCompilation.gmk 2020-05-20 17:58:47.780687120 -0700 +++ new/make/common/NativeCompilation.gmk 2020-05-20 17:58:47.440680591 -0700 @@ -239,31 +239,17 @@ # When compiling with relative paths, the deps file comes out with relative # paths. - ifeq ($(TOOLCHAIN_TYPE), solstudio) - define fix-deps-file - $(SED) -e 's|\./|$(WORKSPACE_ROOT)/|g' $1.tmp > $1 - endef - else - define fix-deps-file + define fix-deps-file $(SED) -e 's|^\([ ]*\)|\1$(WORKSPACE_ROOT)|' $1.tmp > $1 - endef - endif + endef else # By default the MakeCommandRelative macro does nothing. MakeCommandRelative = $1 - # Even with absolute paths on the command line, the Solaris studio compiler - # doesn't output the full path to the object file in the generated deps files. - # For other toolchains, no adjustment is needed. - ifeq ($(TOOLCHAIN_TYPE), solstudio) - define fix-deps-file - $(SED) 's|^$$(@F):|$$@:|' $1.tmp > $1 - endef - else - define fix-deps-file + # No adjustment is needed. + define fix-deps-file $(MV) $1.tmp $1 - endef - endif + endef endif ################################################################################ @@ -474,7 +460,6 @@ # RC_FLAGS flags for RC. # EMBED_MANIFEST if true, embed manifest on Windows. # MAPFILE mapfile -# REORDER reorder file # USE_MAPFILE_FOR_SYMBOLS if true and this is a STATIC_BUILD, just copy the # mapfile for the output symbols file # CC the compiler to use, default is $(CC) @@ -712,11 +697,6 @@ $1_EXTRA_ASFLAGS += $$(ASFLAGS_DEBUG_SYMBOLS) endif - ifneq ($$($1_REORDER), ) - $1_EXTRA_CFLAGS += $$(C_FLAG_REORDER) - $1_EXTRA_CXXFLAGS += $$(C_FLAG_REORDER) - endif - # Pass the library name for static JNI library naming ifeq ($$($1_TYPE), STATIC_LIBRARY) $1_EXTRA_CFLAGS += -DLIBRARY_NAME=$$($1_NAME) @@ -750,7 +730,6 @@ ifeq ($$($1_WARNINGS_AS_ERRORS_$(TOOLCHAIN_TYPE)), true) $1_EXTRA_CFLAGS += $(CFLAGS_WARNINGS_ARE_ERRORS) $1_EXTRA_CXXFLAGS += $(CFLAGS_WARNINGS_ARE_ERRORS) - $1_EXTRA_LDFLAGS += $(LDFLAGS_WARNINGS_ARE_ERRORS) endif ifeq (NONE, $$($1_OPTIMIZATION)) @@ -942,17 +921,6 @@ ifneq ($(DISABLE_MAPFILES), true) $1_REAL_MAPFILE := $$($1_MAPFILE) - ifeq ($(call isTargetOs, windows), false) - ifneq ($$($1_REORDER), ) - $1_REAL_MAPFILE := $$($1_OBJECT_DIR)/mapfile - - $$($1_REAL_MAPFILE) : $$($1_MAPFILE) $$($1_REORDER) - $$(call MakeDir, $$(@D)) - $$(CP) $$($1_MAPFILE) $$@.tmp - $$(SED) -e 's=OUTPUTDIR=$$($1_OBJECT_DIR)=' $$($1_REORDER) >> $$@.tmp - $$(MV) $$@.tmp $$@ - endif - endif endif # Pickup extra OPENJDK_TARGET_OS_TYPE and/or OPENJDK_TARGET_OS dependent variables @@ -986,7 +954,7 @@ $1_DEBUGINFO_FILES := $$($1_SYMBOLS_DIR)/$$($1_NOSUFFIX).pdb \ $$($1_SYMBOLS_DIR)/$$($1_NOSUFFIX).map - else ifeq ($(call isTargetOs, linux solaris), true) + else ifeq ($(call isTargetOs, linux), true) $1_DEBUGINFO_FILES := $$($1_SYMBOLS_DIR)/$$($1_NOSUFFIX).debuginfo # Setup the command line creating debuginfo files, to be run after linking. # It cannot be run separately since it updates the original target file @@ -1113,7 +1081,7 @@ endif $1_VARDEPS := $$($1_LD) $$($1_SYSROOT_LDFLAGS) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) \ - $$(GLOBAL_LIBS) $$($1_LIBS) $$($1_EXTRA_LIBS) $$($1_MT) \ + $$($1_LIBS) $$($1_EXTRA_LIBS) $$($1_MT) \ $$($1_CREATE_DEBUGINFO_CMDS) $$($1_MANIFEST_VERSION) \ $$($1_STRIP_CMD) $1_VARDEPS_FILE := $$(call DependOnVariable, $1_VARDEPS, \ @@ -1172,7 +1140,7 @@ $$(call ExecuteWithLog, $$($1_OBJECT_DIR)/$$($1_SAFE_NAME)_link, \ $$($1_LD) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) $$($1_SYSROOT_LDFLAGS) \ - $(LD_OUT_OPTION)$$($1_TARGET) $$($1_LD_OBJ_ARG) $$($1_RES) $$(GLOBAL_LIBS) \ + $(LD_OUT_OPTION)$$($1_TARGET) $$($1_LD_OBJ_ARG) $$($1_RES) \ $$($1_LIBS) $$($1_EXTRA_LIBS)) \ | $(GREP) -v "^ Creating library .*\.lib and object .*\.exp" || \ test "$$$$?" = "1" ; \ @@ -1182,7 +1150,7 @@ $$(call ExecuteWithLog, $$($1_OBJECT_DIR)/$$($1_SAFE_NAME)_link, \ $$(if $$($1_LINK_OBJS_RELATIVE), $$(CD) $$(OUTPUTDIR) ; ) \ $$($1_LD) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) $$($1_SYSROOT_LDFLAGS) \ - $(LD_OUT_OPTION)$$($1_TARGET) $$($1_LD_OBJ_ARG) $$($1_RES) $$(GLOBAL_LIBS) \ + $(LD_OUT_OPTION)$$($1_TARGET) $$($1_LD_OBJ_ARG) $$($1_RES) \ $$($1_LIBS) $$($1_EXTRA_LIBS)) ; \ $$($1_CREATE_DEBUGINFO_CMDS) $$($1_STRIP_CMD)