On Thu, Feb 07, 2019 at 04:43:24AM -0600, Tamar Christina wrote: > Hi All, > > Since this hasn't been reviewed yet anyway I've updated this patch to also > fix the memory leaks etc. > > -- > > This patch makes the feature detection code for AArch64 GCC not add features > automatically when the feature had no hwcaps string to match against. > > This means that -mcpu=native no longer adds feature flags such as +profile. > The behavior wasn't noticed before because at the time +profile was added a > bug > was preventing any feature bits from being added by native detections. > > The loop has also been changed as Jakub specified in order to avoid a memory > leak that was present in the existing code and to be slightly more efficient. > > Bootstrapped Regtested on aarch64-none-linux-gnu and no issues. > > Ok for trunk?
OK. Is this also desirable for a backport? Thanks, James > > Thanks, > Tamar > > gcc/ChangeLog: > > 2019-02-07 Tamar Christina <tamar.christ...@arm.com> > > PR target/88530 > * config/aarch64/aarch64-option-extensions.def: Document it. > * config/aarch64/driver-aarch64.c (host_detect_local_cpu): Skip feature > if empty hwcaps. > > gcc/testsuite/ChangeLog: > > 2019-02-07 Tamar Christina <tamar.christ...@arm.com> > > PR target/88530 > * gcc.target/aarch64/options_set_10.c: New test. >