]> Savannah Git Hosting - gnulib.git/commitdiff
javacomp: Simplify after gcj support was removed.
authorBruno Haible <bruno@clisp.org>
Sun, 11 Jun 2023 01:08:53 +0000 (03:08 +0200)
committerBruno Haible <bruno@clisp.org>
Sun, 11 Jun 2023 01:08:53 +0000 (03:08 +0200)
* 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.

ChangeLog
lib/javacomp.c
m4/javacomp.m4

index dc482ca59c3f6ae8174b775d7a55d9ff7d05fafa..ba0e23fcd45c0b004140c0e36ed49cb684b38081 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2023-06-10  Bruno Haible  <bruno@clisp.org>
+
+       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  <bruno@clisp.org>
 
        doc: Document <stdatomic.h>.
index ee3fe220ebbdfd0d825a1b26ce96ba018e11926b..b071f172de896ed87622c0dff70295f55ca45be7 100644 (file)
@@ -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,
index d9e1608e0b86052d1ed478dab5e43e0ce9702db4..d373708d42873d9866e3ec74cf07d6cfae69bae1 100644 (file)
@@ -243,14 +243,6 @@ changequote([,])dnl
   HAVE_JAVAC_ENVVAR=
   HAVE_JAVAC=
   HAVE_JAVACOMP=
-changequote(,)dnl
-  cat > conftestlib.java <<EOF
-public class conftestlib {
-  public static void main (String[] args) {
-  }
-}
-EOF
-changequote([,])dnl
   echo "$goodcode" > conftest.java
   echo "$failcode" > conftestfail.java
   dnl If the user has set the JAVAC environment variable, use that, if it