view javac.in @ 1282:cedcd6958a6f

Remove detection of libgcj.jar and the corresponding LIBGCJ_JAR. We already detect/accept the home directory for GCJ, the JAR file can be derived from this. The LIBGCJ_JAR macro was hiding a GCC_OLD macro to enable the 4.3 patches, which assumes a connection between the JAR file and the version of GCC. I converted this to a proper check. 2008-12-17 Andrew John Hughes <gnu_andrew@member.fsf.org> * Makefile.am: Remove use of LIBGCJ_JAR, replacing with SYSTEM_GCJ_DIR/jre/lib/rt.jar. * acinclude.m4: (AC_CHECK_GCC_VERSION): Added. (FIND_LIBGCJ_JAR): Removed. * configure.ac: Call AC_CHECK_GCC_VERSION, don't call FIND_LIBGCJ_JAR. * javac.in: Use SYSTEM_GCJ_DIR/jre/lib/rt.jar not LIBGCJ_JAR.
author Andrew John Hughes <gnu_andrew@member.fsf.org>
date Wed, 17 Dec 2008 20:16:53 +0000
parents 4924c505eff0
children
line wrap: on
line source

#!/bin/sh

case "$*" in
  *-bootclasspath*) ;;
  *) bcoption="-bootclasspath @SYSTEM_GCJ_DIR@/jre/lib/rt.jar"
esac

# Work around ecj's inability to handle duplicate command-line
# options.

NEW_ARGS="$@"

if echo "$@" | grep -q '\-source\ .*\-source\ '
then
  NEW_ARGS=`echo $NEW_ARGS | sed -e 's/-source\ *1\.[3456]//1'`
fi

if echo "$@" | grep -q '\-d\ .*\-d\ '
then
  NEW_ARGS=`echo $NEW_ARGS | sed -e 's/-d\ *[^\ ]*//1'`
fi

if echo "$@" | grep -q '\-encoding\ .*\-encoding\ '
then
  NEW_ARGS=`echo $NEW_ARGS | sed -e 's/-encoding\ *[^\ ]*//1'`
fi

if echo "$@" | grep -q '\-Werror'
then
  NEW_ARGS=`echo $NEW_ARGS | sed -e 's/-Werror//1'`
fi

if [ -e @abs_top_builddir@/native-ecj ] ; then
    @abs_top_builddir@/native-ecj -1.5 -nowarn $bcoption $NEW_ARGS ;
elif [ ! -z "@ECJ@" ] ; then
    @ECJ@ -1.5 -nowarn $bcoption $NEW_ARGS
else
    CLASSPATH=@ECJ_JAR@${CLASSPATH:+:}$CLASSPATH \
     @JAVA@ org.eclipse.jdt.internal.compiler.batch.Main -1.5 -nowarn $bcoption $NEW_ARGS
fi