7198325: Fix more $(sort) issues on lnk commands in makefiles, making binaries more consistent
7130909: Add a more general mechanism for customizing the build logic
Reviewed-by: dholmes, tbell, erikj, ihse, ohrstrom
--- a/jdk/make/Makefile Tue Sep 18 11:29:24 2012 -0700
+++ b/jdk/make/Makefile Tue Sep 18 12:16:37 2012 -0700
@@ -1,5 +1,5 @@
#
-# Copyright (c) 1995, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1995, 2012, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -29,6 +29,7 @@
#
BUILDDIR=.
+
include $(BUILDDIR)/common/Defs.gmk
#
@@ -273,6 +274,7 @@
# Release engineering targets.
#
include $(BUILDDIR)/common/Release.gmk
+-include $(CUSTOM_MAKE_DIR)/Release.gmk
#
# Cscope targets.
--- a/jdk/make/com/sun/java/pack/Makefile Tue Sep 18 11:29:24 2012 -0700
+++ b/jdk/make/com/sun/java/pack/Makefile Tue Sep 18 12:16:37 2012 -0700
@@ -159,7 +159,7 @@
$(prep-target)
$(RM) $(TEMPDIR)/mapfile-vers
$(CP) mapfile-vers-unpack200 $(TEMPDIR)/mapfile-vers
- $(LINKER) $(LDDFLAGS) $(UNPACK_EXE_FILES_o) $(RES) $(LIBCXX) $(LDOUTPUT)$(TEMPDIR)/unpack200$(EXE_SUFFIX)
+ $(LINKER) $(LDDFLAGS) $(sort $(UNPACK_EXE_FILES_o)) $(RES) $(LIBCXX) $(LDOUTPUT)$(TEMPDIR)/unpack200$(EXE_SUFFIX)
ifdef MT
$(MT) /manifest $(OBJDIR)/unpack200$(EXE_SUFFIX).manifest /outputresource:$(TEMPDIR)/unpack200$(EXE_SUFFIX);#1
endif
--- a/jdk/make/common/Defs.gmk Tue Sep 18 11:29:24 2012 -0700
+++ b/jdk/make/common/Defs.gmk Tue Sep 18 12:16:37 2012 -0700
@@ -109,6 +109,21 @@
endif
endif
+# We allow for potential specialization of build files. This has to be
+# done on a file-by-file, case-by-case basis. Here we define the basic control
+# over where custom files are being used. Later we will -include the custom
+# Defs.gmk if present. This works best because all Makefiles include defs.gmk.
+# In other cases we can either have foo.gmk include custom/foo.gmk, or
+# a Makefile can do:
+# include foo.gmk
+# -include $CUSTOM_MAKE_DIR/foo.gmk
+#
+# For non-OpenJDK builds the default location is the make/closed repository.
+# For OpenJDK builds a real value has to be supplied externally.
+ifneq ($(OPENJDK),true)
+ CUSTOM_MAKE_DIR = $(BUILDDIR)/closed
+endif
+
#
# Get platform definitions
#
@@ -116,12 +131,6 @@
include $(JDK_TOPDIR)/make/common/Defs-$(PLATFORM).gmk
#
-# SE-Embedded support, if enabled
-#
-
-include $(JDK_TOPDIR)/make/common/Defs-embedded.gmk
-
-#
# Cross-compilation Settings
#
ifdef CROSS_COMPILE_ARCH
@@ -611,4 +620,6 @@
$(install-importonly-file)
endef
+-include $(CUSTOM_MAKE_DIR)/Defs.gmk
+
.PHONY: all build clean clobber
--- a/jdk/make/common/Release.gmk Tue Sep 18 11:29:24 2012 -0700
+++ b/jdk/make/common/Release.gmk Tue Sep 18 12:16:37 2012 -0700
@@ -750,10 +750,6 @@
BUILDMETAINDEX_JARFILE = $(ABS_BUILDTOOLJARDIR)/buildmetaindex.jar
-# SE-Embedded targets if enabled
-include $(JDK_TOPDIR)/make/common/Release-embedded.gmk
-
-
######################################################
# JRE Image
######################################################
--- a/jdk/make/java/jli/Makefile Tue Sep 18 11:29:24 2012 -0700
+++ b/jdk/make/java/jli/Makefile Tue Sep 18 12:16:37 2012 -0700
@@ -190,7 +190,7 @@
$(STATIC_LIBRARY): $(FILES_o)
@$(prep-target)
- $(LIBEXE) -nologo -out:$@ $(FILES_o)
+ $(LIBEXE) -nologo -out:$@ $(sort $(FILES_o))
library:: $(STATIC_LIBRARY)
endif # PLATFORM
@@ -216,7 +216,7 @@
$(STATIC_LIBRARY): $(STATIC_LIBRARY_DIR)
@$(prep-target)
- $(AR) $(ARFLAGS) $@ $(FILES_o)
+ $(AR) $(ARFLAGS) $@ $(sort $(FILES_o))
library:: $(STATIC_LIBRARY)