From: Bruno Haible Date: Sun, 11 Jun 2023 01:08:53 +0000 (+0200) Subject: javacomp: Simplify after gcj support was removed. X-Git-Tag: v1.0~1224 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=9c0ea2fc68353d2fecc393676af32a21c2f2665a;p=gnulib.git javacomp: Simplify after gcj support was removed. * m4/javacomp.m4 (gt_JAVACOMP): Don't create conftestlib.java. * lib/javacomp.c (compile_java_class): Remove local variables no_assert_option, fsource_option, ftarget_option. --- diff --git a/ChangeLog b/ChangeLog index dc482ca59c..ba0e23fcd4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2023-06-10 Bruno Haible + + javacomp: Simplify after gcj support was removed. + * m4/javacomp.m4 (gt_JAVACOMP): Don't create conftestlib.java. + * lib/javacomp.c (compile_java_class): Remove local variables + no_assert_option, fsource_option, ftarget_option. + 2023-06-09 Bruno Haible doc: Document . diff --git a/lib/javacomp.c b/lib/javacomp.c index ee3fe220eb..b071f172de 100644 --- a/lib/javacomp.c +++ b/lib/javacomp.c @@ -1024,11 +1024,8 @@ compile_java_class (const char * const *java_sources, if (javac != NULL && javac[0] != '\0') { bool usable = false; - bool no_assert_option = false; bool source_option = false; bool target_option = false; - bool fsource_option = false; - bool ftarget_option = false; const char *source_version_for_javac; if (target_version == NULL) @@ -1058,18 +1055,12 @@ compile_java_class (const char * const *java_sources, set_classpath (classpaths, classpaths_count, false, verbose); javac_with_options = - (no_assert_option - ? xasprintf ("%s -fno-assert", javac) - : xasprintf ("%s%s%s%s%s%s%s%s%s", - javac, - source_option ? " -source " : "", - source_option ? source_version_for_javac : "", - target_option ? " -target " : "", - target_option ? target_version : "", - fsource_option ? " -fsource=" : "", - fsource_option ? source_version : "", - ftarget_option ? " -ftarget=" : "", - ftarget_option ? target_version : "")); + xasprintf ("%s%s%s%s%s", + javac, + source_option ? " -source " : "", + source_option ? source_version_for_javac : "", + target_option ? " -target " : "", + target_option ? target_version : ""); assume (javac_with_options != NULL); err = compile_using_envjavac (javac_with_options, diff --git a/m4/javacomp.m4 b/m4/javacomp.m4 index d9e1608e0b..d373708d42 100644 --- a/m4/javacomp.m4 +++ b/m4/javacomp.m4 @@ -243,14 +243,6 @@ changequote([,])dnl HAVE_JAVAC_ENVVAR= HAVE_JAVAC= HAVE_JAVACOMP= -changequote(,)dnl - cat > conftestlib.java < conftest.java echo "$failcode" > conftestfail.java dnl If the user has set the JAVAC environment variable, use that, if it