-
[arm] Don't strip off all architecture features from -march passed to assembler · 24531cd6
When GCC invokes the assembler it generates a sanitized version of the user-specified -march option to pass through, since the assembler does not understand all the new FPU-related architectural options. Unfortunately it goes too far and strips off all the architectural extensions, including some that are unrelated to the -mfpu variant selected. Again, this doesn't really matter when compiling C code because the compiler will override the command-line specified architecture with directives in the assembly file itself, but when using the compiler driver to invoke the assembler the only indiciation of the desired architecture might come from the command line. We fix this by adjusting the canonicalization pass to remove any option that only specifies features that can be expressed by -mfpu (any that go beyond that are already supported by the assembler). We do have to take care to re-order the options, though as the assembler expects feature options to be in a canonical order (unlike the compiler, where ordering is handled left-to-right: there's only a difference if there are negation options, but a canonicalized architecture string shouldn't have any of those). We do this by recording which options we need and then sorting the final list alphabetically. * common/config/arm/arm-common.c: Include <algorithm>. (INCLUDE_VECTOR): Define. (compare_opt_names): New function. (arm_rewrite_selected_arch): Only strip out extensions that can be expressed through -mfpu. Sort the remaining extensions alphabetically. From-SVN: r255503
Richard Earnshaw committed
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
config | Loading commit data... | |
common-target-def.h | Loading commit data... | |
common-target.def | Loading commit data... | |
common-target.h | Loading commit data... | |
common-targhooks.c | Loading commit data... | |
common-targhooks.h | Loading commit data... |