Commit d3faf36
authored
[SYCL][CMAKE] Fix _FORTIFY_SOURCE=3 (#19268)
The problem here is that the macro is actually handled by glibc and
value `3` isn't supported with older compiler/glibc combinations,
causing warnings about the macro redefinition.
We still have to support older compilers/glibc and therefore two changes
were made:
- UR skips setting their own `_FORTIFY_SOURCE` in favor of a global one
if it is built as part of LLVM (i.e. not standalone)
- Before setting `_FORTIFY_SOURCE` globally we check the compiler and
fallback to value `2` for older gcc1 parent 19d83d5 commit d3faf36
File tree
2 files changed
+30
-9
lines changed- llvm/cmake/modules
- unified-runtime/cmake
2 files changed
+30
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
164 | 164 | | |
165 | 165 | | |
166 | 166 | | |
167 | | - | |
168 | | - | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
169 | 182 | | |
170 | | - | |
171 | | - | |
| 183 | + | |
| 184 | + | |
172 | 185 | | |
173 | 186 | | |
174 | 187 | | |
175 | | - | |
| 188 | + | |
176 | 189 | | |
177 | | - | |
178 | | - | |
| 190 | + | |
| 191 | + | |
179 | 192 | | |
180 | 193 | | |
181 | | - | |
| 194 | + | |
182 | 195 | | |
183 | 196 | | |
| 197 | + | |
184 | 198 | | |
| 199 | + | |
185 | 200 | | |
186 | 201 | | |
187 | 202 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
91 | | - | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
92 | 98 | | |
93 | 99 | | |
94 | 100 | | |
| |||
0 commit comments