driver: Also prune joined switches with negation
authorMatt Turner <mattst88@gmail.com>
Thu, 26 Sep 2019 10:52:42 +0000 (10:52 +0000)
committerKyrylo Tkachov <ktkachov@gcc.gnu.org>
Thu, 26 Sep 2019 10:52:42 +0000 (10:52 +0000)
commit6fdbe41963a7aecad80f27e9805c7e18cbd4ab48
treef1555196e11cd3694bc1f495ac51ceb461758f69
parent2b5b5e24149160e38ff3cd98c6a911f0eba4acc5
driver: Also prune joined switches with negation

When -march=native is passed to host_detect_local_cpu to the backend,
it overrides all command lines after it.  That means

$ gcc -march=native -march=armv8-a

is treated as

$ gcc -march=armv8-a -march=native

Prune joined switches with Negative and RejectNegative to allow
-march=armv8-a to override previous -march=native on command-line.

This is the same fix as was applied for i386 in SVN revision 269164 but for
aarch64 and arm.

2019-09-26  Matt Turner  <mattst88@gmail.com>

PR driver/69471
* config/aarch64/aarch64.opt (march=): Add Negative(march=).
(mtune=): Add Negative(mtune=).
(mcpu=): Add Negative(mcpu=).
* config/arm/arm.opt: Likewise.

From-SVN: r276148
gcc/ChangeLog
gcc/config/aarch64/aarch64.opt
gcc/config/arm/arm.opt