ports/devel/avr-gcc/files/patch-306-gcc-4.5.1-option-list-devices
Joerg Wunsch 0c19ecdca8 Upgrade to GCC 4.5.1.
Completely reorganize the patches for this port.

Patches for new devices are now synchronized with the Atmel AVR tools.
The main difference is the naming scheme, as FreeBSD patches start
with "patch-", while the Atmel AVR Tools patches end up in ".patch".
2011-12-17 09:56:31 +00:00

49 lines
1.6 KiB
Text
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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