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