From 4f27ed600f307027c7597767f08f37ed9dffe6a7 Mon Sep 17 00:00:00 2001 From: rdb Date: Mon, 9 Feb 2015 22:15:41 +0100 Subject: [PATCH] Attempt to work around glibc bug when using clang with -ffast-math --- dtool/src/dtoolbase/dtoolbase.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/dtool/src/dtoolbase/dtoolbase.h b/dtool/src/dtoolbase/dtoolbase.h index 81829bb3e0..7a4fb2445b 100644 --- a/dtool/src/dtoolbase/dtoolbase.h +++ b/dtool/src/dtoolbase/dtoolbase.h @@ -103,6 +103,15 @@ #endif #endif +// This is a workaround for a glibc bug that is triggered by +// clang when compiling with -ffast-math. +#ifdef __clang__ +#include +#ifndef __extern_always_inline +#define __extern_always_inline extern __always_inline +#endif +#endif + #ifdef HAVE_PYTHON #undef _POSIX_C_SOURCE #undef _XOPEN_SOURCE