Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 3 May 2013 16:29:51 +0000 (UTC)
From:      Dimitry Andric <dim@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r250217 - head/lib/clang/include/llvm/Config
Message-ID:  <201305031629.r43GTpO3036696@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dim
Date: Fri May  3 16:29:51 2013
New Revision: 250217
URL: http://svnweb.freebsd.org/changeset/base/250217

Log:
  Allow building clang on older FreeBSD releases, where log2() does not
  exist yet.  With this change, I have verified that building head on
  8.1-RELEASE works.
  
  Noticed by:	Ryan Stone <rysto32@gmail.com>

Modified:
  head/lib/clang/include/llvm/Config/config.h

Modified: head/lib/clang/include/llvm/Config/config.h
==============================================================================
--- head/lib/clang/include/llvm/Config/config.h	Fri May  3 15:54:13 2013	(r250216)
+++ head/lib/clang/include/llvm/Config/config.h	Fri May  3 16:29:51 2013	(r250217)
@@ -5,6 +5,9 @@
 #ifndef CONFIG_H
 #define CONFIG_H
 
+/* Get __FreeBSD_version. */
+#include <osreldate.h>
+
 /* Bug report URL. */
 #define BUG_REPORT_URL "http://llvm.org/bugs/"
 
@@ -248,7 +251,9 @@
 #define HAVE_LOG10 1
 
 /* Define to 1 if you have the `log2' function. */
+#if __FreeBSD_version >= 900027 || (__FreeBSD_version < 900000 && __FreeBSD_version >= 802502)
 #define HAVE_LOG2 1
+#endif
 
 /* Define to 1 if you have the `longjmp' function. */
 #define HAVE_LONGJMP 1



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201305031629.r43GTpO3036696>