On Fri, 14 Dec 2018, Paul Burton wrote: > > We provides a config-time option for gcc. So whether > > fix-loongson3-llsc option will be default, > > is not sure. It depends on distributions. > > OK but even if it's default on, will that only apply when we provide > -march=loongson3a? Surely it makes no sense to default on for other > CPUs. GCC defaults chosen at the configuration time apply regardless of any `-march=' command-line option used with a given compilation (of course unless the architecture selected actually precludes the use of the affected instructions or code sequences), and I think it does make sense, as this way you can have a compiler that defaults to some generic architecture with all the workarounds enabled, which produces code safe to run anywhere. I could envisage an option like `-mfix-loongson3-llsc=from-arch' or a broader `-mfix=from-arch' one, and a corresponding set of GCC defaults to choose from at the configuration time, however generic support for that hasn't been implemented. You could file an enhancement request with GCC bugzilla to have a MIPS GCC port maintainer look into it I suppose. It should be moderately easy to implement I believe. IIRC not all `-mfix-foo' command-line options have a corresponding GCC configuration option, in which case they default to off. HTH, Maciej