[coreboot-gerrit] New patch to review for coreboot: crossgcc: replace __builtin_trap in UB handling with _exit
Patrick Georgi (pgeorgi@google.com)
gerrit at coreboot.org
Thu Apr 14 19:18:09 CEST 2016
Patrick Georgi (pgeorgi at google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/14364
-gerrit
commit e36acefae15a56e5a6b60e151b62f33bf985a491
Author: Patrick Georgi <pgeorgi at chromium.org>
Date: Thu Apr 14 19:04:57 2016 +0200
crossgcc: replace __builtin_trap in UB handling with _exit
We don't define _exit, so instead of silent code corruption, we get a
neat, tidy linker error (incl. a reasonable guess where the issue comes
from).
This results in compile time errors like:
coreboot-builds/ASUS_F2A85_M/make.log:src/vendorcode/amd/agesa/f15tn/Proc/GNB/Modules/GnbGfxInitLibV1/GfxPowerPlayTable.c:543: undefined reference to `_exit'
[TODO(pg): use a more descriptive non-existent symbol instead of _exit]
Change-Id: Ib996e15045b8d2120a5825240bfb5dcfa3f89449
Signed-off-by: Patrick Georgi <pgeorgi at chromium.org>
---
util/crossgcc/patches/gcc-5.2.0_hard_ub_trap.patch | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/util/crossgcc/patches/gcc-5.2.0_hard_ub_trap.patch b/util/crossgcc/patches/gcc-5.2.0_hard_ub_trap.patch
new file mode 100644
index 0000000..6e68669
--- /dev/null
+++ b/util/crossgcc/patches/gcc-5.2.0_hard_ub_trap.patch
@@ -0,0 +1,11 @@
+--- gcc-5.2.0/gcc/gimple-ssa-isolate-paths.c.orig 2016-04-14 17:12:33.901406416 +0200
++++ gcc-5.2.0/gcc/gimple-ssa-isolate-paths.c 2016-04-14 17:12:44.925406205 +0200
+@@ -115,7 +115,7 @@
+ }
+
+ gcall *new_stmt
+- = gimple_build_call (builtin_decl_explicit (BUILT_IN_TRAP), 0);
++ = gimple_build_call (builtin_decl_explicit (BUILT_IN__EXIT), 0);
+ gimple_seq seq = NULL;
+ gimple_seq_add_stmt (&seq, new_stmt);
+
More information about the coreboot-gerrit
mailing list