Gentoo Archives: gentoo-commits

From: Sergei Trofimovich <slyfox@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/gcc-patches:master commit in: 9.2.0/gentoo/
Date: Thu, 26 Sep 2019 22:07:01
Message-Id: 1569535542.f1aedb7402ea1a0dec4d02e85fe7a3889c41f249.slyfox@gentoo
1 commit: f1aedb7402ea1a0dec4d02e85fe7a3889c41f249
2 Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
3 AuthorDate: Thu Sep 26 22:05:42 2019 +0000
4 Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
5 CommitDate: Thu Sep 26 22:05:42 2019 +0000
6 URL: https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=f1aedb74
7
8 9.2.0: backport arm64 -march=native precedence handling, bug #695420
9
10 Reported-by: Aaron Bauman
11 Bug: https://bugs.gentoo.org/695420
12 Bug: https://gcc.gnu.org/PR69471#c13
13 Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>
14
15 9.2.0/gentoo/30_all_arm64-march-native.patch | 90 ++++++++++++++++++++++++++++
16 9.2.0/gentoo/README.history | 3 +
17 2 files changed, 93 insertions(+)
18
19 diff --git a/9.2.0/gentoo/30_all_arm64-march-native.patch b/9.2.0/gentoo/30_all_arm64-march-native.patch
20 new file mode 100644
21 index 0000000..0fb6f76
22 --- /dev/null
23 +++ b/9.2.0/gentoo/30_all_arm64-march-native.patch
24 @@ -0,0 +1,90 @@
25 +https://bugs.gentoo.org/695420
26 +https://gcc.gnu.org/PR69471#c13
27 +
28 +From 537fd9d4dcaed8dae6248ec22a50603a591a3752 Mon Sep 17 00:00:00 2001
29 +From: ktkachov <ktkachov@138bc75d-0d04-0410-961f-82ee72b054a4>
30 +Date: Thu, 26 Sep 2019 10:52:42 +0000
31 +Subject: [PATCH] driver: Also prune joined switches with negation
32 +
33 +When -march=native is passed to host_detect_local_cpu to the backend,
34 +it overrides all command lines after it. That means
35 +
36 +$ gcc -march=native -march=armv8-a
37 +
38 +is treated as
39 +
40 +$ gcc -march=armv8-a -march=native
41 +
42 +Prune joined switches with Negative and RejectNegative to allow
43 +-march=armv8-a to override previous -march=native on command-line.
44 +
45 +This is the same fix as was applied for i386 in SVN revision 269164 but for
46 +aarch64 and arm.
47 +
48 +2019-09-26 Matt Turner <mattst88@×××××.com>
49 +
50 + PR driver/69471
51 + * config/aarch64/aarch64.opt (march=): Add Negative(march=).
52 + (mtune=): Add Negative(mtune=).
53 + (mcpu=): Add Negative(mcpu=).
54 + * config/arm/arm.opt: Likewise.
55 +
56 +
57 +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@276148 138bc75d-0d04-0410-961f-82ee72b054a4
58 +---
59 + gcc/config/aarch64/aarch64.opt | 6 +++---
60 + gcc/config/arm/arm.opt | 6 +++---
61 +
62 +--- a/gcc/config/aarch64/aarch64.opt
63 ++++ b/gcc/config/aarch64/aarch64.opt
64 +@@ -119,15 +119,15 @@ EnumValue
65 + Enum(aarch64_tls_size) String(48) Value(48)
66 +
67 + march=
68 +-Target RejectNegative ToLower Joined Var(aarch64_arch_string)
69 ++Target RejectNegative Negative(march=) ToLower Joined Var(aarch64_arch_string)
70 + Use features of architecture ARCH.
71 +
72 + mcpu=
73 +-Target RejectNegative ToLower Joined Var(aarch64_cpu_string)
74 ++Target RejectNegative Negative(mcpu=) ToLower Joined Var(aarch64_cpu_string)
75 + Use features of and optimize for CPU.
76 +
77 + mtune=
78 +-Target RejectNegative ToLower Joined Var(aarch64_tune_string)
79 ++Target RejectNegative Negative(mtune=) ToLower Joined Var(aarch64_tune_string)
80 + Optimize for CPU.
81 +
82 + mabi=
83 +--- a/gcc/config/arm/arm.opt
84 ++++ b/gcc/config/arm/arm.opt
85 +@@ -82,7 +82,7 @@ mapcs-stack-check
86 + Target Report Mask(APCS_STACK) Undocumented
87 +
88 + march=
89 +-Target RejectNegative ToLower Joined Var(arm_arch_string)
90 ++Target RejectNegative Negative(march=) ToLower Joined Var(arm_arch_string)
91 + Specify the name of the target architecture.
92 +
93 + ; Other arm_arch values are loaded from arm-tables.opt
94 +@@ -107,7 +107,7 @@ Target Report Mask(CALLER_INTERWORKING)
95 + Thumb: Assume function pointers may go to non-Thumb aware code.
96 +
97 + mcpu=
98 +-Target RejectNegative ToLower Joined Var(arm_cpu_string)
99 ++Target RejectNegative Negative(mcpu=) ToLower Joined Var(arm_cpu_string)
100 + Specify the name of the target CPU.
101 +
102 + mfloat-abi=
103 +@@ -232,7 +232,7 @@ Target Report Mask(TPCS_LEAF_FRAME)
104 + Thumb: Generate (leaf) stack frames even if not needed.
105 +
106 + mtune=
107 +-Target RejectNegative ToLower Joined Var(arm_tune_string)
108 ++Target RejectNegative Negative(mtune=) ToLower Joined Var(arm_tune_string)
109 + Tune code for the given processor.
110 +
111 + mprint-tune-info
112 +--
113 +2.23.0
114 +
115
116 diff --git a/9.2.0/gentoo/README.history b/9.2.0/gentoo/README.history
117 index a2cbd76..cbeef2d 100644
118 --- a/9.2.0/gentoo/README.history
119 +++ b/9.2.0/gentoo/README.history
120 @@ -1,3 +1,6 @@
121 +3 TODO
122 + + 30_all_arm64-march-native.patch
123 +
124 2 22 Sep 2019
125 + 27_all_sparc-PIC-constant-PR91472.patch
126 + 28_all_sparc-fpu-subregs-91269.patch