This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Option alias support for .opt files
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: java-patches at gcc dot gnu dot org
- Date: Wed, 1 Sep 2010 19:33:19 +0000 (UTC)
- Subject: Re: Option alias support for .opt files
- References: <Pine.LNX.4.64.1009011922130.24176@digraph.polyomino.org.uk>
Java people should note there are some Java pieces in this patch
<http://gcc.gnu.org/ml/gcc-patches/2010-09/msg00080.html>:
> java:
> 2010-09-01 Joseph Myers <joseph@codesourcery.com>
>
> * lang.opt (CLASSPATH, bootclasspath, classpath, encoding,
> fCLASSPATH=): Mark as Java options and as aliases.
> * jvspec.c (jvgenmain_spec): Don't handle -fCLASSPATH*.
> (lang_specific_driver): Don't handle options marked as aliases.
> * lang.c (java_handle_option): Don't handle OPT_fCLASSPATH_.
>
> Index: gcc/java/jvspec.c
> ===================================================================
> --- gcc/java/jvspec.c (revision 163669)
> +++ gcc/java/jvspec.c (working copy)
> @@ -69,7 +69,7 @@ static const char jvgenmain_spec[] =
> %<fuse-boehm-gc %<fhash-synchronization %<fjni\
> %<findirect-dispatch %<fnew-verifier\
> %<fno-store-check %<foutput-class-dir\
> - %<fclasspath* %<fCLASSPATH* %<fbootclasspath*\
> + %<fclasspath* %<fbootclasspath*\
> %<fextdirs*\
> %<fuse-divide-subroutine %<fno-use-divide-subroutine\
> %<fuse-atomic-builtins %<fno-use-atomic-builtins\
> @@ -299,10 +299,8 @@ lang_specific_driver (struct cl_decoded_
> saw_o = 1;
> break;
>
> - case OPT_classpath:
> - case OPT_bootclasspath:
> - case OPT_CLASSPATH:
> - case OPT_encoding:
> + case OPT_fclasspath_:
> + case OPT_fbootclasspath_:
> case OPT_extdirs:
> added -= 1;
> break;
> @@ -514,15 +512,11 @@ lang_specific_driver (struct cl_decoded_
> --j;
> continue;
>
> - case OPT_classpath:
> - case OPT_CLASSPATH:
> - case OPT_fCLASSPATH_:
> case OPT_fclasspath_:
> jcf_path_classpath_arg (decoded_options[i].arg);
> --j;
> continue;
>
> - case OPT_bootclasspath:
> case OPT_fbootclasspath_:
> jcf_path_bootclasspath_arg (decoded_options[i].arg);
> --j;
> @@ -533,11 +527,6 @@ lang_specific_driver (struct cl_decoded_
> --j;
> continue;
>
> - case OPT_encoding:
> - generate_option (OPT_fencoding_, decoded_options[i].arg, 1,
> - CL_DRIVER, &new_decoded_options[j]);
> - continue;
> -
> case OPT_L:
> if (spec_file == NULL)
> spec_file = find_spec_file (decoded_options[i].arg);
> Index: gcc/java/lang.opt
> ===================================================================
> --- gcc/java/lang.opt (revision 163669)
> +++ gcc/java/lang.opt (working copy)
> @@ -29,7 +29,7 @@ Driver
> ; Java driver option in fact distinct from C-family option with the same name.
>
> CLASSPATH
> -Driver Separate
> +Java Separate Alias(fclasspath=)
>
> D
> Driver Joined Separate
> @@ -88,19 +88,19 @@ Java Var(flag_redundant)
> Warn if modifiers are specified when not necessary
>
> bootclasspath
> -Driver Separate
> +Java Separate Alias(fbootclasspath=)
>
> classpath
> -Driver Separate
> +Java Separate Alias(fclasspath=)
>
> encoding
> -Driver Separate
> +Java Separate Alias(fencoding=)
>
> extdirs
> Driver Separate
>
> fCLASSPATH=
> -Java JoinedOrMissing RejectNegative
> +Java JoinedOrMissing RejectNegative Alias(fclasspath=)
> --CLASSPATH Deprecated; use --classpath instead
>
> faux-classpath
> Index: gcc/java/lang.c
> ===================================================================
> --- gcc/java/lang.c (revision 163669)
> +++ gcc/java/lang.c (working copy)
> @@ -261,7 +261,6 @@ java_handle_option (size_t scode, const
>
> case OPT_faux_classpath:
> case OPT_fclasspath_:
> - case OPT_fCLASSPATH_:
> jcf_path_classpath_arg (arg);
> break;
>
--
Joseph S. Myers
joseph@codesourcery.com