diff options
author | Ralph Sennhauser <sera@gentoo.org> | 2012-06-27 19:08:57 +0000 |
---|---|---|
committer | Ralph Sennhauser <sera@gentoo.org> | 2012-06-27 19:08:57 +0000 |
commit | 383fef8ba199c44ce8f6c66558f03ea84a8536cf (patch) | |
tree | b1b80cb927e241d3fc8274c12c35b88792fd8816 /dev-java/icedtea | |
parent | Broken manifest (diff) | |
download | gentoo-2-383fef8ba199c44ce8f6c66558f03ea84a8536cf.tar.gz gentoo-2-383fef8ba199c44ce8f6c66558f03ea84a8536cf.tar.bz2 gentoo-2-383fef8ba199c44ce8f6c66558f03ea84a8536cf.zip |
Make werror a configure option and disable it so icedtea 7 can be built using gcc 4.7. #310503 #418359
Many thanks to the various people providing support in #418359
(Portage version: 2.1.10.65/cvs/Linux x86_64)
Diffstat (limited to 'dev-java/icedtea')
-rw-r--r-- | dev-java/icedtea/ChangeLog | 8 | ||||
-rw-r--r-- | dev-java/icedtea/files/icedtea-7.2.2.1-warnings_are_errors.patch | 217 | ||||
-rw-r--r-- | dev-java/icedtea/icedtea-7.2.2.1.ebuild | 4 |
3 files changed, 227 insertions, 2 deletions
diff --git a/dev-java/icedtea/ChangeLog b/dev-java/icedtea/ChangeLog index 7b92121c0e52..f7cff6fa3e60 100644 --- a/dev-java/icedtea/ChangeLog +++ b/dev-java/icedtea/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for dev-java/icedtea # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-java/icedtea/ChangeLog,v 1.77 2012/06/24 08:19:48 sera Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-java/icedtea/ChangeLog,v 1.78 2012/06/27 19:08:57 sera Exp $ + + 27 Jun 2012; Ralph Sennhauser <sera@gentoo.org> icedtea-7.2.2.1.ebuild, + +files/icedtea-7.2.2.1-warnings_are_errors.patch: + Make werror a configure option and disable it so icedtea 7 can be built using + gcc 4.7. #310503 #418359 + Many thanks to the various people providing support in #418359 24 Jun 2012; Ralph Sennhauser <sera@gentoo.org> icedtea-6.1.11.3.ebuild, files/icedtea-6_pax_kernel_support.patch, icedtea-7.2.1.1.ebuild, diff --git a/dev-java/icedtea/files/icedtea-7.2.2.1-warnings_are_errors.patch b/dev-java/icedtea/files/icedtea-7.2.2.1-warnings_are_errors.patch new file mode 100644 index 000000000000..2822155a2e89 --- /dev/null +++ b/dev-java/icedtea/files/icedtea-7.2.2.1-warnings_are_errors.patch @@ -0,0 +1,217 @@ +diff --git a/Makefile.am b/Makefile.am +index 49d8bc4..b20ee99 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -235,7 +235,8 @@ REWRITER_SRCS = $(top_srcdir)/rewriter/com/redhat/rewriter/ClassRewriter.java + + # Patch list + +-ICEDTEA_PATCHES = ++ICEDTEA_PATCHES = \ ++ patches/warnings-are-errors.patch + + # Conditional patches + +@@ -437,7 +438,9 @@ ICEDTEA_ENV = \ + USE_SYSTEM_CUPS="true" \ + CUPS_LIBS="${CUPS_LIBS}" \ + CUPS_CFLAGS="${CUPS_CFLAGS}" \ +- ALT_STRIP_POLICY=no_strip ++ ALT_STRIP_POLICY=no_strip \ ++ COMPILER_WARNINGS_FATAL="@WARNINGS_ARE_ERRORS@" \ ++ JAVAC_WARNINGS_FATAL="@WARNINGS_ARE_ERRORS@" + + if ENABLE_CACAO + ICEDTEA_ENV += \ +diff --git a/acinclude.m4 b/acinclude.m4 +index f0a336f..3dc4aa0 100644 +--- a/acinclude.m4 ++++ b/acinclude.m4 +@@ -2244,3 +2244,23 @@ AC_DEFUN_ONCE([IT_WITH_PAX], + AC_SUBST(PAX_COMMAND) + AC_SUBST(PAX_COMMAND_ARGS) + ]) ++ ++AC_DEFUN_ONCE([IT_WARNINGS_ARE_ERRORS], ++[ ++ AC_MSG_CHECKING([whether to treat warnings as errors.]) ++ AC_ARG_ENABLE([warnings-are-errors], ++ [AS_HELP_STRING(--enable-warnings-are-errors,treat warnings as errors [[default=yes]])], ++ [ ++ if test x"${enableval}" = "xyes"; then ++ WARNINGS_ARE_ERRORS="true" ++ else ++ WARNINGS_ARE_ERRORS="false" ++ fi ++ ], ++ [ ++ dnl use local defaults ++ WARNINGS_ARE_ERRORS= ++ ]) ++ AC_MSG_RESULT([${WARNINGS_ARE_ERRORS}]) ++ AC_SUBST([WARNINGS_ARE_ERRORS]) ++]) +diff --git a/configure.ac b/configure.ac +index 36c9d77..af52bf1 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -54,6 +54,7 @@ IT_DISABLE_TESTS + IT_DISABLE_HOTSPOT_TESTS + IT_DISABLE_LANGTOOLS_TESTS + IT_DISABLE_JDK_TESTS ++IT_WARNINGS_ARE_ERRORS + + # Use xvfb-run if found to run gui tests (check-jdk). + AC_CHECK_PROG(XVFB_RUN_CMD, xvfb-run, [xvfb-run -a -e xvfb-errors], []) +diff --git a/patches/boot/ecj-opts.patch b/patches/boot/ecj-opts.patch +index 99ed532..284bd37 100644 +--- a/patches/boot/ecj-opts.patch ++++ b/patches/boot/ecj-opts.patch +@@ -5,8 +5,8 @@ diff -Nru openjdk-boot.orig/jdk/make/java/nio/Makefile openjdk-boot/jdk/make/jav + PACKAGE = java.nio + LIBRARY = nio + PRODUCT = java +--OTHER_JAVACFLAGS += -Xmaxwarns 1000 -Xlint:serial -Werror ++-OTHER_JAVACFLAGS += -Xmaxwarns 1000 -Xlint:serial + +OTHER_JAVACFLAGS += -Xlint:serial -Werror +- include $(BUILDDIR)/common/Defs.gmk +- +- NIO_SRC = $(SHARE_SRC)/classes/java/nio ++ ifneq ($(JAVAC_WARNINGS_FATAL),false) ++ OTHER_JAVACFLAGS += -Werror ++ endif +diff --git a/patches/warnings-are-errors.patch b/patches/warnings-are-errors.patch +new file mode 100644 +index 0000000..7fe1e08 +--- /dev/null ++++ b/patches/warnings-are-errors.patch +@@ -0,0 +1,129 @@ ++--- openjdk/hotspot/make/linux/makefiles/adlc.make +++++ openjdk/hotspot/make/linux/makefiles/adlc.make ++@@ -67,8 +67,10 @@ ++ CXXFLAGS += -DASSERT ++ ++ # CFLAGS_WARN holds compiler options to suppress/enable warnings. ++-# Compiler warnings are treated as errors ++-CFLAGS_WARN = -Werror +++# Treat compiler warnings as errors, unless warnings are allowed +++ifneq ($(COMPILER_WARNINGS_FATAL),false) +++ CFLAGS_WARN = -Werror +++endif ++ CFLAGS += $(CFLAGS_WARN) ++ ++ OBJECTNAMES = \ ++--- openjdk/hotspot/make/linux/makefiles/gcc.make +++++ openjdk/hotspot/make/linux/makefiles/gcc.make ++@@ -149,8 +149,10 @@ ++ CFLAGS += -pipe ++ endif ++ ++-# Compiler warnings are treated as errors ++-WARNINGS_ARE_ERRORS = -Werror +++# Treat compiler warnings as errors, unless warnings are allowed +++ifneq ($(COMPILER_WARNINGS_FATAL),false) +++ WARNINGS_ARE_ERRORS = -Werror +++endif ++ ++ # Except for a few acceptable ones ++ # Since GCC 4.3, -Wconversion has changed its meanings to warn these implicit ++--- openjdk/hotspot/make/solaris/makefiles/gcc.make +++++ openjdk/hotspot/make/solaris/makefiles/gcc.make ++@@ -111,8 +111,10 @@ ++ endif ++ ++ ++-# Compiler warnings are treated as errors ++-WARNINGS_ARE_ERRORS = -Werror +++# Treat compiler warnings as errors, unless warnings are allowed +++ifneq ($(COMPILER_WARNINGS_FATAL),false) +++ WARNINGS_ARE_ERRORS = -Werror +++endif ++ # Enable these warnings. See 'info gcc' about details on these options ++ ADDITIONAL_WARNINGS = -Wpointer-arith -Wconversion -Wsign-compare ++ CFLAGS_WARN/DEFAULT = $(WARNINGS_ARE_ERRORS) $(ADDITIONAL_WARNINGS) ++--- openjdk/jdk/make/java/nio/Makefile +++++ openjdk/jdk/make/java/nio/Makefile ++@@ -31,7 +31,10 @@ ++ PACKAGE = java.nio ++ LIBRARY = nio ++ PRODUCT = java ++-OTHER_JAVACFLAGS += -Xmaxwarns 1000 -Xlint:serial -Werror +++OTHER_JAVACFLAGS += -Xmaxwarns 1000 -Xlint:serial +++ifneq ($(JAVAC_WARNINGS_FATAL),false) +++ OTHER_JAVACFLAGS += -Werror +++endif ++ include $(BUILDDIR)/common/Defs.gmk ++ ++ NIO_SRC = $(SHARE_SRC)/classes/java/nio ++--- openjdk/jdk/make/java/sun_nio/Makefile +++++ openjdk/jdk/make/java/sun_nio/Makefile ++@@ -31,7 +31,11 @@ ++ PACKAGE = sun.nio ++ PRODUCT = sun ++ ++-OTHER_JAVACFLAGS += -Xlint:serial,-deprecation -Werror +++OTHER_JAVACFLAGS += -Xlint:serial,-deprecation +++ifneq ($(JAVAC_WARNINGS_FATAL),false) +++ OTHER_JAVACFLAGS += -Werror +++endif +++ ++ include $(BUILDDIR)/common/Defs.gmk ++ ++ # ++--- openjdk/jdk/make/sun/native2ascii/Makefile +++++ openjdk/jdk/make/sun/native2ascii/Makefile ++@@ -30,7 +30,10 @@ ++ BUILDDIR = ../.. ++ PACKAGE = sun.tools.native2ascii ++ PRODUCT = sun ++-OTHER_JAVACFLAGS += -Xlint:serial -Werror +++OTHER_JAVACFLAGS += -Xlint:serial +++ifneq ($(JAVAC_WARNINGS_FATAL),false) +++ OTHER_JAVACFLAGS += -Werror +++endif ++ include $(BUILDDIR)/common/Defs.gmk ++ ++ # This program must contain a manifest that defines the execution level ++--- openjdk/jdk/make/sun/nio/cs/Makefile +++++ openjdk/jdk/make/sun/nio/cs/Makefile ++@@ -36,7 +36,10 @@ ++ # This re-directs all the class files to a separate location ++ CLASSDESTDIR = $(TEMPDIR)/classes ++ ++-OTHER_JAVACFLAGS += -Xlint:serial,-deprecation -Werror +++OTHER_JAVACFLAGS += -Xlint:serial,-deprecation +++ifneq ($(JAVAC_WARNINGS_FATAL),false) +++ OTHER_JAVACFLAGS += -Werror +++endif ++ include $(BUILDDIR)/common/Defs.gmk ++ ++ # ++--- openjdk/jdk/make/tools/Makefile +++++ openjdk/jdk/make/tools/Makefile ++@@ -29,7 +29,10 @@ ++ ++ BUILDDIR = .. ++ ++-SUBDIRS_MAKEFLAGS += JAVAC_MAX_WARNINGS=true JAVAC_WARNINGS_FATAL=true +++SUBDIRS_MAKEFLAGS += JAVAC_MAX_WARNINGS=true +++ifneq ($(JAVAC_WARNINGS_FATAL),false) +++ SUBDIRS_MAKEFLAGS += JAVAC_WARNINGS_FATAL=true +++endif ++ include $(BUILDDIR)/common/Defs.gmk ++ ++ # Note: freetypecheck is built by Sanity.gmk if needed ++--- openjdk/langtools/make/Makefile +++++ openjdk/langtools/make/Makefile ++@@ -111,6 +111,10 @@ ++ ANT_OPTIONS += -Ddebug.classfiles=true ++ endif ++ +++ifeq ($(JAVAC_WARNINGS_FATAL),false) +++ ANT_OPTIONS += -Djavac.lint.opts=-Xlint:all,-deprecation +++endif +++ ++ # Note: jdk/make/common/Defs.gmk uses LANGUAGE_VERSION (-source NN) ++ # and the somewhat misnamed CLASS_VERSION (-target NN) ++ ifdef TARGET_CLASS_VERSION diff --git a/dev-java/icedtea/icedtea-7.2.2.1.ebuild b/dev-java/icedtea/icedtea-7.2.2.1.ebuild index dc4654136edc..655481fce78a 100644 --- a/dev-java/icedtea/icedtea-7.2.2.1.ebuild +++ b/dev-java/icedtea/icedtea-7.2.2.1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-java/icedtea/icedtea-7.2.2.1.ebuild,v 1.2 2012/06/24 08:19:48 sera Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-java/icedtea/icedtea-7.2.2.1.ebuild,v 1.3 2012/06/27 19:08:57 sera Exp $ # Build written by Andrew John Hughes (gnu_andrew@member.fsf.org) # ********************************************************* @@ -163,6 +163,7 @@ java_prepare() { epatch "${FILESDIR}"/${P}-pr986-cacao_memory_fix.patch epatch "${FILESDIR}"/${PN}-${SLOT}-compile_for_7_cacao_mem.patch epatch "${FILESDIR}"/${P}-pax_mark_rmic_java.patch #422525 + epatch "${FILESDIR}"/${P}-warnings_are_errors.patch #310503 #418359 eautoreconf } @@ -229,6 +230,7 @@ src_configure() { --with-jdk-home="$(java-config -O)" \ --with-abs-install-dir=/usr/$(get_libdir)/icedtea${SLOT} \ --disable-downloading \ + --disable-warnings-are-errors \ $(use_enable !debug optimizations) \ $(use_enable doc docs) \ $(use_enable nss) \ |