HAOUAS Elyes has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/45821 )
Change subject: lib/ubsan.c: Drop GCC 5.x compatibility ......................................................................
lib/ubsan.c: Drop GCC 5.x compatibility
Currently, coorboot uses GCC-8.
Change-Id: I7387bdb4526cbe2832db9671f0a0df788a65b8c3 Signed-off-by: Elyes HAOUAS ehaouas@noos.fr --- M src/lib/ubsan.c 1 file changed, 3 insertions(+), 8 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/21/45821/1
diff --git a/src/lib/ubsan.c b/src/lib/ubsan.c index 6873f7e..8c1a5e2 100644 --- a/src/lib/ubsan.c +++ b/src/lib/ubsan.c @@ -245,13 +245,8 @@ ABORT_VARIANT_VP_VP(vla_bound_not_positive);
struct ubsan_float_cast_overflow_data { -/* -* TODO: Remove this GCC 5.x compatibility after switching to GCC 6.x. The -* GCC developers accidentally forgot the source location. Their -* libubsan probes to see if it looks like a path, but we don't need -* to maintain compatibility with multiple gcc releases. See below. -*/ -#if !(defined(__GNUC__) && __GNUC__ < 6) + +#if !defined(__GNUC__) struct ubsan_source_location location; #endif struct ubsan_type_descriptor *from_type; @@ -264,7 +259,7 @@ (struct ubsan_float_cast_overflow_data *)data_raw; ubsan_value_handle_t from = (ubsan_value_handle_t)from_raw; (void) from; -#if !(defined(__GNUC__) && __GNUC__ < 6) +#if !defined(__GNUC__) ubsan_abort(&data->location, "float cast overflow"); #else ubsan_abort(((void) data, &unknown_location), "float cast overflow");
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/45821 )
Change subject: lib/ubsan.c: Drop GCC 5.x compatibility ......................................................................
Patch Set 1: Code-Review-1
(1 comment)
https://review.coreboot.org/c/coreboot/+/45821/1/src/lib/ubsan.c File src/lib/ubsan.c:
https://review.coreboot.org/c/coreboot/+/45821/1/src/lib/ubsan.c@249 PS1, Line 249: #if !defined(__GNUC__) By removing the check for the GCC version, the old workaround is now applied to all GCC versions. See CB:45822 for what should be done instead.
HAOUAS Elyes has abandoned this change. ( https://review.coreboot.org/c/coreboot/+/45821 )
Change subject: lib/ubsan.c: Drop GCC 5.x compatibility ......................................................................
Abandoned
see 45822