7198329: Add $(sort) to object files used in links makes binarties more consistent
Reviewed-by: dholmes, tbell, erikj, ihse, ohrstrom
--- a/hotspot/make/bsd/makefiles/launcher.make Tue Sep 18 10:25:20 2012 -0700
+++ b/hotspot/make/bsd/makefiles/launcher.make Tue Sep 18 13:15:28 2012 -0700
@@ -101,7 +101,7 @@
$(LAUNCHER): $(OBJS) $(LIBJVM) $(LAUNCHER_MAPFILE)
$(QUIETLY) echo Linking launcher...
$(QUIETLY) $(LINK_LAUNCHER/PRE_HOOK)
- $(QUIETLY) $(LINK_LAUNCHER) $(LFLAGS_LAUNCHER) -o $@ $(OBJS) $(LIBS_LAUNCHER)
+ $(QUIETLY) $(LINK_LAUNCHER) $(LFLAGS_LAUNCHER) -o $@ $(sort $(OBJS)) $(LIBS_LAUNCHER)
$(QUIETLY) $(LINK_LAUNCHER/POST_HOOK)
# Sign the launcher with the development certificate (if present) so that it can be used
# to run JStack, JInfo, et al.
--- a/hotspot/make/bsd/makefiles/vm.make Tue Sep 18 10:25:20 2012 -0700
+++ b/hotspot/make/bsd/makefiles/vm.make Tue Sep 18 13:15:28 2012 -0700
@@ -311,7 +311,7 @@
echo Linking vm...; \
$(LINK_LIB.CXX/PRE_HOOK) \
$(LINK_VM) $(LD_SCRIPT_FLAG) \
- $(LFLAGS_VM) -o $@ $(LIBJVM.o) $(LIBS_VM); \
+ $(LFLAGS_VM) -o $@ $(sort $(LIBJVM.o)) $(LIBS_VM); \
$(LINK_LIB.CXX/POST_HOOK) \
rm -f $@.1; ln -s $@ $@.1; \
[ -f $(LIBJVM_G) ] || { ln -s $@ $(LIBJVM_G); ln -s $@.1 $(LIBJVM_G).1; }; \
--- a/hotspot/make/linux/makefiles/launcher.make Tue Sep 18 10:25:20 2012 -0700
+++ b/hotspot/make/linux/makefiles/launcher.make Tue Sep 18 13:15:28 2012 -0700
@@ -82,7 +82,7 @@
$(LAUNCHER): $(OBJS) $(LIBJVM) $(LAUNCHER_MAPFILE)
$(QUIETLY) echo Linking launcher...
$(QUIETLY) $(LINK_LAUNCHER/PRE_HOOK)
- $(QUIETLY) $(LINK_LAUNCHER) $(LFLAGS_LAUNCHER) -o $@ $(OBJS) $(LIBS_LAUNCHER)
+ $(QUIETLY) $(LINK_LAUNCHER) $(LFLAGS_LAUNCHER) -o $@ $(sort $(OBJS)) $(LIBS_LAUNCHER)
$(QUIETLY) $(LINK_LAUNCHER/POST_HOOK)
$(LAUNCHER): $(LAUNCHER_SCRIPT)
--- a/hotspot/make/linux/makefiles/vm.make Tue Sep 18 10:25:20 2012 -0700
+++ b/hotspot/make/linux/makefiles/vm.make Tue Sep 18 13:15:28 2012 -0700
@@ -320,7 +320,7 @@
echo Linking vm...; \
$(LINK_LIB.CXX/PRE_HOOK) \
$(LINK_VM) $(LD_SCRIPT_FLAG) \
- $(LFLAGS_VM) -o $@ $(LIBJVM.o) $(LIBS_VM); \
+ $(LFLAGS_VM) -o $@ $(sort $(LIBJVM.o)) $(LIBS_VM); \
$(LINK_LIB.CXX/POST_HOOK) \
rm -f $@.1; ln -s $@ $@.1; \
[ -f $(LIBJVM_G) ] || { ln -s $@ $(LIBJVM_G); ln -s $@.1 $(LIBJVM_G).1; }; \
--- a/hotspot/make/solaris/makefiles/launcher.make Tue Sep 18 10:25:20 2012 -0700
+++ b/hotspot/make/solaris/makefiles/launcher.make Tue Sep 18 13:15:28 2012 -0700
@@ -96,7 +96,7 @@
ifeq ($(filter -sbfast -xsbfast, $(CFLAGS_BROWSE)),)
$(QUIETLY) echo Linking launcher...
$(QUIETLY) $(LINK_LAUNCHER/PRE_HOOK)
- $(QUIETLY) $(LINK_LAUNCHER) $(LFLAGS_LAUNCHER) -o $@ $(OBJS) $(LIBS_LAUNCHER)
+ $(QUIETLY) $(LINK_LAUNCHER) $(LFLAGS_LAUNCHER) -o $@ $(sort $(OBJS)) $(LIBS_LAUNCHER)
$(QUIETLY) $(LINK_LAUNCHER/POST_HOOK)
endif # filter -sbfast -xsbfast
--- a/hotspot/make/solaris/makefiles/vm.make Tue Sep 18 10:25:20 2012 -0700
+++ b/hotspot/make/solaris/makefiles/vm.make Tue Sep 18 13:15:28 2012 -0700
@@ -288,7 +288,7 @@
ifeq ($(filter -sbfast -xsbfast, $(CFLAGS_BROWSE)),)
@echo Linking vm...
$(QUIETLY) $(LINK_LIB.CXX/PRE_HOOK)
- $(QUIETLY) $(LINK_VM) $(LFLAGS_VM) -o $@ $(LIBJVM.o) $(LIBS_VM)
+ $(QUIETLY) $(LINK_VM) $(LFLAGS_VM) -o $@ $(sort $(LIBJVM.o)) $(LIBS_VM)
$(QUIETLY) $(LINK_LIB.CXX/POST_HOOK)
$(QUIETLY) rm -f $@.1 && ln -s $@ $@.1
$(QUIETLY) [ -f $(LIBJVM_G) ] || ln -s $@ $(LIBJVM_G)