]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
build: Update to reflect minimum clang version 8.0
authorDarren Kenny <darren.kenny@oracle.com>
Fri, 21 Oct 2022 13:33:01 +0000 (13:33 +0000)
committerDaniel Kiper <daniel.kiper@oracle.com>
Thu, 27 Oct 2022 14:29:46 +0000 (16:29 +0200)
After doing some validation with clang from versions 3.8 and up, the
builds prior to version 8.0.0 fail due to the use of safemath functions
at link time.

Signed-off-by: Darren Kenny <darren.kenny@oracle.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
INSTALL
include/grub/safemath.h

diff --git a/INSTALL b/INSTALL
index 7bca64f69881e1a682d81b5c69d4ac6f0b835580..620dcceb4814b1b20763168ab6232b7f3795d481 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -16,7 +16,7 @@ you don't have any of them, please obtain and install them before
 configuring the GRUB.
 
 * GCC 5.1.0 or later
-  Experimental support for clang 3.8.0 or later (results in much bigger binaries)
+  Experimental support for clang 8.0.0 or later (results in much bigger binaries)
   for i386, x86_64, arm (including thumb), arm64, mips(el), powerpc, sparc64
 * GNU Make
 * GNU Bison 2.3 or later
index c17b89bba17b53bf7f3d55375e4590a679d25523..51290d3551c39d4d274079c88c0aeb4f6ed46e6b 100644 (file)
 
 #include <grub/compiler.h>
 
-/* These appear in gcc 5.1 and clang 3.8. */
-#if GNUC_PREREQ(5, 1) || CLANG_PREREQ(3, 8)
+/* These appear in gcc 5.1 and clang 8.0. */
+#if GNUC_PREREQ(5, 1) || CLANG_PREREQ(8, 0)
 
 #define grub_add(a, b, res)    __builtin_add_overflow(a, b, res)
 #define grub_sub(a, b, res)    __builtin_sub_overflow(a, b, res)
 #define grub_mul(a, b, res)    __builtin_mul_overflow(a, b, res)
 
 #else
-#error gcc 5.1 or newer or clang 3.8 or newer is required
+#error gcc 5.1 or newer or clang 8.0 or newer is required
 #endif
 
 #endif /* GRUB_SAFEMATH_H */