From: Richard Weinberger <richard@nod.at>
To: u-boot@lists.denx.de
Cc: sjg@chromium.org, Jixiong.Hu@mediatek.com,
marek.vasut+renesas@mailbox.org, patrick.delaunay@foss.st.com,
ilias.apalodimas@linaro.org, xypron.glpk@gmx.de,
seanga2@gmail.com, trini@konsulko.com,
upstream+uboot@sigma-star.at, Richard Weinberger <richard@nod.at>
Subject: [PATCH v2 2/3] compiler: Ensure __builtin_*_overflow() support
Date: Fri, 9 Aug 2024 11:54:29 +0200 [thread overview]
Message-ID: <20240809095430.3656-2-richard@nod.at> (raw)
In-Reply-To: <20240809095430.3656-1-richard@nod.at>
Both gcc and clang support this for a long time.
Make sure the feature is present.
Signed-off-by: Richard Weinberger <richard@nod.at>
---
include/linux/compiler_types.h | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/include/linux/compiler_types.h b/include/linux/compiler_types.h
index 1a3060117f..8b6ce9c11c 100644
--- a/include/linux/compiler_types.h
+++ b/include/linux/compiler_types.h
@@ -70,6 +70,13 @@ extern void __chk_io_ptr(const volatile void __iomem *);
#error "Unknown compiler"
#endif
+/*
+ * At least gcc 5.1 or clang 8 are needed.
+ */
+#ifndef COMPILER_HAS_GENERIC_BUILTIN_OVERFLOW
+#error Unsupported compiler
+#endif
+
/*
* Some architectures need to provide custom definitions of macros provided
* by linux/compiler-*.h, and can do so using asm/compiler.h. We include that
--
2.35.3
next prev parent reply other threads:[~2024-08-09 9:55 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-09 9:54 [PATCH v2 1/3] ext4: Fix integer overflow in ext4fs_read_symlink() Richard Weinberger
2024-08-09 9:54 ` Richard Weinberger [this message]
2024-08-09 9:54 ` [PATCH v2 3/3] ext4: Fix zalloc() Richard Weinberger
2024-08-09 10:45 ` Heinrich Schuchardt
2024-08-26 10:28 ` Ilias Apalodimas
2024-08-09 16:13 ` [PATCH v2 1/3] ext4: Fix integer overflow in ext4fs_read_symlink() Heinrich Schuchardt
2024-08-09 16:29 ` Richard Weinberger
2024-08-09 22:02 ` Tom Rini
2024-08-16 3:47 ` Tom Rini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240809095430.3656-2-richard@nod.at \
--to=richard@nod.at \
--cc=Jixiong.Hu@mediatek.com \
--cc=ilias.apalodimas@linaro.org \
--cc=marek.vasut+renesas@mailbox.org \
--cc=patrick.delaunay@foss.st.com \
--cc=seanga2@gmail.com \
--cc=sjg@chromium.org \
--cc=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
--cc=upstream+uboot@sigma-star.at \
--cc=xypron.glpk@gmx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox