This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
fix for CLASSPATH/classpath switch behaviour
- From: Nic Ferrier <nferrier at tapsellferrier dot co dot uk>
- To: gcc-patches at gcc dot gnu dot org
- Date: 08 Feb 2002 04:11:24 +0000
- Subject: fix for CLASSPATH/classpath switch behaviour
The current classpath switches do the following:
-classpath X
sets X as the class path, overriding the system class path.
-CLASSPATH
sets X as the class path, without overriding the system class path.
Unfortunately, this does not match what Sun's javac compiler
does. With javac the -classpath switch does NOT override the system
class path.
If GCJ uses different semantics for options then it's quite difficult
to just swap GCJ into a build environment, replacing javac (one has
to alter makefiles at least!)
The attached patch solves the problem. It simply swaps the meaning of
the two options.
Nic Ferrier
*** lang.c.~1.84.~ Tue Jan 1 01:42:15 2002
--- lang.c Fri Feb 8 01:32:11 2002
***************
*** 299,312 ****
return 1;
}
#undef CLARG
! #define CLARG "-fclasspath="
if (strncmp (p, CLARG, sizeof (CLARG) - 1) == 0)
{
jcf_path_classpath_arg (p + sizeof (CLARG) - 1);
return 1;
}
#undef CLARG
! #define CLARG "-fCLASSPATH="
if (strncmp (p, CLARG, sizeof (CLARG) - 1) == 0)
{
jcf_path_CLASSPATH_arg (p + sizeof (CLARG) - 1);
--- 299,312 ----
return 1;
}
#undef CLARG
! #define CLARG "-fCLASSPATH="
if (strncmp (p, CLARG, sizeof (CLARG) - 1) == 0)
{
jcf_path_classpath_arg (p + sizeof (CLARG) - 1);
return 1;
}
#undef CLARG
! #define CLARG "-fclasspath="
if (strncmp (p, CLARG, sizeof (CLARG) - 1) == 0)
{
jcf_path_CLASSPATH_arg (p + sizeof (CLARG) - 1);