]> git.pld-linux.org Git - packages/crossavr-gcc.git/blame - 302-gcc-mlist-devices.patch
- cleanup, updated BRs, stub texinfo build (not packaged and would require patch...
[packages/crossavr-gcc.git] / 302-gcc-mlist-devices.patch
CommitLineData
64c2fd3a
JR
1diff --git gcc/common/config/avr/avr-common.c gcc/common/config/avr/avr-common.c
2index 0ede117..b2b8359 100644
3--- gcc/common/config/avr/avr-common.c
4+++ gcc/common/config/avr/avr-common.c
5@@ -32,10 +32,39 @@ static const struct default_options avr_option_optimization_table[] =
6 { OPT_LEVELS_NONE, 0, NULL, 0 }
7 };
8
9+static bool
10+avr_handle_target_option (struct gcc_options *opts,
11+ struct gcc_options *opts_set, const struct cl_decoded_option *decoded,
12+ location_t loc)
13+{
14+ if (avr_list_supported_parts)
15+ {
16+ const struct mcu_type_s *list_part;
17+
18+ fprintf (stdout, "List of parts supported by avr-gcc:\n");
19+
20+ for (list_part = &avr_mcu_types[0]; list_part->name; list_part++)
21+ {
22+ if (!list_part->macro)
23+ list_part++;
24+ fprintf (stdout, "%-20s%s\n", list_part->name, list_part->macro);
25+ }
26+
27+ fprintf (stdout, "\n");
28+
29+ }
30+
31+ return true;
32+}
33+
34+
35 #undef TARGET_OPTION_OPTIMIZATION_TABLE
36 #define TARGET_OPTION_OPTIMIZATION_TABLE avr_option_optimization_table
37
38 #undef TARGET_EXCEPT_UNWIND_INFO
39 #define TARGET_EXCEPT_UNWIND_INFO sjlj_except_unwind_info
40
41+#undef TARGET_HANDLE_OPTION
42+#define TARGET_HANDLE_OPTION avr_handle_target_option
43+
44 struct gcc_targetm_common targetm_common = TARGETM_COMMON_INITIALIZER;
45diff --git gcc/config/avr/avr.opt gcc/config/avr/avr.opt
46index 0ad38c6..3649c5b 100644
47--- gcc/config/avr/avr.opt
48+++ gcc/config/avr/avr.opt
49@@ -66,6 +66,10 @@ mpmem-wrap-around
50 Target Report
51 Make the linker relaxation machine assume that a program counter wrap-around occurs.
52
53+mlist-devices
54+Target RejectNegative Var(avr_list_supported_parts)
55+Print the list of parts supported while printing --target-help
56+
57 maccumulate-args
58 Target Report Mask(ACCUMULATE_OUTGOING_ARGS)
59 Accumulate outgoing function arguments and acquire/release the needed stack space for outpoing function arguments in function prologue/epilogue. Without this option, outgoing arguments are pushed before calling a function and popped afterwards. This option can lead to reduced code size for functions that call many functions that get their arguments on the stack like, for example printf.
This page took 0.09415 seconds and 4 git commands to generate.