[compiler-rt] r212518 - Support building floating-point facilities on FreeBSD 9.2 in 32-bit mode
Viktor Kutuzov
vkutuzov at accesssoftek.com
Tue Jul 8 01:52:57 PDT 2014
Author: vkutuzov
Date: Tue Jul 8 03:52:57 2014
New Revision: 212518
URL: http://llvm.org/viewvc/llvm-project?rev=212518&view=rev
Log:
Support building floating-point facilities on FreeBSD 9.2 in 32-bit mode
Differential Revision: http://reviews.llvm.org/D3909
Modified:
compiler-rt/trunk/lib/builtins/fp_lib.h
Modified: compiler-rt/trunk/lib/builtins/fp_lib.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/builtins/fp_lib.h?rev=212518&r1=212517&r2=212518&view=diff
==============================================================================
--- compiler-rt/trunk/lib/builtins/fp_lib.h (original)
+++ compiler-rt/trunk/lib/builtins/fp_lib.h Tue Jul 8 03:52:57 2014
@@ -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;
More information about the llvm-commits
mailing list