From af874b5889ad633f93b04d6b5e9eb2dbbb654831 Mon Sep 17 00:00:00 2001 From: Peter Brunet <peter.brunet@oracle.com> Date: Fri, 27 Mar 2015 15:48:08 -0500 Subject: [PATCH 01/11] 8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831 Move files from open to closed Reviewed-by: prr, mchung, erikj, ihse, serb, bpatel --- make/Images.gmk | 6 +++- make/Javadoc.gmk | 56 ++++++++++++++++++++++++++++++++++- make/Main.gmk | 3 ++ make/common/NON_CORE_PKGS.gmk | 7 +++-- modules.xml | 9 ++++-- 5 files changed, 75 insertions(+), 6 deletions(-) diff --git a/make/Images.gmk b/make/Images.gmk index 3a8171416c7..c454b0e5a8a 100644 --- a/make/Images.gmk +++ b/make/Images.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2014, 2015 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 @@ -57,6 +57,10 @@ ifeq ($(OPENJDK_TARGET_OS), solaris) PROVIDER_MODULES += jdk.crypto.ucrypto endif +ifeq ($(OPENJDK_TARGET_OS), windows) + MAIN_MODULES += jdk.accessibility +endif + ifeq ($(OPENJDK_TARGET_OS), macosx) MAIN_MODULES += jdk.deploy.osx endif diff --git a/make/Javadoc.gmk b/make/Javadoc.gmk index 2a7a59ea83e..4569ed84272 100644 --- a/make/Javadoc.gmk +++ b/make/Javadoc.gmk @@ -1,4 +1,4 @@ -# Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1997, 2015, 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 @@ -81,6 +81,8 @@ NASHORNAPI_FIRST_COPYRIGHT_YEAR = 2014 JNLP_FIRST_COPYRIGHT_YEAR = 1998 PLUGIN2_FIRST_COPYRIGHT_YEAR = 2007 JDKNET_FIRST_COPYRIGHT_YEAR = 2014 +JACCESSAPI_FIRST_COPYRIGHT_YEAR = 2002 + # Oracle name FULL_COMPANY_NAME = Oracle and/or its affiliates @@ -1231,6 +1233,58 @@ $(SCTPAPI_PACKAGES_FILE): $(call PackageDependencies,$(SCTPAPI_PKGS)) $(prep-target) $(call PackageFilter,$(SCTPAPI_PKGS)) +############################################################# +# +# jaccessdocs - Java Accessibility Utilities +# + +ALL_OTHER_TARGETS += jaccessdocs + +JACCESSAPI_DOCDIR := $(JRE_API_DOCSDIR)/accessibility/jaccess/spec +JACCESSAPI2COREAPI := ../../../$(JDKJRE2COREAPI) +JACCESSAPI_DOCTITLE := JACCESS API +JACCESSAPI_WINDOWTITLE := JACCESS API +JACCESSAPI_HEADER := <strong>JACCESS API</strong> +JACCESSAPI_BOTTOM := $(call CommonBottom,$(JACCESSAPI_FIRST_COPYRIGHT_YEAR)) +# JACCESSAPI_PKGS is located in NON_CORE_PKGS.gmk + +JACCESSAPI_INDEX_HTML = $(JACCESSAPI_DOCDIR)/index.html +JACCESSAPI_OPTIONS_FILE = $(DOCSTMPDIR)/jaccess.options +JACCESSAPI_PACKAGES_FILE = $(DOCSTMPDIR)/jaccess.packages + +jaccessdocs: $(JACCESSAPI_INDEX_HTML) + +# Set relative location to core api document root +$(JACCESSAPI_INDEX_HTML): GET2DOCSDIR=$(JACCESSAPI2COREAPI)/.. + +# Run javadoc if the index file is out of date or missing +$(JACCESSAPI_INDEX_HTML): $(JACCESSAPI_OPTIONS_FILE) $(JACCESSAPI_PACKAGES_FILE) $(COREAPI_INDEX_FILE) + $(prep-javadoc) + $(call JavadocSummary,$(JACCESSAPI_OPTIONS_FILE),$(JACCESSAPI_PACKAGES_FILE)) + $(JAVADOC_CMD) -d $(@D) \ + @$(JACCESSAPI_OPTIONS_FILE) @$(JACCESSAPI_PACKAGES_FILE) + +# Create file with javadoc options in it +$(JACCESSAPI_OPTIONS_FILE): + $(prep-target) + @($(call COMMON_JAVADOCFLAGS) ; \ + $(call COMMON_JAVADOCTAGS) ; \ + $(call OptionOnly,-Xdoclint:all) ; \ + $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH)) ; \ + $(call OptionPair,-encoding,ascii) ; \ + $(call OptionOnly,-nodeprecatedlist) ; \ + $(call OptionPair,-doctitle,$(JACCESSAPI_DOCTITLE)) ; \ + $(call OptionPair,-windowtitle,$(JACCESSAPI_WINDOWTITLE) $(DRAFT_WINTITLE)); \ + $(call OptionPair,-header,$(JACCESSAPI_HEADER)$(DRAFT_HEADER)) ; \ + $(call OptionPair,-bottom,$(JACCESSAPI_BOTTOM)$(DRAFT_BOTTOM)) ; \ + $(call OptionTrip,-linkoffline,$(JACCESSAPI2COREAPI),$(COREAPI_DOCSDIR)/); \ + ) >> $@ + +# Create a file with the package names in it +$(JACCESSAPI_PACKAGES_FILE): $(call PackageDependencies,$(JACCESSAPI_PKGS)) + $(prep-target) + $(call PackageFilter,$(JACCESSAPI_PKGS)) + ############################################################# # # jdk.net docs diff --git a/make/Main.gmk b/make/Main.gmk index 5a4e0d5c23a..31e2fa69c3e 100644 --- a/make/Main.gmk +++ b/make/Main.gmk @@ -386,6 +386,9 @@ else # links against libosxapp. jdk.deploy.osx-libs: java.desktop-libs + # jdk.accessibility depends on java.desktop + jdk.accessibility-libs: java.desktop-libs + # This dependency needs to be explicitly declared. jdk.jdi-gensrc generates a # header file used by jdk.jdwp.agent-libs. The jdk.jdwp.agent-gensrc is a # virtual target. diff --git a/make/common/NON_CORE_PKGS.gmk b/make/common/NON_CORE_PKGS.gmk index cb3887a9d00..5127743ccf5 100644 --- a/make/common/NON_CORE_PKGS.gmk +++ b/make/common/NON_CORE_PKGS.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2002, 2015, 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 @@ -99,6 +99,8 @@ JDK_PKGS = jdk \ jdk.net \ jdk.management.cmm +JACCESSAPI_PKGS = com.sun.java.accessibility.util + # non-core packages in rt.jar NON_CORE_PKGS = $(DOMAPI_PKGS) \ $(MGMT_PKGS) \ @@ -110,4 +112,5 @@ NON_CORE_PKGS = $(DOMAPI_PKGS) \ $(SMARTCARDIO_PKGS) \ $(SCTPAPI_PKGS) \ $(APPLE_EXT_PKGS) \ - $(JDK_PKGS) + $(JDK_PKGS) \ + $(JACCESSAPI_PKGS) diff --git a/modules.xml b/modules.xml index 389112a748c..a98218f1a2c 100644 --- a/modules.xml +++ b/modules.xml @@ -2,7 +2,7 @@ <!-- - Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2014, 2015 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 @@ -751,7 +751,7 @@ </export> <export> <name>sun.awt</name> - <to>jdk.accessbridge</to> + <to>jdk.accessibility</to> </export> </module> <module> @@ -1852,4 +1852,9 @@ <name>jdk.zipfs</name> <depend>java.base</depend> </module> + <module> + <name>jdk.accessibility</name> + <depend>java.base</depend> + <depend>java.desktop</depend> + </module> </modules> From 45fbc2f802893ff478b48ec96b922b160f49ba28 Mon Sep 17 00:00:00 2001 From: Erik Joelsson <erikj@openjdk.org> Date: Mon, 13 Apr 2015 08:39:19 +0200 Subject: [PATCH 02/11] 8077563: 9-dev 1-prebuild fail: "configure: error: write failure creating /config.status" Reviewed-by: dholmes --- common/autoconf/basics.m4 | 5 +++-- common/autoconf/generated-configure.sh | 7 ++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/common/autoconf/basics.m4 b/common/autoconf/basics.m4 index 02a096ed8c1..bc32beb9069 100644 --- a/common/autoconf/basics.m4 +++ b/common/autoconf/basics.m4 @@ -658,8 +658,6 @@ AC_DEFUN_ONCE([BASIC_SETUP_OUTPUT_DIR], fi OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}" $MKDIR -p "$OUTPUT_ROOT" - CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support" - $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR" if test ! -d "$OUTPUT_ROOT"; then AC_MSG_ERROR([Could not create build directory $OUTPUT_ROOT]) fi @@ -702,6 +700,9 @@ AC_DEFUN_ONCE([BASIC_SETUP_OUTPUT_DIR], BASIC_FIXUP_PATH(OUTPUT_ROOT) + CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support" + $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR" + AC_SUBST(SPEC, $OUTPUT_ROOT/spec.gmk) AC_SUBST(CONF_NAME, $CONF_NAME) AC_SUBST(OUTPUT_ROOT, $OUTPUT_ROOT) diff --git a/common/autoconf/generated-configure.sh b/common/autoconf/generated-configure.sh index a7fc898624c..02ad6ab2ad0 100644 --- a/common/autoconf/generated-configure.sh +++ b/common/autoconf/generated-configure.sh @@ -4365,7 +4365,7 @@ VS_SDK_PLATFORM_NAME_2013= #CUSTOM_AUTOCONF_INCLUDE # Do not change or remove the following line, it is needed for consistency checks: -DATE_WHEN_GENERATED=1428676283 +DATE_WHEN_GENERATED=1428904416 ############################################################################### # @@ -15266,8 +15266,6 @@ $as_echo "in build directory with custom name" >&6; } fi OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}" $MKDIR -p "$OUTPUT_ROOT" - CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support" - $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR" if test ! -d "$OUTPUT_ROOT"; then as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5 fi @@ -15445,6 +15443,9 @@ $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is inval fi + CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support" + $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR" + SPEC=$OUTPUT_ROOT/spec.gmk CONF_NAME=$CONF_NAME From cddb50dcd1b9740ba3452b6ebdfbc04b316edcbf Mon Sep 17 00:00:00 2001 From: Ivan Gerasimov <igerasim@openjdk.org> Date: Mon, 13 Apr 2015 21:01:19 +0300 Subject: [PATCH 03/11] 8077622: Add sources from jdk/src/jdk.deploy.osx/macosx/classes/ to unshuffle script Reviewed-by: chegar --- common/bin/unshuffle_list.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/common/bin/unshuffle_list.txt b/common/bin/unshuffle_list.txt index a27c192e7fc..0553eb826fc 100644 --- a/common/bin/unshuffle_list.txt +++ b/common/bin/unshuffle_list.txt @@ -1294,6 +1294,9 @@ jdk/src/jdk.crypto.pkcs11/windows/native/libj2pkcs11/j2secmod_md.h : jdk/src/win jdk/src/jdk.crypto.pkcs11/windows/native/libj2pkcs11/p11_md.c : jdk/src/windows/native/sun/security/pkcs11/wrapper/p11_md.c jdk/src/jdk.crypto.pkcs11/windows/native/libj2pkcs11/p11_md.h : jdk/src/windows/native/sun/security/pkcs11/wrapper/p11_md.h jdk/src/jdk.deploy.osx/macosx/classes/com/apple/concurrent/package.html : jdk/src/macosx/classes/com/apple/concurrent/package.html +jdk/src/jdk.deploy.osx/macosx/classes/apple/applescript : jdk/src/macosx/classes/apple/applescript +jdk/src/jdk.deploy.osx/macosx/classes/apple/security : jdk/src/macosx/classes/apple/security +jdk/src/jdk.deploy.osx/macosx/classes/com/apple/concurrent : jdk/src/macosx/classes/com/apple/concurrent jdk/src/jdk.deploy.osx/macosx/native/libapplescriptengine : jdk/src/macosx/native/apple/applescript jdk/src/jdk.deploy.osx/macosx/native/libosx/CFileManager.m : jdk/src/macosx/native/com/apple/eio/CFileManager.m jdk/src/jdk.deploy.osx/macosx/native/libosx/Dispatch.m : jdk/src/macosx/native/com/apple/concurrent/Dispatch.m From 5981b9e79b73fd5e173f817d8258aff0f67a0b24 Mon Sep 17 00:00:00 2001 From: Phil Race <prr@openjdk.org> Date: Mon, 13 Apr 2015 17:03:11 -0700 Subject: [PATCH 04/11] 8035302: Eliminate dependency on jdk.charsets from 2D font code Reviewed-by: mchung, alanb, sherman, serb --- make/CompileJavaModules.gmk | 1 - modules.xml | 5 ----- 2 files changed, 6 deletions(-) diff --git a/make/CompileJavaModules.gmk b/make/CompileJavaModules.gmk index e0ad0f63bb8..a771cd7e743 100644 --- a/make/CompileJavaModules.gmk +++ b/make/CompileJavaModules.gmk @@ -162,7 +162,6 @@ ifeq ($(OPENJDK_TARGET_OS), macosx) $(wildcard $(JDK_TOPDIR)/src/java.desktop/unix/classes/sun/java2d/*.java) \ $(wildcard $(JDK_TOPDIR)/src/java.desktop/unix/classes/sun/java2d/opengl/*.java) \ $(wildcard $(JDK_TOPDIR)/src/java.desktop/unix/classes/sun/awt/*.java) \ - $(wildcard $(JDK_TOPDIR)/src/java.desktop/unix/classes/sun/awt/motif/*.java) \ $(wildcard $(JDK_TOPDIR)/src/java.desktop/unix/classes/sun/font/*.java) \ # else diff --git a/modules.xml b/modules.xml index a98218f1a2c..48f5fbb6cc5 100644 --- a/modules.xml +++ b/modules.xml @@ -604,7 +604,6 @@ <depend>java.prefs</depend> <depend re-exports="true">java.xml</depend> <depend re-exports="true">java.datatransfer</depend> - <depend>jdk.charsets</depend> <export> <name>java.applet</name> </export> @@ -1487,10 +1486,6 @@ <module> <name>jdk.charsets</name> <depend>java.base</depend> - <export> - <name>sun.nio.cs.ext</name> - <to>java.desktop</to> - </export> </module> <module> <name>jdk.compiler</name> From 7b5aeb4f3efef269e2adedd8f20f3e4d4e1a49bc Mon Sep 17 00:00:00 2001 From: Erik Joelsson <erikj@openjdk.org> Date: Tue, 14 Apr 2015 14:22:10 +0200 Subject: [PATCH 05/11] 8077419: Launcher mapfile fails linking with SS12u4 Reviewed-by: tbell, dholmes, ihse --- make/common/NativeCompilation.gmk | 1 + 1 file changed, 1 insertion(+) diff --git a/make/common/NativeCompilation.gmk b/make/common/NativeCompilation.gmk index 001812585c2..0dde271bcee 100644 --- a/make/common/NativeCompilation.gmk +++ b/make/common/NativeCompilation.gmk @@ -70,6 +70,7 @@ DEPENDENCY_TARGET_SED_PATTERN := \ -e 's/\#.*//' \ -e 's/^[^:]*: *//' \ -e 's/ *\\$$$$//' \ + -e 's/^[ ]*//' \ -e '/^$$$$/ d' \ -e 's/$$$$/ :/' \ # From 7ec9ed5041a7e86035ae8e438697152716b5dbe2 Mon Sep 17 00:00:00 2001 From: Magnus Ihse Bursie <ihse@openjdk.org> Date: Fri, 8 May 2015 10:37:13 +0200 Subject: [PATCH 06/11] 8074859: Turn on warnings as error Reviewed-by: erikj --- common/autoconf/flags.m4 | 19 +++++++++++++- common/autoconf/generated-configure.sh | 34 +++++++++++++++++++++++--- common/autoconf/spec.gmk.in | 6 ++--- make/Init.gmk | 4 ++- make/common/NativeCompilation.gmk | 15 ++++++++++++ 5 files changed, 70 insertions(+), 8 deletions(-) diff --git a/common/autoconf/flags.m4 b/common/autoconf/flags.m4 index 307fcfc0e1b..2c3a0489ef0 100644 --- a/common/autoconf/flags.m4 +++ b/common/autoconf/flags.m4 @@ -231,7 +231,6 @@ AC_DEFUN_ONCE([FLAGS_SETUP_COMPILER_FLAGS_FOR_LIBS], AC_SUBST(C_FLAG_REORDER) AC_SUBST(CXX_FLAG_REORDER) - AC_SUBST(SHARED_LIBRARY_FLAGS) AC_SUBST(SET_EXECUTABLE_ORIGIN) AC_SUBST(SET_SHARED_LIBRARY_ORIGIN) AC_SUBST(SET_SHARED_LIBRARY_NAME) @@ -900,6 +899,24 @@ AC_DEFUN_ONCE([FLAGS_SETUP_COMPILER_FLAGS_MISC], [COMPILER_SUPPORTS_TARGET_BITS_FLAG=false]) AC_SUBST(COMPILER_SUPPORTS_TARGET_BITS_FLAG) + AC_ARG_ENABLE([warnings-as-errors], [AS_HELP_STRING([--disable-warnings-as-errors], + [do not consider native warnings to be an error @<:@enabled@:>@])]) + + AC_MSG_CHECKING([if native warnings are errors]) + if test "x$enable_warnings_as_errors" = "xyes"; then + AC_MSG_RESULT([yes (explicitely set)]) + WARNINGS_AS_ERRORS=true + elif test "x$enable_warnings_as_errors" = "xno"; then + AC_MSG_RESULT([no]) + WARNINGS_AS_ERRORS=false + elif test "x$enable_warnings_as_errors" = "x"; then + AC_MSG_RESULT([yes (default)]) + WARNINGS_AS_ERRORS=true + else + AC_MSG_ERROR([--enable-warnings-as-errors accepts no argument]) + fi + AC_SUBST(WARNINGS_AS_ERRORS) + case "${TOOLCHAIN_TYPE}" in microsoft) DISABLE_WARNING_PREFIX="-wd" diff --git a/common/autoconf/generated-configure.sh b/common/autoconf/generated-configure.sh index dbe3f079f9a..429db34cc93 100644 --- a/common/autoconf/generated-configure.sh +++ b/common/autoconf/generated-configure.sh @@ -684,6 +684,7 @@ ZIP_DEBUGINFO_FILES ENABLE_DEBUG_SYMBOLS CFLAGS_WARNINGS_ARE_ERRORS DISABLE_WARNING_PREFIX +WARNINGS_AS_ERRORS COMPILER_SUPPORTS_TARGET_BITS_FLAG ZERO_ARCHFLAG LDFLAGS_TESTEXE_SUFFIX @@ -727,7 +728,6 @@ SET_SHARED_LIBRARY_MAPFILE SET_SHARED_LIBRARY_NAME SET_SHARED_LIBRARY_ORIGIN SET_EXECUTABLE_ORIGIN -SHARED_LIBRARY_FLAGS CXX_FLAG_REORDER C_FLAG_REORDER SYSROOT_LDFLAGS @@ -1086,6 +1086,7 @@ with_jtreg with_extra_cflags with_extra_cxxflags with_extra_ldflags +enable_warnings_as_errors enable_debug_symbols enable_zip_debug_info enable_native_coverage @@ -1852,6 +1853,9 @@ Optional Features: --enable-rmiconnector-iiop enable the JMX RMIConnector iiop transport [disabled] + --disable-warnings-as-errors + do not consider native warnings to be an error + [enabled] --disable-debug-symbols disable generation of debug symbols [enabled] --disable-zip-debug-info disable zipping of debug-info files [enabled] @@ -4359,7 +4363,7 @@ VS_SDK_PLATFORM_NAME_2013= #CUSTOM_AUTOCONF_INCLUDE # Do not change or remove the following line, it is needed for consistency checks: -DATE_WHEN_GENERATED=1430918902 +DATE_WHEN_GENERATED=1431074105 ############################################################################### # @@ -41761,7 +41765,6 @@ $as_echo "$ac_cv_c_bigendian" >&6; } - if test "x$OPENJDK_TARGET_OS" = xsolaris; then CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__" CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__" @@ -42471,6 +42474,31 @@ $as_echo "$supports" >&6; } + # Check whether --enable-warnings-as-errors was given. +if test "${enable_warnings_as_errors+set}" = set; then : + enableval=$enable_warnings_as_errors; +fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5 +$as_echo_n "checking if native warnings are errors... " >&6; } + if test "x$enable_warnings_as_errors" = "xyes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitely set)" >&5 +$as_echo "yes (explicitely set)" >&6; } + WARNINGS_AS_ERRORS=true + elif test "x$enable_warnings_as_errors" = "xno"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + WARNINGS_AS_ERRORS=false + elif test "x$enable_warnings_as_errors" = "x"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5 +$as_echo "yes (default)" >&6; } + WARNINGS_AS_ERRORS=true + else + as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5 + fi + + case "${TOOLCHAIN_TYPE}" in microsoft) DISABLE_WARNING_PREFIX="-wd" diff --git a/common/autoconf/spec.gmk.in b/common/autoconf/spec.gmk.in index b603ae89cff..ae29731a4ae 100644 --- a/common/autoconf/spec.gmk.in +++ b/common/autoconf/spec.gmk.in @@ -321,6 +321,9 @@ CXX_FLAG_DEPS:=@CXX_FLAG_DEPS@ DISABLE_WARNING_PREFIX := @DISABLE_WARNING_PREFIX@ CFLAGS_WARNINGS_ARE_ERRORS:=@CFLAGS_WARNINGS_ARE_ERRORS@ +# A global flag (true or false) determining if native warnings are considered errors. +WARNINGS_AS_ERRORS := @WARNINGS_AS_ERRORS@ + CFLAGS_CCACHE:=@CFLAGS_CCACHE@ # Tools that potentially need to be cross compilation aware. @@ -394,9 +397,6 @@ STRIP:=@STRIP@ LIPO:=@LIPO@ -# Command to create a shared library -SHARED_LIBRARY_FLAGS:=@SHARED_LIBRARY_FLAGS@ - # Options to linker to specify a mapfile. # (Note absence of := assignment, because we do not want to evaluate the macro body here) SET_SHARED_LIBRARY_MAPFILE=@SET_SHARED_LIBRARY_MAPFILE@ diff --git a/make/Init.gmk b/make/Init.gmk index 431b3a7f7b5..50a91026920 100644 --- a/make/Init.gmk +++ b/make/Init.gmk @@ -267,7 +267,9 @@ else # HAS_SPEC=true ( cd $(TOPDIR) && \ $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) $(OUTPUT_SYNC_FLAG) \ -j $(JOBS) -f make/Main.gmk $(USER_MAKE_VARS) \ - $(PARALLEL_TARGETS) ) + $(PARALLEL_TARGETS) || \ + ( exitcode=$$? && $(BUILD_LOG_WRAPPER) $(PRINTF) "\nERROR: Build failed for $(TARGET_DESCRIPTION) (exit code $$exitcode) \n" && \ + $(PRINTF) "Hint: If caused by a warning, try configure --disable-warnings-as-errors \n\n" && exit $$exitcode ) ) $(call CleanupSmartJavac) $(call StopGlobalTimer) $(call ReportBuildTimes) diff --git a/make/common/NativeCompilation.gmk b/make/common/NativeCompilation.gmk index 8b9982428cf..171fcb0f15c 100644 --- a/make/common/NativeCompilation.gmk +++ b/make/common/NativeCompilation.gmk @@ -487,6 +487,21 @@ define SetupNativeCompilationBody $1_EXTRA_CXXFLAGS += $$(addprefix $(DISABLE_WARNING_PREFIX), $$($1_DISABLED_WARNINGS_$(TOOLCHAIN_TYPE))) endif + # Check if warnings should be considered errors. + # Pick first binary and toolchain specific, then binary specific, then general setting. + ifeq ($$($1_WARNINGS_AS_ERRORS_$(TOOLCHAIN_TYPE)),) + ifeq ($$($1_WARNINGS_AS_ERRORS),) + $1_WARNINGS_AS_ERRORS_$(TOOLCHAIN_TYPE) := $$(WARNINGS_AS_ERRORS) + else + $1_WARNINGS_AS_ERRORS_$(TOOLCHAIN_TYPE) := $$($1_WARNINGS_AS_ERRORS) + endif + endif + + ifeq ($$($1_WARNINGS_AS_ERRORS_$(TOOLCHAIN_TYPE)), true) + $1_EXTRA_CFLAGS += $(CFLAGS_WARNINGS_ARE_ERRORS) + $1_EXTRA_CXXFLAGS += $(CFLAGS_WARNINGS_ARE_ERRORS) + endif + ifeq (NONE, $$($1_OPTIMIZATION)) $1_EXTRA_CFLAGS += $(C_O_FLAG_NONE) $1_EXTRA_CXXFLAGS += $(CXX_O_FLAG_NONE) From 6ede1d2199db6a3fc21ae04cc4630e9d56959a23 Mon Sep 17 00:00:00 2001 From: Athijegannathan Sundararajan <sundar@openjdk.org> Date: Mon, 11 May 2015 16:39:31 +0530 Subject: [PATCH 07/11] 8079900: javadoc is missing for jdk.nashorn.api.tree package Reviewed-by: lagergren, erikj --- make/Javadoc.gmk | 2 +- make/common/NON_CORE_PKGS.gmk | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/make/Javadoc.gmk b/make/Javadoc.gmk index 4569ed84272..f439ed013da 100644 --- a/make/Javadoc.gmk +++ b/make/Javadoc.gmk @@ -1141,7 +1141,7 @@ NASHORNAPI_WINDOWTITLE := Nashorn API NASHORNAPI_HEADER := <strong>Nashorn API</strong> NASHORNAPI_BOTTOM := $(call CommonBottom,$(NASHORNAPI_FIRST_COPYRIGHT_YEAR)) NASHORNAPI_GROUPNAME := Packages -NASHORNAPI_REGEXP := jdk.nashorn.api.scripting.* +NASHORNAPI_REGEXP := jdk.nashorn.api.* # NASHORNAPI_PKGS is located in NON_CORE_PKGS.gmk NASHORNAPI_INDEX_HTML = $(NASHORNAPI_DOCDIR)/index.html diff --git a/make/common/NON_CORE_PKGS.gmk b/make/common/NON_CORE_PKGS.gmk index 5127743ccf5..8d7f1a71efc 100644 --- a/make/common/NON_CORE_PKGS.gmk +++ b/make/common/NON_CORE_PKGS.gmk @@ -82,7 +82,8 @@ TREEAPI_PKGS = com.sun.source.doctree \ com.sun.source.util \ jdk -NASHORNAPI_PKGS = jdk.nashorn.api.scripting +NASHORNAPI_PKGS = jdk.nashorn.api.scripting \ + jdk.nashorn.api.tree SMARTCARDIO_PKGS = javax.smartcardio From 7fb09ab821555173e19dc17d70618eddf63df5b3 Mon Sep 17 00:00:00 2001 From: Magnus Ihse Bursie <ihse@openjdk.org> Date: Mon, 11 May 2015 13:45:39 +0200 Subject: [PATCH 08/11] 8079891: Store configure log in $BUILD/configure.log Reviewed-by: erikj --- common/autoconf/basics.m4 | 26 ++++++++++++ common/autoconf/configure | 11 ++--- common/autoconf/configure.ac | 11 ++--- common/autoconf/generated-configure.sh | 56 +++++++++++++++++++------- common/autoconf/help.m4 | 24 ++++++----- 5 files changed, 89 insertions(+), 39 deletions(-) diff --git a/common/autoconf/basics.m4 b/common/autoconf/basics.m4 index f78c2d88279..39313d3ce70 100644 --- a/common/autoconf/basics.m4 +++ b/common/autoconf/basics.m4 @@ -1054,3 +1054,29 @@ AC_DEFUN_ONCE([BASIC_CHECK_BASH_OPTIONS], AC_SUBST(BASH_ARGS) ]) + +# Code to run after AC_OUTPUT +AC_DEFUN_ONCE([BASIC_POST_CONFIG_OUTPUT], +[ + # Try to move config.log (generated by autoconf) to the configure-support directory. + if test -e ./config.log; then + $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null + fi + + # Rotate our log file (configure.log) + if test -e "$OUTPUT_ROOT/configure.log.old"; then + $RM -f "$OUTPUT_ROOT/configure.log.old" + fi + if test -e "$OUTPUT_ROOT/configure.log"; then + $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null + fi + + # Move configure.log from current directory to the build output root + if test -e ./configure.log; then + echo found it + $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null + fi + + # Make the compare script executable + $CHMOD +x $OUTPUT_ROOT/compare.sh +]) diff --git a/common/autoconf/configure b/common/autoconf/configure index e786ff81916..4ac6fa1730b 100644 --- a/common/autoconf/configure +++ b/common/autoconf/configure @@ -255,13 +255,10 @@ if test "x$conf_debug_configure" != x; then set -x fi -if test "x$conf_debug_configure" = xtrue; then - # Turn on logging, but don't turn on twice when called recursive - conf_debug_logfile=./debug-configure.log - (exec 3>&1 ; (. $conf_script_to_run "${conf_processed_arguments[@]}" 2>&1 1>&3 ) | tee -a $conf_debug_logfile 1>&2 ; exec 3>&-) | tee -a $conf_debug_logfile -else - ( . $conf_script_to_run "${conf_processed_arguments[@]}" ) -fi +# Now transfer control to the script generated by autoconf. This is where the +# main work is done. +conf_logfile=./configure.log +(exec 3>&1 ; (. $conf_script_to_run "${conf_processed_arguments[@]}" 2>&1 1>&3 ) | tee -a $conf_logfile 1>&2 ; exec 3>&-) | tee -a $conf_logfile conf_result_code=$? ### diff --git a/common/autoconf/configure.ac b/common/autoconf/configure.ac index 560f4525b6a..ceaee324bea 100644 --- a/common/autoconf/configure.ac +++ b/common/autoconf/configure.ac @@ -265,15 +265,10 @@ CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status" # Create the actual output files. Now the main work of configure is done. AC_OUTPUT + +# After AC_OUTPUT, we need to do final work CUSTOM_CONFIG_OUTPUT_GENERATED_HOOK - -# Try to move the config.log file to the output directory. -if test -e ./config.log; then - $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null -fi - -# Make the compare script executable -$CHMOD +x $OUTPUT_ROOT/compare.sh +BASIC_POST_CONFIG_OUTPUT # Finally output some useful information to the user HELP_PRINT_SUMMARY_AND_WARNINGS diff --git a/common/autoconf/generated-configure.sh b/common/autoconf/generated-configure.sh index 429db34cc93..4551cf55470 100644 --- a/common/autoconf/generated-configure.sh +++ b/common/autoconf/generated-configure.sh @@ -3500,6 +3500,9 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # Check for support for specific options in bash +# Code to run after AC_OUTPUT + + # # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -4363,7 +4366,7 @@ VS_SDK_PLATFORM_NAME_2013= #CUSTOM_AUTOCONF_INCLUDE # Do not change or remove the following line, it is needed for consistency checks: -DATE_WHEN_GENERATED=1431074105 +DATE_WHEN_GENERATED=1431344623 ############################################################################### # @@ -54207,14 +54210,31 @@ $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi +# After AC_OUTPUT, we need to do final work -# Try to move the config.log file to the output directory. -if test -e ./config.log; then - $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null -fi -# Make the compare script executable -$CHMOD +x $OUTPUT_ROOT/compare.sh + # Try to move config.log (generated by autoconf) to the configure-support directory. + if test -e ./config.log; then + $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null + fi + + # Rotate our log file (configure.log) + if test -e "$OUTPUT_ROOT/configure.log.old"; then + $RM -f "$OUTPUT_ROOT/configure.log.old" + fi + if test -e "$OUTPUT_ROOT/configure.log"; then + $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null + fi + + # Move configure.log from current directory to the build output root + if test -e ./configure.log; then + echo found it + $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null + fi + + # Make the compare script executable + $CHMOD +x $OUTPUT_ROOT/compare.sh + # Finally output some useful information to the user @@ -54308,14 +54328,20 @@ $CHMOD +x $OUTPUT_ROOT/compare.sh -if test -e "$OUTPUT_ROOT/config.log"; then - $GREP '^configure:.*: WARNING:' "$OUTPUT_ROOT/config.log" > /dev/null 2>&1 - if test $? -eq 0; then - printf "The following warnings were produced. Repeated here for convenience:\n" - # We must quote sed expression (using []) to stop m4 from eating the []. - $GREP '^configure:.*: WARNING:' "$OUTPUT_ROOT/config.log" | $SED -e 's/^configure:[0-9]*: //' - printf "\n" + # Locate config.log. + if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then + CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR" + elif test -e "./config.log"; then + CONFIG_LOG_PATH="." fi -fi + if test -e "$CONFIG_LOG_PATH/config.log"; then + $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1 + if test $? -eq 0; then + printf "The following warnings were produced. Repeated here for convenience:\n" + # We must quote sed expression (using []) to stop m4 from eating the []. + $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e 's/^configure:[0-9]*: //' + printf "\n" + fi + fi diff --git a/common/autoconf/help.m4 b/common/autoconf/help.m4 index 61f608389d5..3bdaf49852f 100644 --- a/common/autoconf/help.m4 +++ b/common/autoconf/help.m4 @@ -212,7 +212,7 @@ AC_DEFUN_ONCE([HELP_PRINT_SUMMARY_AND_WARNINGS], if test "x$TOOLCHAIN_VERSION" != "x"; then print_version=" $TOOLCHAIN_VERSION" fi - printf "* Toolchain: $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n" + printf "* Toolchain: $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n" printf "* C Compiler: Version $CC_VERSION_NUMBER (at $CC)\n" printf "* C++ Compiler: Version $CXX_VERSION_NUMBER (at $CXX)\n" @@ -263,14 +263,20 @@ AC_DEFUN_ONCE([HELP_PRINT_SUMMARY_AND_WARNINGS], AC_DEFUN_ONCE([HELP_REPEAT_WARNINGS], [ -if test -e "$OUTPUT_ROOT/config.log"; then - $GREP '^configure:.*: WARNING:' "$OUTPUT_ROOT/config.log" > /dev/null 2>&1 - if test $? -eq 0; then - printf "The following warnings were produced. Repeated here for convenience:\n" - # We must quote sed expression (using []) to stop m4 from eating the []. - $GREP '^configure:.*: WARNING:' "$OUTPUT_ROOT/config.log" | $SED -e [ 's/^configure:[0-9]*: //' ] - printf "\n" + # Locate config.log. + if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then + CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR" + elif test -e "./config.log"; then + CONFIG_LOG_PATH="." fi -fi + if test -e "$CONFIG_LOG_PATH/config.log"; then + $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1 + if test $? -eq 0; then + printf "The following warnings were produced. Repeated here for convenience:\n" + # We must quote sed expression (using []) to stop m4 from eating the []. + $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e [ 's/^configure:[0-9]*: //' ] + printf "\n" + fi + fi ]) From 02a2d027b7db903b4ebcd4a7b047d6c2b5a6d7b9 Mon Sep 17 00:00:00 2001 From: Erik Joelsson <erikj@openjdk.org> Date: Tue, 12 May 2015 09:08:03 +0200 Subject: [PATCH 09/11] 8039426: gcc can target wrong instruction set when building JDK native code Reviewed-by: ihse, dholmes --- common/autoconf/flags.m4 | 4 ++++ common/autoconf/generated-configure.sh | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/common/autoconf/flags.m4 b/common/autoconf/flags.m4 index 2c3a0489ef0..279ab861a71 100644 --- a/common/autoconf/flags.m4 +++ b/common/autoconf/flags.m4 @@ -523,6 +523,10 @@ AC_DEFUN_ONCE([FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK], # CXXFLAGS_JDK - C++ Compiler flags # COMMON_CCXXFLAGS_JDK - common to C and C++ if test "x$TOOLCHAIN_TYPE" = xgcc; then + if test "x$OPENJDK_TARGET_CPU" = xx86; then + # Force compatibility with i586 on 32 bit intel platforms. + COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586" + fi COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \ -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE" case $OPENJDK_TARGET_CPU_ARCH in diff --git a/common/autoconf/generated-configure.sh b/common/autoconf/generated-configure.sh index 4551cf55470..1c67fc9c413 100644 --- a/common/autoconf/generated-configure.sh +++ b/common/autoconf/generated-configure.sh @@ -4366,7 +4366,7 @@ VS_SDK_PLATFORM_NAME_2013= #CUSTOM_AUTOCONF_INCLUDE # Do not change or remove the following line, it is needed for consistency checks: -DATE_WHEN_GENERATED=1431344623 +DATE_WHEN_GENERATED=1431414369 ############################################################################### # @@ -42035,6 +42035,10 @@ fi # CXXFLAGS_JDK - C++ Compiler flags # COMMON_CCXXFLAGS_JDK - common to C and C++ if test "x$TOOLCHAIN_TYPE" = xgcc; then + if test "x$OPENJDK_TARGET_CPU" = xx86; then + # Force compatibility with i586 on 32 bit intel platforms. + COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586" + fi COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \ -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE" case $OPENJDK_TARGET_CPU_ARCH in From 62836eec59455f55cfbf3ba541c4919cd01a68d8 Mon Sep 17 00:00:00 2001 From: Magnus Ihse Bursie <ihse@openjdk.org> Date: Tue, 12 May 2015 13:24:34 +0200 Subject: [PATCH 10/11] 8080082: configure fails if you create an empty directory and then run configure from it Reviewed-by: dholmes, erikj --- common/autoconf/basics.m4 | 6 +++--- common/autoconf/generated-configure.sh | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/common/autoconf/basics.m4 b/common/autoconf/basics.m4 index 39313d3ce70..a9d1034eae0 100644 --- a/common/autoconf/basics.m4 +++ b/common/autoconf/basics.m4 @@ -705,9 +705,9 @@ AC_DEFUN_ONCE([BASIC_SETUP_OUTPUT_DIR], # is performed. filtered_files=`$ECHO "$files_present" \ | $SED -e 's/config.log//g' \ - -e 's/confdefs.h//g' \ - -e 's/fixpath.exe//g' \ - -e 's/ //g' \ + -e 's/configure.log//g' \ + -e 's/confdefs.h//g' \ + -e 's/ //g' \ | $TR -d '\n'` if test "x$filtered_files" != x; then AC_MSG_NOTICE([Current directory is $CURDIR.]) diff --git a/common/autoconf/generated-configure.sh b/common/autoconf/generated-configure.sh index 1c67fc9c413..ea324d03415 100644 --- a/common/autoconf/generated-configure.sh +++ b/common/autoconf/generated-configure.sh @@ -4366,7 +4366,7 @@ VS_SDK_PLATFORM_NAME_2013= #CUSTOM_AUTOCONF_INCLUDE # Do not change or remove the following line, it is needed for consistency checks: -DATE_WHEN_GENERATED=1431414369 +DATE_WHEN_GENERATED=1431429776 ############################################################################### # @@ -15342,9 +15342,9 @@ $as_echo "in current directory" >&6; } # is performed. filtered_files=`$ECHO "$files_present" \ | $SED -e 's/config.log//g' \ - -e 's/confdefs.h//g' \ - -e 's/fixpath.exe//g' \ - -e 's/ //g' \ + -e 's/configure.log//g' \ + -e 's/confdefs.h//g' \ + -e 's/ //g' \ | $TR -d '\n'` if test "x$filtered_files" != x; then { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5 From d95bfcad3eefa32a8bcef4c1da00549547a968a0 Mon Sep 17 00:00:00 2001 From: Joe Darcy <darcy@openjdk.org> Date: Wed, 13 May 2015 15:48:24 -0700 Subject: [PATCH 11/11] 8075771: Enable "missing" doclint check in build of the java.desktop module Reviewed-by: ihse --- make/CompileJavaModules.gmk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/make/CompileJavaModules.gmk b/make/CompileJavaModules.gmk index 96872e5028f..4f7e46e5871 100644 --- a/make/CompileJavaModules.gmk +++ b/make/CompileJavaModules.gmk @@ -89,7 +89,7 @@ java.datatransfer_COPY := flavormap.properties ################################################################################ -java.desktop_ADD_JAVAC_FLAGS := -Xdoclint:all/protected,-missing,-reference '-Xdoclint/package:java.*,javax.*' +java.desktop_ADD_JAVAC_FLAGS := -Xdoclint:all/protected,-reference '-Xdoclint/package:java.*,javax.*' java.desktop_COPY := .gif .png .wav .txt .xml .css .pf java.desktop_CLEAN := iio-plugin.properties cursors.properties