From owner-freebsd-current@FreeBSD.ORG Thu May 2 23:02:49 2013 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 4EF8AC9B for ; Thu, 2 May 2013 23:02:49 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) by mx1.freebsd.org (Postfix) with ESMTP id 133F51B3B for ; Thu, 2 May 2013 23:02:48 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7::e439:4c2c:248a:40f2] (unknown [IPv6:2001:7b8:3a7:0:e439:4c2c:248a:40f2]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 0782A5C45; Fri, 3 May 2013 01:02:45 +0200 (CEST) Content-Type: multipart/mixed; boundary="Apple-Mail=_842A476D-068F-4BC1-BAFE-1C4E636CF4AD" Mime-Version: 1.0 (Mac OS X Mail 6.3 \(1503\)) Subject: Re: buildworld of HEAD failing under 8.1-RELEASE From: Dimitry Andric In-Reply-To: Date: Fri, 3 May 2013 01:02:33 +0200 Message-Id: <413D3E21-7E3E-4463-A7C7-6A70F4AFF8DB@FreeBSD.org> References: To: Ryan Stone X-Mailer: Apple Mail (2.1503) Cc: FreeBSD Current X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 May 2013 23:02:49 -0000 --Apple-Mail=_842A476D-068F-4BC1-BAFE-1C4E636CF4AD Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On May 2, 2013, at 20:28, Ryan Stone wrote: > I am getting the following error when trying to build HEAD on an > 8.1-RELEASE build machine (i386 jail on an amd64 host): >=20 > =3D=3D=3D> lib/clang/libllvmanalysis (all) > = /usr/d2/users/rstone/git/svos/lib/clang/libllvmanalysis/../../../contrib/l= lvm/lib/Analysis/ConstantFolding.cpp: > In function 'llvm::Constant* llvm::ConstantFoldCall(llvm::Function*, > llvm::ArrayRef, const llvm::TargetLibraryInfo*)': > = /usr/d2/users/rstone/git/svos/lib/clang/libllvmanalysis/../../../contrib/l= lvm/lib/Analysis/ConstantFolding.cpp:1310: > error: 'log2' was not declared in this scope ... > Is there anything that I can do other than build on another machine? = I > don't control the build machines at $WORK so I'm not sure whether I = can get > them upgraded. :( In 8.1-RELEASE, there was no log2() MFC yet. Can you please try the = attached diff? --Apple-Mail=_842A476D-068F-4BC1-BAFE-1C4E636CF4AD Content-Disposition: attachment; filename=llvm-config-log2-1.diff Content-Type: application/octet-stream; x-unix-mode=0644; name="llvm-config-log2-1.diff" Content-Transfer-Encoding: 7bit Index: lib/clang/include/llvm/Config/config.h =================================================================== --- lib/clang/include/llvm/Config/config.h (revision 250174) +++ lib/clang/include/llvm/Config/config.h (working copy) @@ -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 --Apple-Mail=_842A476D-068F-4BC1-BAFE-1C4E636CF4AD--