diff options
author | Viktor Kutuzov <vkutuzov@accesssoftek.com> | 2014-07-08 08:52:57 +0000 |
---|---|---|
committer | Viktor Kutuzov <vkutuzov@accesssoftek.com> | 2014-07-08 08:52:57 +0000 |
commit | d878d675eef7175792187cbdcf37db16d6820324 (patch) | |
tree | e69deea206fc537b741f8f6776310b390afdf6b7 | |
parent | 212a8a19c7ef1d70cebdb23feb00dedf03dfe264 (diff) |
Support building floating-point facilities on FreeBSD 9.2 in 32-bit mode
Differential Revision: http://reviews.llvm.org/D3909
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@212518 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/builtins/fp_lib.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/builtins/fp_lib.h b/lib/builtins/fp_lib.h index 7b905181c..faebb99ec 100644 --- a/lib/builtins/fp_lib.h +++ b/lib/builtins/fp_lib.h @@ -26,6 +26,18 @@ #include <limits.h> #include "int_lib.h" +// x86_64 FreeBSD prior v9.3 define fixed-width types incorrectly in +// 32-bit mode. +#if defined(__FreeBSD__) && defined(__i386__) +# include <sys/param.h> +# if __FreeBSD_version < 903000 // v9.3 +# define uint64_t unsigned long long +# define int64_t long long +# undef UINT64_C +# define UINT64_C(c) (c ## ULL) +# endif +#endif + #if defined SINGLE_PRECISION typedef uint32_t rep_t; |