1 diff -Naurp gcc/config/avr/avr.c gcc/config/avr/avr.c
2 --- gcc/config/avr/avr.c 2011-02-11 14:56:08.000000000 -0600
3 +++ gcc/config/avr/avr.c 2011-02-11 14:54:05.000000000 -0600
4 @@ -211,6 +211,8 @@ static const struct attribute_spec avr_a
5 #undef TARGET_EXPAND_BUILTIN
6 #define TARGET_EXPAND_BUILTIN avr_expand_builtin
9 +#define TARGET_HELP avr_target_help
11 /* Implement TARGET_SCALAR_MODE_SUPPORTED_P. */
13 @@ -232,7 +234,24 @@ static const struct attribute_spec avr_a
14 return default_fixed_point_supported_p ();
18 +/* Implement TARGET_HELP. */
20 +avr_target_help (void)
22 + if (avr_list_supported_parts)
24 + const struct mcu_type_s *list_part;
25 + fprintf (stdout, "List of parts supported by avr-gcc:\n");
26 + for (list_part = &avr_mcu_types[0]; (list_part + 1)->name; list_part++)
28 + if (!list_part->macro)
30 + fprintf (stdout, "%-20s%s\n", list_part->name, list_part->macro);
32 + fprintf (stdout, "\n");
36 struct gcc_target targetm = TARGET_INITIALIZER;
39 diff -Naurp gcc/config/avr/avr.opt gcc/config/avr/avr.opt
40 --- gcc/config/avr/avr.opt 2009-10-08 13:28:48.000000000 -0500
41 +++ gcc/config/avr/avr.opt 2011-02-11 14:53:20.000000000 -0600
42 @@ -58,3 +58,7 @@ Relax branches
45 Make the linker relaxation machine assume that a program counter wrap-around occures.
48 +Target RejectNegative Var(avr_list_supported_parts)
49 +Print the list of parts supported while printing --target-help