From owner-svn-src-head@FreeBSD.ORG Fri May 3 16:29:52 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 16E01EE3; Fri, 3 May 2013 16:29:52 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 08F341EA0; Fri, 3 May 2013 16:29:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r43GTpTv036697; Fri, 3 May 2013 16:29:51 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r43GTpO3036696; Fri, 3 May 2013 16:29:51 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201305031629.r43GTpO3036696@svn.freebsd.org> From: Dimitry Andric Date: Fri, 3 May 2013 16:29:51 +0000 (UTC) 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 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 May 2013 16:29:52 -0000 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 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 + /* 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