Mercurial > hg > icedtea9
view javac.in @ 2651:e40064fec5cb
PR2766: Remove all references to GCJ
2016-03-31 Andrew John Hughes <gnu_andrew@member.fsf.org>
PR2766: Remove all references to GCJ
* Makefile.am:
Remove dead commented out lines.
(ICEDTEA_BOOTSTRAP_CLASSES): Remove unused variable.
(clean-local): Remove clean-native-ecj.
(native-ecj): Removed.
(clean-native-ecj): Likewise.
(bootstrap-directory-stage1): Remove dependency on
native-ecj.
* NEWS: Updated.
* acinclude.m4:
(IT_WITH_GCJ): Removed.
(IT_CHECK_FOR_JDK): Remove unused GCJ_VMS variable.
* configure.ac:
Don't invoke IT_WITH_GCJ or search for gcj.
* javac.in:
Update bootstrap classpath. Remove attempt to
use native-ecj.
author | Andrew John Hughes <gnu_andrew@member.fsf.org> |
---|---|
date | Fri, 01 Apr 2016 03:32:05 +0100 |
parents | 377344362073 |
children |
line wrap: on
line source
#!/usr/bin/perl -w use strict; use constant NO_DUP_ARGS => qw(-source -target -d -encoding); use constant STRIP_ARGS_1 => qw(-Werror -implicit:none); use constant STRIP_ARGS_2 => qw(-Xmaxwarns); my ($ECJ_WARNINGS, $JAVAC_WARNINGS); if ("@ENABLE_WARNINGS@" eq "yes") { $ECJ_WARNINGS="-warn:-deprecation,serial,unused,warningToken"; $JAVAC_WARNINGS="-Xlint:unchecked,cast,divzero,empty,finally,overrides"; } else { $ECJ_WARNINGS="-nowarn"; $JAVAC_WARNINGS="-nowarn"; } my @bcoption; push @bcoption, '-bootclasspath', glob '@abs_top_builddir@/bootstrap/jdk1.7.0/jre/lib/rt.jar' unless grep {$_ eq '-bootclasspath'} @ARGV; my @ecj_parms = ($ECJ_WARNINGS, @bcoption); my @javac_parms = ($JAVAC_WARNINGS, '-Xprefer:source', '-XDignore.symbol.file=true', '-J-Xmx1024m'); # Work around ecj's inability to handle duplicate command-line # options and unknown javac options. sub gen_ecj_opts { my @new_args = @{$_[0]}; for my $opt (NO_DUP_ARGS) { my @indices = reverse grep {$new_args[$_] eq $opt} 0..$#new_args; if (@indices > 1) { shift @indices; # keep last instance only splice @new_args, $_, 2 for @indices; } } 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; } if ( -e "@JAVAC@" ) { if ("@USING_ECJ@" eq "yes") { my @ecj_args = gen_ecj_opts( \@ARGV ); exec '@JAVAC@', @ecj_parms, @ecj_args ; } else { exec '@JAVAC@', @javac_parms, @ARGV ; } } else { my @ecj_args = gen_ecj_opts( \@ARGV ); my @CLASSPATH = ('@ECJ_JAR@'); push @CLASSPATH, split /:/, $ENV{"CLASSPATH"} if exists $ENV{"CLASSPATH"}; $ENV{"CLASSPATH"} = join ':', @CLASSPATH; exec '@JAVA@', 'org.eclipse.jdt.internal.compiler.batch.Main', @ecj_parms, @ecj_args; }