]> git.ipfire.org Git - thirdparty/kmod.git/commitdiff
build: add builtin overflow checks to configure.ac
authorTobias Stoeckmann <tobias@stoeckmann.org>
Wed, 16 Oct 2024 09:14:40 +0000 (11:14 +0200)
committerLucas De Marchi <lucas.de.marchi@gmail.com>
Thu, 17 Oct 2024 13:25:25 +0000 (08:25 -0500)
Without these, the build becomes quite noisy and doesn't add builtin
functions even though they exist.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
Link: https://github.com/kmod-project/kmod/pull/183
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
configure.ac

index c204570d942cdf5d7b7d4544d9b2e9d59bf5bb4c..a8d1a8a692dc90943f09613d181d0e8ca86be6f8 100644 (file)
@@ -44,8 +44,12 @@ AC_CHECK_FUNCS_ONCE([secure_getenv])
 
 CC_CHECK_FUNC_BUILTIN([__builtin_clz])
 CC_CHECK_FUNC_BUILTIN([__builtin_types_compatible_p])
+CC_CHECK_FUNC_BUILTIN([__builtin_uadd_overflow], [ ], [ ])
 CC_CHECK_FUNC_BUILTIN([__builtin_uaddl_overflow], [ ], [ ])
 CC_CHECK_FUNC_BUILTIN([__builtin_uaddll_overflow], [ ], [ ])
+CC_CHECK_FUNC_BUILTIN([__builtin_umul_overflow], [ ], [ ])
+CC_CHECK_FUNC_BUILTIN([__builtin_umull_overflow], [ ], [ ])
+CC_CHECK_FUNC_BUILTIN([__builtin_umulll_overflow], [ ], [ ])
 
 # dietlibc doesn't have st.st_mtim struct member
 AC_CHECK_MEMBERS([struct stat.st_mtim], [], [], [#include <sys/stat.h>])