/hg/icedtea: PR1937: Add configure option for -Werror
andrew at icedtea.classpath.org
andrew at icedtea.classpath.org
Thu Jun 25 01:04:07 UTC 2015
changeset 377344362073 in /hg/icedtea
details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=377344362073
author: Andrew John Hughes <gnu_andrew at member.fsf.org>
date: Thu Jun 25 02:00:15 2015 +0100
PR1937: Add configure option for -Werror
2015-06-24 Andrew John Hughes <gnu_andrew at member.fsf.org>
* Makefile.am:
(ICEDTEA_CONFIGURE): Pass --enable-warnings-as-errors
or --disable-warnings-as-errors, depending on whether
or not ENABLE_WERROR is set.
2012-08-16 Andrew John Hughes <gnu_andrew at member.fsf.org>
* acinclude.m4:
(IT_ENABLE_WERROR): New macro to enable -Werror.
This is disabled by default.
* configure.ac: Call IT_ENABLE_WERROR.
* javac.in: Handle stripping of arguments which
take parameters, specifically -Xmaxwarns.
diffstat:
ChangeLog | 16 ++++++++++++++++
Makefile.am | 8 ++++++++
acinclude.m4 | 22 ++++++++++++++++++++++
configure.ac | 1 +
javac.in | 11 +++++++++--
5 files changed, 56 insertions(+), 2 deletions(-)
diffs (117 lines):
diff -r f2c069c0fbe6 -r 377344362073 ChangeLog
--- a/ChangeLog Fri Jun 19 13:22:58 2015 +0100
+++ b/ChangeLog Thu Jun 25 02:00:15 2015 +0100
@@ -1,3 +1,19 @@
+2015-06-24 Andrew John Hughes <gnu_andrew at member.fsf.org>
+
+ * Makefile.am:
+ (ICEDTEA_CONFIGURE): Pass --enable-warnings-as-errors
+ or --disable-warnings-as-errors, depending on whether
+ or not ENABLE_WERROR is set.
+
+2012-08-16 Andrew John Hughes <gnu_andrew at member.fsf.org>
+
+ * acinclude.m4:
+ (IT_ENABLE_WERROR): New macro to enable -Werror.
+ This is disabled by default.
+ * configure.ac: Call IT_ENABLE_WERROR.
+ * javac.in: Handle stripping of arguments which
+ take parameters, specifically -Xmaxwarns.
+
2015-06-17 Andrew John Hughes <gnu_andrew at member.fsf.org>
PR2456: Installation path for hotspot_gc.stp is
diff -r f2c069c0fbe6 -r 377344362073 Makefile.am
--- a/Makefile.am Fri Jun 19 13:22:58 2015 +0100
+++ b/Makefile.am Thu Jun 25 02:00:15 2015 +0100
@@ -359,6 +359,14 @@
--with-jvm-variants=zeroshark
endif
+if ENABLE_WERROR
+ICEDTEA_CONFIGURE += \
+ --enable-warnings-as-errors
+else
+ICEDTEA_CONFIGURE += \
+ --disable-warnings-as-errors
+endif
+
ICEDTEA_ENV = \
LANG="C" \
PATH="$(BOOT_DIR)/bin:$(OS_PATH):$$PATH" \
diff -r f2c069c0fbe6 -r 377344362073 acinclude.m4
--- a/acinclude.m4 Fri Jun 19 13:22:58 2015 +0100
+++ b/acinclude.m4 Thu Jun 25 02:00:15 2015 +0100
@@ -1229,6 +1229,28 @@
AC_PROVIDE([$0])dnl
])
+AC_DEFUN([IT_ENABLE_WERROR],
+[
+ AC_MSG_CHECKING([whether to enable -Werror])
+ AC_ARG_ENABLE([Werror],
+ [AS_HELP_STRING(--enable-Werror,build with -Werror [[default=no]])],
+ [
+ case "${enableval}" in
+ yes)
+ enable_werror=yes
+ ;;
+ *)
+ enable_werror=no
+ ;;
+ esac
+ ],
+ [
+ enable_werror=no
+ ])
+ AC_MSG_RESULT([$enable_werror])
+ AM_CONDITIONAL([ENABLE_WERROR], test x"${enable_werror}" = "xyes")
+])
+
AC_DEFUN([IT_FIND_NUMBER_OF_PROCESSORS],[
FIND_TOOL([GETCONF], [getconf])
AC_CACHE_CHECK([the number of online processors], it_cv_proc, [
diff -r f2c069c0fbe6 -r 377344362073 configure.ac
--- a/configure.ac Fri Jun 19 13:22:58 2015 +0100
+++ b/configure.ac Thu Jun 25 02:00:15 2015 +0100
@@ -127,6 +127,7 @@
IT_WITH_JAMVM_SRC_ZIP
IT_DISABLE_OPTIMIZATIONS
+IT_ENABLE_WERROR
IT_ENABLE_JAR_COMPRESSION
IT_ENABLE_ZERO_BUILD
IT_CHECK_ADDITIONAL_VMS
diff -r f2c069c0fbe6 -r 377344362073 javac.in
--- a/javac.in Fri Jun 19 13:22:58 2015 +0100
+++ b/javac.in Thu Jun 25 02:00:15 2015 +0100
@@ -1,7 +1,8 @@
#!/usr/bin/perl -w
use strict;
use constant NO_DUP_ARGS => qw(-source -target -d -encoding);
-use constant STRIP_ARGS => qw(-Werror -implicit:none);
+use constant STRIP_ARGS_1 => qw(-Werror -implicit:none);
+use constant STRIP_ARGS_2 => qw(-Xmaxwarns);
my ($ECJ_WARNINGS, $JAVAC_WARNINGS);
@@ -38,12 +39,18 @@
}
}
- for my $opt (STRIP_ARGS)
+ for my $opt (STRIP_ARGS_1)
{
my @indices = reverse grep {$new_args[$_] eq $opt} 0..$#new_args;
splice @new_args, $_, 1 for @indices;
}
+ for my $opt (STRIP_ARGS_2)
+ {
+ my @indices = reverse grep {$new_args[$_] eq $opt} 0..$#new_args;
+ splice @new_args, $_, 2 for @indices;
+ }
+
return @new_args;
}
More information about the distro-pkg-dev
mailing list