https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83193
Martin Liška <marxin at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jgreenhalgh at gcc dot gnu.org, | |kyrylo.tkachov at arm dot com, | |marcus.shawcroft at arm dot com, | |ramana.radhakrishnan at arm dot co | |m, richard.earnshaw at arm dot com --- Comment #6 from Martin Liška <marxin at gcc dot gnu.org> --- So thank you Andrew for spotting quite many issue. Let me make a summary which we can then fix: 1) x86_64 1a) missing 'native' as a possible value - I'll prepare patch for that - hope it can be accepted in GCC 8 1b) Missing list of possible values in --help=target: that's caused by fact that possible values are not an option enum and it's defined in i386.c. Can be done in GCC 9. 2) ARM 2a) missing 'native' as a possible value - I'll prepare patch for that - hope it can be accepted in GCC 8 2b) error info is displayed twice: Breakpoint 1, inform (location=0, gmsgid=0x4f3893 "valid arguments are: %s") at ../../gcc/diagnostic.c:1158 1158 va_start (ap, gmsgid); (gdb) bt #0 inform (location=0, gmsgid=0x4f3893 "valid arguments are: %s") at ../../gcc/diagnostic.c:1158 #1 0x0000000000419b9c in arm_print_hint_for_arch_option (target=0x7a75c0 "sparta", list=0x4f2780 <all_architectures+7776>) at ../../gcc/common/config/arm/arm-common.c:362 #2 0x0000000000419c90 in arm_parse_arch_option_name (list=0x4f0920 <all_architectures>, optname=0x4df5a8 "-march", target=0x7a75c0 "sparta") at ../../gcc/common/config/arm/arm-common.c:387 #3 0x00000000004198bb in arm_target_thumb_only (argc=0, argv=0x7accd8) at ../../gcc/common/config/arm/arm-common.c:282 #4 0x000000000040dd45 in eval_spec_function (func=0x7acb30 "target_mode_check", args=0x7acc90 "%{march=*:arch %*;mcpu=*:cpu %*;:}") at ../../gcc/gcc.c:6080 #5 0x000000000040dfd8 in handle_spec_function (p=0x7acc87 "", retval_nonnull=0x0) at ../../gcc/gcc.c:6157 #6 0x000000000040d5b0 in do_spec_1 (spec=0x7acc50 "%:target_mode_check(%{march=*:arch %*;mcpu=*:cpu %*;:})", inswitch=0, soft_matched_part=0x0) at ../../gcc/gcc.c:5862 #7 0x000000000040ec94 in process_brace_body (p=0x7acc41 "}", atom=0x7acc03 "mthumb:%:target_mode_check(%{march=*:arch %*;mcpu=*:cpu %*;:})}", end_atom=0x7acc09 ":%:target_mode_check(%{march=*:arch %*;mcpu=*:cpu %*;:})}", starred=0, matched=1) at ../../gcc/gcc.c:6525 #8 0x000000000040ea9b in handle_braces (p=0x7acc09 ":%:target_mode_check(%{march=*:arch %*;mcpu=*:cpu %*;:})}") at ../../gcc/gcc.c:6432 #9 0x000000000040d586 in do_spec_1 (spec=0x7acc00 "%{!mthumb:%:target_mode_check(%{march=*:arch %*;mcpu=*:cpu %*;:})}", inswitch=0, soft_matched_part=0x0) at ../../gcc/gcc.c:5856 #10 0x000000000040ec94 in process_brace_body (p=0x4daa5b "}", atom=0x4daa14 "marm:%{!mthumb:%:target_mode_check(%{march=*:arch %*;mcpu=*:cpu %*;:})}}", end_atom=0x4daa18 ":%{!mthumb:%:target_mode_check(%{march=*:arch %*;mcpu=*:cpu %*;:})}}", starred=0, matched=1) at ../../gcc/gcc.c:6525 #11 0x000000000040ea9b in handle_braces (p=0x4daa18 ":%{!mthumb:%:target_mode_check(%{march=*:arch %*;mcpu=*:cpu %*;:})}}") at ../../gcc/gcc.c:6432 #12 0x000000000040d586 in do_spec_1 (spec=0x4daa10 " %{!marm:%{!mthumb:%:target_mode_check(%{march=*:arch %*;mcpu=*:cpu %*;:})}}", inswitch=0, soft_matched_part=0x0) at ../../gcc/gcc.c:5856 #13 0x000000000040a9c5 in do_spec_2 (spec=0x4daa10 " %{!marm:%{!mthumb:%:target_mode_check(%{march=*:arch %*;mcpu=*:cpu %*;:})}}") at ../../gcc/gcc.c:4894 #14 0x000000000040abc8 in do_self_spec (spec=0x4daa10 " %{!marm:%{!mthumb:%:target_mode_check(%{march=*:arch %*;mcpu=*:cpu %*;:})}}") at ../../gcc/gcc.c:4959 #15 0x0000000000411a2c in driver::set_up_specs (this=0x7fffffffdaf0) at ../../gcc/gcc.c:7533 #16 0x00000000004109a7 in driver::main (this=0x7fffffffdaf0, argc=4, argv=0x7fffffffdc08) at ../../gcc/gcc.c:7297 #17 0x0000000000418e38 in main (argc=4, argv=0x7fffffffdc08) at ../../gcc/gcc-main.c:46 and Breakpoint 1, inform (location=0, gmsgid=0x4f3893 "valid arguments are: %s") at ../../gcc/diagnostic.c:1158 1158 va_start (ap, gmsgid); (gdb) bt #0 inform (location=0, gmsgid=0x4f3893 "valid arguments are: %s") at ../../gcc/diagnostic.c:1158 #1 0x0000000000419b9c in arm_print_hint_for_arch_option (target=0x7a7600 "sparta", list=0x4f2780 <all_architectures+7776>) at ../../gcc/common/config/arm/arm-common.c:362 #2 0x0000000000419c90 in arm_parse_arch_option_name (list=0x4f0920 <all_architectures>, optname=0x4df5a8 "-march", target=0x7a7600 "sparta") at ../../gcc/common/config/arm/arm-common.c:387 #3 0x000000000041a38b in arm_canon_arch_option (argc=0, argv=0x7accd8) at ../../gcc/common/config/arm/arm-common.c:620 #4 0x000000000040dd45 in eval_spec_function (func=0x7acb30 "canon_arch", args=0x7a39c0 "%{mcpu=*: cpu %*}", ' ' <repeats 22 times>, "%{march=*: arch %*}", ' ' <repeats 22 times>, "%{mfpu=*: fpu %*}", ' ' <repeats 22 times>, "%{mfloat-abi=*: abi %*}", ' ' <repeats 21 times>, "%<march=*") at ../../gcc/gcc.c:6080 #5 0x000000000040dfd8 in handle_spec_function (p=0x4dab22 " ", retval_nonnull=0x0) at ../../gcc/gcc.c:6157 #6 0x000000000040d5b0 in do_spec_1 ( spec=0x4daa60 " -march=%:canon_arch(%{mcpu=*: cpu %*}", ' ' <repeats 22 times>, "%{march=*: arch %*}", ' ' <repeats 22 times>, "%{mfpu=*: fpu %*}", ' ' <repeats 22 times>, "%{mfloat-abi=*: abi %*}", ' ' <repeats 21 times>, "%<march=*) ", inswitch=0, soft_matched_part=0x0) at ../../gcc/gcc.c:5862 #7 0x000000000040a9c5 in do_spec_2 ( spec=0x4daa60 " -march=%:canon_arch(%{mcpu=*: cpu %*}", ' ' <repeats 22 times>, "%{march=*: arch %*}", ' ' <repeats 22 times>, "%{mfpu=*: fpu %*}", ' ' <repeats 22 times>, "%{mfloat-abi=*: abi %*}", ' ' <repeats 21 times>, "%<march=*) ") at ../../gcc/gcc.c:4894 #8 0x000000000040abc8 in do_self_spec ( spec=0x4daa60 " -march=%:canon_arch(%{mcpu=*: cpu %*}", ' ' <repeats 22 times>, "%{march=*: arch %*}", ' ' <repeats 22 times>, "%{mfpu=*: fpu %*}", ' ' <repeats 22 times>, "%{mfloat-abi=*: abi %*}", ' ' <repeats 21 times>, "%<march=*) ") at ../../gcc/gcc.c:4959 #9 0x0000000000411a2c in driver::set_up_specs (this=0x7fffffffdaf0) at ../../gcc/gcc.c:7533 #10 0x00000000004109a7 in driver::main (this=0x7fffffffdaf0, argc=4, argv=0x7fffffffdc08) at ../../gcc/gcc.c:7297 #11 0x0000000000418e38 in main (argc=4, argv=0x7fffffffdc08) at ../../gcc/gcc-main.c:46 First time it's called for thumb only, note this is regression from GCC 7. We should fix it in GCC 8. Can please any arm maintainer take a look? 2c) Missing list of possible values in --help=target: here we have the proper enum Enum(processor_type), but it's not used directly by -march and -mtune options. Thus we need to force print. I have patch for that. It's GCC 9 material. 3) aarch64 3a) missing 'native' as a possible value - I'll prepare patch for that - hope it can be accepted in GCC 8 3b) Missing list of possible values in --help=target: Similar to i386, there's not enum defined. There are constants defined in *.def file. 3c) Default values are not seen with --help=target -Q. I've got patch for that, let me send it for GCC 8. 3d) Empty hint for -march, fixed in r257844 3e) There's no hint provided for extension hint, I have patch for that. It's GCC 9 material I guess.