Commit 8006635
committed
Pass -Wno-error to linker in case of LTO builds
When linking a release-built command line shell on Linux against
default glibc with LTO enabled, a long-open gcc bug causes spurious
warning to be emitted around a call to fread. The `-Werror` flag
turns this into an error and the build process fails.
Unfortunately, there is no way to selectively disable the warning
with pragmas or `-Wno-error=xxx` flags.
Thus, this patch introduces some helper macros and lists all
warnings explicitly with `-Werror=xxx` instead of covering all
warnings with the `-Werror` flag. This way, warnings enabled by
command line flags do cause errors, but those raised by warning
attributes (which cannot be suppressed by any `-Wno-error=xxx`
flags) don't.
JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu1 parent 140982e commit 8006635
1 file changed
+23
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
240 | 240 | | |
241 | 241 | | |
242 | 242 | | |
243 | | - | |
244 | | - | |
245 | | - | |
246 | | - | |
247 | | - | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
248 | 264 | | |
249 | | - | |
| 265 | + | |
250 | 266 | | |
251 | | - | |
| 267 | + | |
252 | 268 | | |
253 | 269 | | |
254 | 270 | | |
| |||
0 commit comments