Skip to contentSkip to conversation

configure: Don't use __int128_t for clang versions before 3.2

PATCH Applied Stefan Weil 2 participants 2 messages Mar 7, 2014 – Mar 14, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 configure: Don't use __int128_t for clang versions before 3.2

Those versions don't fully support __int128_t.

---

See http://stackoverflow.com/questions/16447808/bug-with-int128-t-in-clang
for more details. Debian wheezy uses clang 3.0 and shows this bug.

I did not test whether the QEMU code will work nevertheless, but I think it's better to be on the safe side and disable __int128_t for old clang versions.

Regards
Stefan

 configure |    5 +++++
 1 file changed, 5 insertions(+)
configure +5 -0
index 1212d2d..761a1a4 100755
@@ -3820,6 +3820,11 @@ fi
 
 int128=no
 cat > $TMPC << EOF
+#if defined(__clang_major__) && defined(__clang_minor__)
+# if ((__clang_major__ < 3) || (__clang_major__ == 3) && (__clang_minor__ < 2))
+#  error __int128_t does not work in CLANG before 3.2
+# endif
+#endif
 __int128_t a;
 __uint128_t b;
 int main (void) {
Signature · 1 line
1.7.10.4
#1 lore raw
Quoted 4 lines · Stefan Weil

Those versions don't fully support __int128_t.

Quoted 8 lines

---

See http://stackoverflow.com/questions/16447808/bug-with-int128-t-in-clang
for more details. Debian wheezy uses clang 3.0 and shows this bug.

I did not test whether the QEMU code will work nevertheless, but I think it's better to be on the safe side and disable __int128_t for old clang versions.

Thanks, applied to -trivial.

/mjt