Changeset: 45690b515478 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/45690b515478
Modified Files:
gdk/gdk_calc_private.h
Branch: Dec2025
Log Message:
Work around clang bug on Ubuntu 24.04 LTS.
The problem manifests itself when using __builtin_mul_overflow which
causes an undefined reference to __muloti4.
diffs (23 lines):
diff --git a/gdk/gdk_calc_private.h b/gdk/gdk_calc_private.h
--- a/gdk/gdk_calc_private.h
+++ b/gdk/gdk_calc_private.h
@@ -31,6 +31,11 @@
#define GT(a, b) ((bit) ((a) > (b)))
+#if !defined(__clang__) || __clang_major__ >= 21
+/* compiling with clang on Ubuntu 24.04 fails when using
+ * __builtin_mul_overflow, so we avoid using it when using the version
+ * of clang that is installed on said system (clang on Ubuntu 26.04 does
+ * work) */
#ifdef __has_builtin
#if __has_builtin(__builtin_add_overflow)
#define OP_WITH_CHECK(lft, rgt, TYPE3, dst, op, max, on_overflow) \
@@ -44,6 +49,7 @@
} while (0)
#endif
#endif
+#endif
/* dst = lft + rgt with overflow check */
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]