* doc/options.texi (ToLower): Document.
* opt-functions.awk (switch_bit_fields): Initialize cl_tolower
field.
* opts-common.c (decode_cmdline_option): Handle cl_tolower.
* opts.h (cl_option): Add cl_tolower field.
* config/rx/rx.c (rx_handle_option): Use strcmp of -mcpu=
arguments with lowercase strings.
* config/rx/rx.opt (mcpu=): Add ToLower.
* config/rx/t-rx (MULTILIB_MATCHES): Don't handle uppercase -mcpu=
argument.
From-SVN: r171932
+2011-04-04 Joseph Myers <joseph@codesourcery.com>
+
+ * doc/options.texi (ToLower): Document.
+ * opt-functions.awk (switch_bit_fields): Initialize cl_tolower
+ field.
+ * opts-common.c (decode_cmdline_option): Handle cl_tolower.
+ * opts.h (cl_option): Add cl_tolower field.
+ * config/rx/rx.c (rx_handle_option): Use strcmp of -mcpu=
+ arguments with lowercase strings.
+ * config/rx/rx.opt (mcpu=): Add ToLower.
+ * config/rx/t-rx (MULTILIB_MATCHES): Don't handle uppercase -mcpu=
+ argument.
+
2011-04-04 Richard Sandiford <richard.sandiford@linaro.org>
* config/pdp11/pdp11.h (IRA_COVER_CLASSES): Delete.
return value >= 0 && value <= 4;
case OPT_mcpu_:
- if (strcasecmp (arg, "RX610") == 0)
+ if (strcmp (arg, "rx610") == 0)
rx_cpu_type = RX610;
- else if (strcasecmp (arg, "RX200") == 0)
+ else if (strcmp (arg, "rx200") == 0)
{
target_flags |= MASK_NO_USE_FPU;
rx_cpu_type = RX200;
}
- else if (strcasecmp (arg, "RX600") != 0)
+ else if (strcmp (arg, "rx600") != 0)
warning (0, "unrecognized argument '%s' to -mcpu= option", arg);
break;
; Command line options for the Renesas RX port of GCC.
-; Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
+; Copyright (C) 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
; Contributed by Red Hat.
;
; This file is part of GCC.
;---------------------------------------------------
mcpu=
-Target RejectNegative Joined Var(rx_cpu_name) Report
+Target RejectNegative Joined Var(rx_cpu_name) Report ToLower
Specify the target RX cpu type.
;---------------------------------------------------
# Makefile fragment for building GCC for the Renesas RX target.
-# Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
# Contributed by Red Hat.
#
# This file is part of GCC.
MULTILIB_OPTIONS = m64bit-doubles nofpu mbig-endian-data
MULTILIB_DIRNAMES = 64-bit-double no-fpu-libs big-endian-data
-MULTILIB_MATCHES = nofpu=mnofpu nofpu=mcpu?rx200 nofpu=mcpu?RX200
+MULTILIB_MATCHES = nofpu=mnofpu nofpu=mcpu?rx200
MULTILIB_EXCEPTIONS =
MULTILIB_EXTRA_OPTS =
@code{-falign-loops}=@var{n} are supported to make sure the saved
options are given a full integer.
+@item ToLower
+The option's argument should be converted to lowercase as part of
+putting it in canonical form, and before comparing with the strings
+indicated by any @code{Enum} property.
+
@item NoDriverArg
For an option marked @code{Separate}, the option only takes an
argument in the compiler proper, not in the driver. This is for
flag_init("RejectNegative", flags) \
flag_init("JoinedOrMissing", flags) \
flag_init("UInteger", flags) \
+ flag_init("ToLower", flags) \
flag_init("Report", flags)
sub(", $", "", result)
if (!option_ok_for_language (option, lang_mask))
errors |= CL_ERR_WRONG_LANG;
+ /* Convert the argument to lowercase if appropriate. */
+ if (arg && option->cl_tolower)
+ {
+ size_t j;
+ size_t len = strlen (arg);
+ char *arg_lower = XNEWVEC (char, len + 1);
+
+ for (j = 0; j < len; j++)
+ arg_lower[j] = TOLOWER ((unsigned char) arg[j]);
+ arg_lower[len] = 0;
+ arg = arg_lower;
+ }
+
/* If the switch takes an integer, convert it. */
if (arg && option->cl_uinteger)
{
BOOL_BITFIELD cl_missing_ok : 1;
/* Argument is an integer >=0. */
BOOL_BITFIELD cl_uinteger : 1;
+ /* Argument should be converted to lowercase. */
+ BOOL_BITFIELD cl_tolower : 1;
/* Report argument with -fverbose-asm */
BOOL_BITFIELD cl_report : 1;
/* Offset of field for this option in struct gcc_options, or