From owner-freebsd-arch@FreeBSD.ORG Sun May 9 01:21:50 2010 Return-Path: Delivered-To: freebsd-arch@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B37CF106566B for ; Sun, 9 May 2010 01:21:50 +0000 (UTC) (envelope-from bf1783@googlemail.com) Received: from mail-ww0-f54.google.com (mail-ww0-f54.google.com [74.125.82.54]) by mx1.freebsd.org (Postfix) with ESMTP id 258078FC17 for ; Sun, 9 May 2010 01:21:49 +0000 (UTC) Received: by wwd20 with SMTP id 20so328327wwd.13 for ; Sat, 08 May 2010 18:21:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:received:reply-to:date :message-id:subject:from:to:cc:content-type; bh=XvJAd5cNNPZHwXu493dBULx05L/uY51NfOKntlpX4AA=; b=ngOzjG+1a8/L/vaFBFSosO83WEQ7KFcACVsVzEiHI/Nk/FJ3LUNgHxVzkOeUABCk0P 0lusx0O/6O25iGSxWgmZFQTk/M7Y/pxNcOU6efZ38s99NCAFO2zDqSZ0NpOFs0DivSb+ m+eIA2nWLWc//p2xTImPUJFjYO423JpHcI1Xc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:reply-to:date:message-id:subject:from:to:cc :content-type; b=g7gwLzlUMvURUSlCwR44Xm7nO1kXOCSerFLiBg38geeY+NSDtkkOuydDDRAv3Q0y3R VV6/s0VPUV6Uj7bfPXx/OcADZv/3Ae2WKnlniONeFvKwXdfDisJOMcSXEGWFJvk5wBKO NJsSX3iozdrmtDe4FY2i40bknPPgM91HdaOZw= MIME-Version: 1.0 Received: by 10.216.157.212 with SMTP id o62mr1227023wek.197.1273368108973; Sat, 08 May 2010 18:21:48 -0700 (PDT) Received: by 10.216.163.21 with HTTP; Sat, 8 May 2010 18:21:48 -0700 (PDT) Date: Sun, 9 May 2010 01:21:48 +0000 Message-ID: From: "b. f." To: freebsd-arch@FreeBSD.org Content-Type: text/plain; charset=ISO-8859-1 Cc: mm@FreeBSD.org Subject: Re: RFC: liblzma and xz to FreeBSD base X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: bf1783@gmail.com List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 May 2010 01:21:50 -0000 Martin Matuska wrote: > Dear fellow devleopers, > > I would like to propose an import of liblzma and the utilities xz, xzdec > and lzmainfo to base (vendor -> contrib). > As I was informed, libarchive is already lzma-ready, some of our > existing code could take advantage of liblzma instantly. > > The source code is imported from: > http://tukaani.org/xz/xz-4.999.9beta.tar.gz > > All GPLv2, LGPLv2.1 and GPLv3 parts are stripped from the code (they > cover only the build system and unimportant scripts). > liblzma, xz, xzdec, lzmainfo are public domain licensed. > > A working patchset against HEAD (includes modified lesspipe.sh): > http://people.freebsd.org/~mm/patches/xz/ > > The only patched file is src/common/bswap.h, with the patch from the > archivers/xz port. > > Comments and suggestions are welcome. > > Thanks, > mm This would be great; we've been waiting for it for some time. If you could also coordinate with Alexander Rybalko , who described his module for kernel lzma support in Feb.: http://lists.freebsd.org/pipermail/freebsd-hackers/2010-February/030774.html (and follow-ups on -hackers Feb.-Mar.) to help him incorporate his work, that would be appreciated. b. From owner-freebsd-arch@FreeBSD.ORG Sun May 9 03:25:23 2010 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8F53E106564A; Sun, 9 May 2010 03:25:23 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: from mail-qy0-f175.google.com (mail-qy0-f175.google.com [209.85.221.175]) by mx1.freebsd.org (Postfix) with ESMTP id 393538FC08; Sun, 9 May 2010 03:25:22 +0000 (UTC) Received: by qyk5 with SMTP id 5so4289351qyk.3 for ; Sat, 08 May 2010 20:25:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:cc:content-type; bh=lAckO1A3q5DjSJZti1Hpq2YmfmvzMCEbvMS54IA52MA=; b=hdOpW4ACc5wyHoWhK+h1kcLTpvIGuu6e/xO6mDsdOHT7Bvllw7wypc3nvscla71MkB 0AjJf/UgC8LtulZA1gPIZHp6L//aT2fhYhHQKMXI8E2ZAYo8z4GIK5Mub3MZltQ78PVB N1BbbkHUk9wPc87inNWMldbbrXZ9vTt3sn7Fg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:cc:content-type; b=FpqZMjvDJQ+25IC9wPEsft41i2apZffk+6i3V5EOQ/GV0oqcQ+5i47lhyWPfyvaRyT ZiG/p/CIesu21kEAAgN191cfTU50iuoOiyoGYQwr49b2R/2Ejz28NtW+Z0Ch6koJtkDE X6rMFj0J23VDXcKcMVKzbN28kVTKTyLLUVCVk= MIME-Version: 1.0 Received: by 10.229.239.4 with SMTP id ku4mr1630834qcb.86.1273375522395; Sat, 08 May 2010 20:25:22 -0700 (PDT) Received: by 10.229.193.14 with HTTP; Sat, 8 May 2010 20:25:22 -0700 (PDT) Date: Sat, 8 May 2010 20:25:22 -0700 Message-ID: From: Garrett Cooper To: portmgr@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Cc: arch@freebsd.org Subject: [RFC] Deprecate @srcdir in pkg_install manifests X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 May 2010 03:25:23 -0000 Hi Arch and Portmgr, Found another item that I'm proposing for removal -- @srcdir. Now, first off, here's what it does (from pkg_create): @srcdir directory Set the internal directory pointer for _creation only_ to directory. That is to say that it overrides @cwd for package creation but not extraction. This construct: 1. Isn't used anywhere in /usr/ports's pkg_plist* files. 2. Isn't used in /usr/src . 3. Is semi-broken in pkg_create as it's treated as a really awkward special case, like so: else if (p->type == PLIST_CWD || p->type == PLIST_SRC) fprintf(totar, "-C\n%s\n", p->name); So if I specify @srcdir multiple times, pkg_create will fall in on itself. 4. It over-complicates things, as the -p option basically already sort of provides this level of functionality; the only pro for doing this that I can think of is if someone had tainted vs untainted files that they wanted to install, then using @srcdir with a custom manifest and directory would simplify things. I argue that if they're doing that, they should be using a chroot or a jail anyhow because package maintainers would potentially unnecessarily taint the system with their environment and the packages wouldn't be necessarily as safe to redistribute. Another item I'll be talking about with flz and other folks at BSDCan, but I wanted to see if anyone had any concerns that they needed to air here before a final decision was made by portmgr. Thanks, -Garrett From owner-freebsd-arch@FreeBSD.ORG Sun May 9 03:44:10 2010 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 803191065673; Sun, 9 May 2010 03:44:10 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: from mail-qy0-f181.google.com (mail-qy0-f181.google.com [209.85.221.181]) by mx1.freebsd.org (Postfix) with ESMTP id 255338FC08; Sun, 9 May 2010 03:44:09 +0000 (UTC) Received: by qyk11 with SMTP id 11so3737064qyk.13 for ; Sat, 08 May 2010 20:44:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=pDR5iHWFpwLTpmhojfbelf0iiVegRkApx8NBvhnYb28=; b=hD2xiBhbsK94h419GlILgI84JOyGUC79fYbCgB89dpeg/aLoMweG1+6hRUjlgXFG0z Maur9rseo5JInhF3pTF9h6loAstqtQaGYHKRQp9vRMD2gQ1UWTZddPIQoFxP/lJrO8aL Dj1s0EyyoueyZgCmIpWkxnfeUjhUxWVzVpsBI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=iM2/yQULNzF0rNwR5zjX6vleE8k5EZCXnebB5z5Y8tnNKwZpBrTM5QPJuVPpIRbulU TOToYNDuLh00wecRTcvpZjaLbzxR68jK8aFbT2d5fiNzs4kvmtoz/BCjith2A9Uk7zo1 mX/cBW1YJvFJXQ/YN0RhmOkGLWASk+bPFBFKs= MIME-Version: 1.0 Received: by 10.229.217.204 with SMTP id hn12mr1599636qcb.100.1273376649112; Sat, 08 May 2010 20:44:09 -0700 (PDT) Received: by 10.229.193.14 with HTTP; Sat, 8 May 2010 20:44:08 -0700 (PDT) In-Reply-To: References: Date: Sat, 8 May 2010 20:44:08 -0700 Message-ID: From: Garrett Cooper To: portmgr@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: arch@freebsd.org Subject: Re: [RFC] Deprecate @srcdir in pkg_install manifests X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 May 2010 03:44:10 -0000 On Sat, May 8, 2010 at 8:25 PM, Garrett Cooper wrote: > Hi Arch and Portmgr, > =A0 =A0Found another item that I'm proposing for removal -- @srcdir. Now, > first off, here's what it does (from pkg_create): > > =A0 =A0 @srcdir directory > =A0 =A0 =A0 =A0 =A0 =A0 Set the internal directory pointer for _creation = only_ to > =A0 =A0 =A0 =A0 =A0 =A0 directory. =A0That is to say that it overrides @c= wd for package > =A0 =A0 =A0 =A0 =A0 =A0 creation but not extraction. > > This construct: > > 1. Isn't used anywhere in /usr/ports's pkg_plist* files. > 2. Isn't used in /usr/src . > 3. Is semi-broken in pkg_create as it's treated as a really awkward > special case, like so: > > =A0 =A0 =A0 =A0else if (p->type =3D=3D PLIST_CWD || p->type =3D=3D PLIST_= SRC) > =A0 =A0 =A0 =A0 =A0 =A0fprintf(totar, "-C\n%s\n", p->name); > > =A0 =A0So if I specify @srcdir multiple times, pkg_create will fall in on= itself. > 4. It over-complicates things, as the -p option basically already sort Correction -- -s and -S handle this functionality: -s srcdir srcdir will override the value of @cwd during package creation= . -S basedir basedir will be prefixed to all @cwd during package creation. > of provides this level of functionality; the only pro for doing this > that I can think of is if someone had tainted vs untainted files that > they wanted to install, then using @srcdir with a custom manifest and > directory would simplify things. I argue that if they're doing that, > they should be using a chroot or a jail anyhow because package > maintainers would potentially unnecessarily taint the system with > their environment and the packages wouldn't be necessarily as safe to > redistribute. > =A0 =A0Another item I'll be talking about with flz and other folks at > BSDCan, but I wanted to see if anyone had any concerns that they > needed to air here before a final decision was made by portmgr. Thanks, -Garrett From owner-freebsd-arch@FreeBSD.ORG Sun May 9 04:11:10 2010 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 779EC106566C; Sun, 9 May 2010 04:11:10 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: from mail-qy0-f181.google.com (mail-qy0-f181.google.com [209.85.221.181]) by mx1.freebsd.org (Postfix) with ESMTP id 1C56D8FC12; Sun, 9 May 2010 04:11:09 +0000 (UTC) Received: by qyk11 with SMTP id 11so3755876qyk.13 for ; Sat, 08 May 2010 21:11:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=L0VW1394/kEW72EGaCCuG8rJgWsE6EScnAZmMx2UuB4=; b=CVtmaW8RwpJYBJjBa5O4WqhoE/BPYilCfByBhey8Epiu4gwyj2yBrkOzuRFqne5/vE iSFR20+9DGk2RYyDvJUuimrxplRaWyDgjo3rT5Eui425b/MLZVCC0ELqV98eihLPzm5h p+OubinHsX0c0qJNKztxyx8xDrLDBBZgL7RQg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=c6bxT4MdWk8Ih+UfvZYHqWaoQAVomLqnPphedbZxRwQ8ZXJ25wPuuL9fhwtpx6267G OgA5G+9W8LpIDBg7y+I/BvedTPwkzxQauIpNlt5zVJwxkuh65fCH0QDP2FTONH8EQ7Ql kGwa4w8qvZCwwD7DnULkrfScFMNNM3kOZsoOw= MIME-Version: 1.0 Received: by 10.224.107.26 with SMTP id z26mr1383447qao.123.1273378269321; Sat, 08 May 2010 21:11:09 -0700 (PDT) Received: by 10.229.193.14 with HTTP; Sat, 8 May 2010 21:11:09 -0700 (PDT) In-Reply-To: References: Date: Sat, 8 May 2010 21:11:09 -0700 Message-ID: From: Garrett Cooper To: portmgr@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: arch@freebsd.org Subject: Re: [RFC] Deprecate @srcdir in pkg_install manifests X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 May 2010 04:11:10 -0000 On Sat, May 8, 2010 at 8:44 PM, Garrett Cooper wrote: > On Sat, May 8, 2010 at 8:25 PM, Garrett Cooper wrote= : >> Hi Arch and Portmgr, >> =A0 =A0Found another item that I'm proposing for removal -- @srcdir. Now= , >> first off, here's what it does (from pkg_create): >> >> =A0 =A0 @srcdir directory >> =A0 =A0 =A0 =A0 =A0 =A0 Set the internal directory pointer for _creation= only_ to >> =A0 =A0 =A0 =A0 =A0 =A0 directory. =A0That is to say that it overrides @= cwd for package >> =A0 =A0 =A0 =A0 =A0 =A0 creation but not extraction. >> >> This construct: >> >> 1. Isn't used anywhere in /usr/ports's pkg_plist* files. >> 2. Isn't used in /usr/src . >> 3. Is semi-broken in pkg_create as it's treated as a really awkward >> special case, like so: >> >> =A0 =A0 =A0 =A0else if (p->type =3D=3D PLIST_CWD || p->type =3D=3D PLIST= _SRC) >> =A0 =A0 =A0 =A0 =A0 =A0fprintf(totar, "-C\n%s\n", p->name); >> >> =A0 =A0So if I specify @srcdir multiple times, pkg_create will fall in o= n itself. >> 4. It over-complicates things, as the -p option basically already sort > > Correction -- -s and -S handle this functionality: > > =A0 =A0 -s srcdir > =A0 =A0 =A0 =A0 =A0 =A0 srcdir will override the value of @cwd during pac= kage creation. > > =A0 =A0 -S basedir > =A0 =A0 =A0 =A0 =A0 =A0 basedir will be prefixed to all @cwd during packa= ge creation. Grr... this isn't nearly as simple as I hoped. -s is the controlling factor for @srcdir: /* If a SrcDir override is set, add it now */ if (SrcDir) { if (Verbose && !PlistOnly) printf("Using SrcDir value of %s\n", SrcDir); add_plist(&plist, PLIST_SRC, SrcDir); } I'll talk this over with flz, but it's definitely obfuscated design. >> of provides this level of functionality; the only pro for doing this >> that I can think of is if someone had tainted vs untainted files that >> they wanted to install, then using @srcdir with a custom manifest and >> directory would simplify things. I argue that if they're doing that, >> they should be using a chroot or a jail anyhow because package >> maintainers would potentially unnecessarily taint the system with >> their environment and the packages wouldn't be necessarily as safe to >> redistribute. >> =A0 =A0Another item I'll be talking about with flz and other folks at >> BSDCan, but I wanted to see if anyone had any concerns that they >> needed to air here before a final decision was made by portmgr. Thanks, -Garrett From owner-freebsd-arch@FreeBSD.ORG Mon May 10 11:06:53 2010 Return-Path: Delivered-To: freebsd-arch@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 26B2110656EB for ; Mon, 10 May 2010 11:06:53 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [69.147.83.40]) by mx1.freebsd.org (Postfix) with ESMTP id EF3A18FC28 for ; Mon, 10 May 2010 11:06:52 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id o4AB6q20082013 for ; Mon, 10 May 2010 11:06:52 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o4AB6q1D082011 for freebsd-arch@FreeBSD.org; Mon, 10 May 2010 11:06:52 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 10 May 2010 11:06:52 GMT Message-Id: <201005101106.o4AB6q1D082011@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-arch@FreeBSD.org Cc: Subject: Current problem reports assigned to freebsd-arch@FreeBSD.org X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 May 2010 11:06:53 -0000 Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o kern/120749 arch [request] Suggest upping the default kern.ps_arg_cache 1 problem total. From owner-freebsd-arch@FreeBSD.ORG Mon May 10 16:39:38 2010 Return-Path: Delivered-To: freebsd-arch@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2E2E7106566B for ; Mon, 10 May 2010 16:39:38 +0000 (UTC) (envelope-from das@FreeBSD.ORG) Received: from zim.MIT.EDU (ZIM.MIT.EDU [18.95.3.101]) by mx1.freebsd.org (Postfix) with ESMTP id E89868FC16 for ; Mon, 10 May 2010 16:39:37 +0000 (UTC) Received: from zim.MIT.EDU (localhost [127.0.0.1]) by zim.MIT.EDU (8.14.3/8.14.2) with ESMTP id o4AGdV6h002980; Mon, 10 May 2010 12:39:31 -0400 (EDT) (envelope-from das@FreeBSD.ORG) Received: (from das@localhost) by zim.MIT.EDU (8.14.3/8.14.2/Submit) id o4AGdVtu002979; Mon, 10 May 2010 12:39:31 -0400 (EDT) (envelope-from das@FreeBSD.ORG) Date: Mon, 10 May 2010 12:39:31 -0400 From: David Schultz To: Ed Schouten Message-ID: <20100510163931.GA2902@zim.MIT.EDU> Mail-Followup-To: Ed Schouten , freebsd-arch@freebsd.org References: <20100501124544.GR56080@hoeg.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100501124544.GR56080@hoeg.nl> Cc: freebsd-arch@FreeBSD.ORG Subject: Re: [Extension] utmpx and LOGIN_FAILURE X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 May 2010 16:39:38 -0000 On Sat, May 01, 2010, Ed Schouten wrote: > Some time ago I noticed some operating systems offer an interface called > btmp, which is essentially a wtmp for logging failed login attempts. > Instead of taking the same approach, I'd rather do something as follows: > > http://80386.nl/pub/utmpx-login_failure.diff.txt > > This patch adds a new utmpx log entry type called LOGIN_FAILURE. > Unfortunately we are the only operating system that does it this way, > but I suspect if we can already get OpenSSH and PAM to use this > interface, we've got reasonable coverage. The patch only has the > modifications for OpenSSH. An important question is whether the purpose of utmpx is accounting (keeping track of users' resource consumption) or auditing (creating a record of events that are relevant to security). My impression was that utmpx is mainly for the former, whereas auditd is a better tool for the latter. This proposal seems to conflate the two a bit; maybe utmpx isn't the right place for this functionality. From owner-freebsd-arch@FreeBSD.ORG Tue May 11 14:33:45 2010 Return-Path: Delivered-To: freebsd-arch@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2B630106566C; Tue, 11 May 2010 14:33:45 +0000 (UTC) (envelope-from ray@dlink.ua) Received: from dlink.ua (smtp.dlink.ua [193.138.187.146]) by mx1.freebsd.org (Postfix) with ESMTP id A27668FC0A; Tue, 11 May 2010 14:33:43 +0000 (UTC) Received: from gw ([192.168.10.10] helo=terran) by dlink.ua with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1OBq4k-00069o-09; Tue, 11 May 2010 17:04:46 +0300 Date: Tue, 11 May 2010 17:10:11 +0300 From: Alexandr Rybalko To: bf1783@gmail.com Message-Id: <20100511171011.796eb8c7.ray@dlink.ua> In-Reply-To: References: Organization: D-Link X-Mailer: Sylpheed 2.7.1 (GTK+ 2.16.6; i386-portbld-freebsd8.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: "b. f." , mm@FreeBSD.org, freebsd-arch@FreeBSD.org Subject: Re: RFC: liblzma and xz to FreeBSD base X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 May 2010 14:33:45 -0000 On Sun, 9 May 2010 01:21:48 +0000 "b. f." wrote: >> Martin Matuska wrote: >> > Dear fellow devleopers, >> > >> > I would like to propose an import of liblzma and the utilities xz, xzdec >> > and lzmainfo to base (vendor -> contrib). >> > As I was informed, libarchive is already lzma-ready, some of our >> > existing code could take advantage of liblzma instantly. >> > >> > The source code is imported from: >> > http://tukaani.org/xz/xz-4.999.9beta.tar.gz >> > >> > All GPLv2, LGPLv2.1 and GPLv3 parts are stripped from the code (they >> > cover only the build system and unimportant scripts). >> > liblzma, xz, xzdec, lzmainfo are public domain licensed. >> > >> > A working patchset against HEAD (includes modified lesspipe.sh): >> > http://people.freebsd.org/~mm/patches/xz/ >> > >> > The only patched file is src/common/bswap.h, with the patch from the >> > archivers/xz port. >> > >> > Comments and suggestions are welcome. >> > >> > Thanks, >> > mm >> >> This would be great; we've been waiting for it for some time. If you >> could also coordinate with Alexander Rybalko , who >> described his module for kernel lzma support in Feb.: >> >> http://lists.freebsd.org/pipermail/freebsd-hackers/2010-February/030774.html >> >> (and follow-ups on -hackers Feb.-Mar.) to help him incorporate his >> work, that would be appreciated. >> >> b. >> _______________________________________________ >> freebsd-arch@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-arch >> To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org" Hi, in my work lzma lib can help only for mkulzma utility. geom_ulzma use internal lzma, because kernel don`t have lzma lzma encoder for compressing kernel for CFE loader use old version of lzma (archivers/lzma PORTVERSION= 4.17) But I would be very happy, when supported archive types in tar and libarchive maybe customized with options like WITHOUT_BZ2, WITHOUT_LZMA ... . -- Alexandr Rybalko aka Alex RAY From owner-freebsd-arch@FreeBSD.ORG Tue May 11 17:36:36 2010 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4AB291065674 for ; Tue, 11 May 2010 17:36:36 +0000 (UTC) (envelope-from tim.prouty@isilon.com) Received: from seaxch09.isilon.com (seaxch09.isilon.com [74.85.160.25]) by mx1.freebsd.org (Postfix) with ESMTP id 253768FC20 for ; Tue, 11 May 2010 17:36:35 +0000 (UTC) Received: from 10-8-5-63.isilon.com ([10.8.5.63]) by seaxch09.isilon.com with Microsoft SMTPSVC(6.0.3790.3959); Tue, 11 May 2010 10:24:35 -0700 Message-Id: From: Tim Prouty To: freebsd-arch@freebsd.org Content-Type: multipart/mixed; boundary=Apple-Mail-16--1061268945 Mime-Version: 1.0 (Apple Message framework v936) Date: Tue, 11 May 2010 10:24:34 -0700 X-Mailer: Apple Mail (2.936) X-OriginalArrivalTime: 11 May 2010 17:24:35.0064 (UTC) FILETIME=[D3614F80:01CAF12E] Cc: Matthew Fleming , Zachary Loafman Subject: [PATCH]/[RFC] Increase scalability of per-process file descriptor data structures X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 May 2010 17:36:36 -0000 --Apple-Mail-16--1061268945 Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Hi, This is my first time sending a patch to the list, so let me know if there are any conventions I missed. Attached is a patch that attempts to remove the data structure limitations on the number of open file descriptors in the system. The patch is against our modified version of FreeBSD 7, so it probably won't apply cleanly against upstream, but I wanted to get this out there for discussion soon so if there is feedback, we can address it and then worry about porting a specific patch for upstream. We (Isilon) have been running this internally for a few months without any issues, although there is at least one known issue that I need to resolve, which is mentioned below. Motivation: With the increasing amount of memory and processing power in modern machines, there are certain userspace processes that are able to handle much higher concurrent load than previously possible. A specific example is a single-process/multi-threaded SMB stack which can handle thousands of connected clients, each with hundreds of files open. Once kernel sysctl limits are increased for max files, the next limitation is in the actual actual file descriptor data structures. Problem - Data Structure Limits: The existing per-process data structures for the file descriptor are flat tables, which are reallocated each time they need need to grow. This is innefficient as the amount of data to allocate and copy each time increases, but the bigger issue is the potentially limited amount of contiguous KVA memory as the table grows very large. Over time as the KVA memory becomes fragmanted, malloc may be unable to provide large enough blocks of contiguous memory. In the current code the struct proc contains both an array of struct file pointers and a bit field indicating which file descriptors are in use. The primary issue is how to handle these structures growing beyond the kernel page size of 4K. The array of file pointers will grow much faster than the bit field, especially on a 64 bit kernel. The 4K block size will be hit at 512 files (64 bit kernel) for the file pointer array and 32,768 files for the bit field. Solution: File Pointer Array Focusing first on the file pointer array limitation, an indirect block approach is used. An indirect block size of 4K (equal to page size) is used, allowing for 512 files per block. To optimize for the common case of low/normal fd usage, a flat array is initialized to 20 entries and then grows at 2x each time until the block reaches it's maximum size. Once more than 512 files are opened, the array will transition to a single level indirect block table. Fd Bitfield: The fd bit field as it stands can represent 32K files when it grows to the page size limit. Using the same indirect system as the file pointer array, it is able to grow beyond it's existing limits. Close Exec Field: One complication of the old file pointer table is that for each file pointer there was 1 byte flags. The memory was laid out such that the file pointers are all in one contiguous array, followed by a second array of chars where each char entry is a flags field that corresponds to the file pointer at the same index. Interestingly there is actually only one flag that is used: UF_EXCLOSE, so it's fairly wasteful to have an array of chars. What linux does, and what I have done is to just use a bitfield for all fds that should be closed on exec. This could be further optimized by doing some pointer trickery to store the close exec bit in the struct file pointer rather than keep a separate bitfield. Indirect Block Table: Since there are three consumers of the indirect block table, I generalized it so all of the consumers rely on the same code. This could eventually be refactored into a kernel library since it could be generally useful in other areas. The table uses a single level of indirection, so the base table can still grow beyond the 4K. As a process uses more fds, the need to continue growing the base table should be fairly limited, and a single realloc will significantly increase the number of fds the process can allocate. Accessing the new data structures: All consumers of the file pointer array and bitfield will now have to use accessors rather than using direct access. Known Issues: The new fdp locking in fdcopy needs to be reworked. Thank you for reviewing! -Tim --Apple-Mail-16--1061268945 Content-Disposition: attachment; filename=0001-Increase-scalabilty-of-per-process-file-descriptor-d.patch Content-Type: application/octet-stream; x-unix-mode=0700; name="0001-Increase-scalabilty-of-per-process-file-descriptor-d.patch" Content-Transfer-Encoding: quoted-printable =46rom=20a9dc5a7bc921f992a8775b4e1b9abcda2a0547c6=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20tprouty=20= =0ADate:=20Mon,=2022=20Mar=20= 2010=2018:09:31=20+0000=0ASubject:=20[PATCH]=20Increase=20scalability=20= of=20per-process=20file=20descriptor=20data=20structures=0A=0A= Motivation:=0A=0A=20=20With=20the=20increasing=20amount=20of=20memory=20= and=20processing=20power=20in=20modern=0A=20=20machines,=20there=20are=20= certain=20userspace=20processes=20that=20are=20able=20to=0A=20=20handle=20= much=20higher=20concurrent=20load=20than=20previously=20possible.=20=20A=0A= =20=20specific=20example=20is=20a=20single-process/multi-threaded=20SMB=20= stack=20which=0A=20=20can=20handle=20thousands=20of=20connected=20= clients,=20each=20with=20hundreds=20of=0A=20=20files=20open.=20=20Once=20= kernel=20sysctl=20limits=20are=20increased=20for=20max=20files,=0A=20=20= the=20next=20limitation=20is=20in=20the=20actual=20actual=20file=20= descriptor=20data=0A=20=20structures.=0A=0AProblem=20-=20Data=20= Structure=20Limits:=0A=0A=20=20The=20existing=20per-process=20data=20= structures=20for=20the=20file=20descriptor=20are=0A=20=20flat=20tables,=20= which=20are=20reallocated=20each=20time=20they=20need=20need=20to=20= grow.=0A=20=20This=20is=20innefficient=20as=20the=20amount=20of=20data=20= to=20allocate=20and=20copy=20each=0A=20=20time=20increases,=20but=20the=20= bigger=20issue=20is=20the=20potentially=20limited=0A=20=20amount=20of=20= contiguous=20KVA=20memory=20as=20the=20table=20grows=20very=20large.=20=20= Over=0A=20=20time=20as=20the=20KVA=20memory=20becomes=20fragmanted,=20= malloc=20may=20be=20unable=20to=0A=20=20provide=20large=20enough=20= blocks=20of=20contiguous=20memory.=0A=0A=20=20In=20the=20current=20code=20= the=20struct=20proc=20contains=20both=20an=20array=20of=20struct=0A=20=20= file=20pointers=20and=20a=20bit=20field=20indicating=20which=20file=20= descriptors=20are=0A=20=20in=20use.=20=20The=20primary=20issue=20is=20= how=20to=20handle=20these=20structures=20growing=0A=20=20beyond=20the=20= kernel=20page=20size=20of=204K.=0A=0A=20=20The=20array=20of=20file=20= pointers=20will=20grow=20much=20faster=20than=20the=20bit=20field,=0A=20=20= especially=20on=20a=2064=20bit=20kernel.=20The=204K=20block=20size=20= will=20be=20hit=20at=20512=0A=20=20files=20(64=20bit=20kernel)=20for=20= the=20file=20pointer=20array=20and=2032,768=20files=0A=20=20for=20the=20= bit=20field.=0A=0ASolution:=0A=0AFile=20Pointer=20Array=0A=0A=20=20= Focusing=20first=20on=20the=20file=20pointer=20array=20limitation,=20an=20= indirect=0A=20=20block=20approach=20is=20used.=20=20An=20indirect=20= block=20size=20of=204K=20(equal=20to=20page=0A=20=20size)=20is=20used,=20= allowing=20for=20512=20files=20per=20block.=20=20To=20optimize=20for=0A=20= =20the=20common=20case=20of=20low/normal=20fd=20usage,=20a=20flat=20= array=20is=20initialized=0A=20=20to=2020=20entries=20and=20then=20grows=20= at=202x=20each=20time=20until=20the=20block=20reaches=0A=20=20it's=20= maximum=20size.=20Once=20more=20than=20512=20files=20are=20opened,=20the=20= array=0A=20=20will=20transition=20to=20a=20single=20level=20indirect=20= block=20table.=0A=0AFd=20Bitfield:=0A=0A=20=20The=20fd=20bit=20field=20= as=20it=20stands=20can=20represent=2032K=20files=20when=20it=20grows=0A=20= =20to=20the=20page=20size=20limit.=20=20Using=20the=20same=20indirect=20= system=20as=20the=20file=0A=20=20pointer=20array,=20it=20is=20able=20to=20= grow=20beyond=20it's=20existing=20limits.=0A=0AClose=20Exec=20Field:=0A=0A= =20=20One=20complication=20of=20the=20old=20file=20pointer=20table=20is=20= that=20for=20each=20file=0A=20=20pointer=20there=20was=201=20byte=20= flags.=20=20The=20memory=20was=20laid=20out=20such=20that=0A=20=20the=20= file=20pointers=20are=20all=20in=20one=20contiguous=20array,=20followed=20= by=20a=0A=20=20second=20array=20of=20chars=20where=20each=20char=20entry=20= is=20a=20flags=20field=20that=0A=20=20corresponds=20to=20the=20file=20= pointer=20at=20the=20same=20index.=20=20Interestingly=0A=20=20there=20is=20= actually=20only=20one=20flag=20that=20is=20used:=20UF_EXCLOSE,=20so=20= it's=0A=20=20fairly=20wasteful=20to=20have=20an=20array=20of=20chars.=20=20= What=20linux=20does,=20and=0A=20=20what=20I=20have=20done=20is=20to=20= just=20use=20a=20bitfield=20for=20all=20fds=20that=20should=0A=20=20be=20= closed=20on=20exec.=20=20This=20could=20be=20further=20optimized=20by=20= doing=20some=0A=20=20pointer=20trickery=20to=20store=20the=20close=20= exec=20bit=20in=20the=20struct=20file=0A=20=20pointer=20rather=20than=20= keep=20a=20separate=20bitfield.=0A=0AIndirect=20Block=20Table:=0A=0A=20=20= Since=20there=20are=20three=20consumers=20of=20the=20indirect=20block=20= table,=20I=0A=20=20generalized=20it=20so=20all=20of=20the=20consumers=20= rely=20on=20the=20same=20code.=20=20This=0A=20=20could=20eventually=20be=20= refactored=20into=20a=20kernel=20library=20since=20it=20could=0A=20=20be=20= generally=20useful=20in=20other=20areas.=20=20The=20table=20uses=20a=20= single=20level=0A=20=20of=20indirection,=20so=20the=20base=20table=20can=20= still=20grow=20beyond=20the=204K.=20=20As=0A=20=20a=20process=20uses=20= more=20fds,=20the=20need=20to=20continue=20growing=20the=20base=20table=0A= =20=20should=20be=20fairly=20limited,=20and=20a=20single=20realloc=20= will=20significantly=0A=20=20increase=20the=20number=20of=20fds=20the=20= process=20can=20allocate.=0A=0AAccessing=20the=20new=20data=20= structures:=0A=0A=20=20All=20consumers=20of=20the=20file=20pointer=20= array=20and=20bitfield=20will=20now=20have=0A=20=20to=20use=20accessors=20= rather=20than=20using=20direct=20access.=0A=0AKnown=20Issues:=0A=0A=20=20= The=20new=20fdp=20locking=20in=20fdcopy=20needs=20to=20be=20reworked.=0A=0A= git-svn-id:=20https://svn/repo/onefs/branches/BR_HAB_PROTO@144587=20= b72e2a10-2d34-0410-9a71-d3beadf02b57=0A---=0A=20= src/sys/compat/linux/linux_stats.c=20=20|=20=20=20=202=20+-=0A=20= src/sys/compat/svr4/svr4_filio.c=20=20=20=20|=20=20=20=204=20+-=0A=20= src/sys/fs/fdescfs/fdesc_vfsops.c=20=20=20|=20=20=20=202=20+-=0A=20= src/sys/fs/fdescfs/fdesc_vnops.c=20=20=20=20|=20=20=20=202=20+-=0A=20= src/sys/fs/nfsserver/nfs_nfsdport.c=20|=20=20=20=202=20+-=0A=20= src/sys/ifs/bam/bam_pctl.c=20=20=20=20=20=20=20=20=20=20|=20=20=20=202=20= +-=0A=20src/sys/ifs/bam/bam_vfsops.c=20=20=20=20=20=20=20=20|=20=20=20=20= 4=20+-=0A=20src/sys/ifs/lock/lock_advisory.c=20=20=20=20|=20=20=20=202=20= +-=0A=20src/sys/ifs/rbm/rbm_user_ipc.c=20=20=20=20=20=20|=20=20=20=206=20= +-=0A=20src/sys/kern/kern_descrip.c=20=20=20=20=20=20=20=20=20|=20=20805=20= +++++++++++++++++++++++++++--------=0A=20src/sys/kern/kern_lsof.c=20=20=20= =20=20=20=20=20=20=20=20=20|=20=20=20=202=20+-=0A=20= src/sys/kern/sys_generic.c=20=20=20=20=20=20=20=20=20=20|=20=20=20=206=20= +-=0A=20src/sys/kern/uipc_mqueue.c=20=20=20=20=20=20=20=20=20=20|=20=20=20= =204=20+-=0A=20src/sys/kern/uipc_sem.c=20=20=20=20=20=20=20=20=20=20=20=20= =20|=20=20=20=204=20+-=0A=20src/sys/kern/uipc_usrreq.c=20=20=20=20=20=20=20= =20=20=20|=20=20=20=209=20+-=0A=20src/sys/kern/vfs_syscalls.c=20=20=20=20= =20=20=20=20=20|=20=20=20=202=20+-=0A=20src/sys/netsmb/smb_dev.c=20=20=20= =20=20=20=20=20=20=20=20=20|=20=20=20=202=20+-=0A=20= src/sys/sys/filedesc.h=20=20=20=20=20=20=20=20=20=20=20=20=20=20|=20=20=20= 26=20+-=0A=2018=20files=20changed,=20670=20insertions(+),=20216=20= deletions(-)=0A=0Adiff=20--git=20a/src/sys/compat/linux/linux_stats.c=20= b/src/sys/compat/linux/linux_stats.c=0Aindex=20374ce39..905db20=20100644=0A= ---=20a/src/sys/compat/linux/linux_stats.c=0A+++=20= b/src/sys/compat/linux/linux_stats.c=0A@@=20-129,7=20+129,7=20@@=20= translate_path_major_minor(struct=20thread=20*td,=20char=20*path,=20= struct=20stat=20*buf)=0A=20=09fd=20=3D=20td->td_retval[0];=0A=20=09= td->td_retval[0]=20=3D=20temp;=0A=20=09translate_fd_major_minor(td,=20= fd,=20buf);=0A-=09fdclose(fdp,=20fdp->fd_ofiles[fd],=20fd,=20td);=0A+=09= fdclose(fdp,=20ftable_get(fdp,=20fd),=20fd,=20td);=0A=20}=0A=20=0A=20= static=20int=0Adiff=20--git=20a/src/sys/compat/svr4/svr4_filio.c=20= b/src/sys/compat/svr4/svr4_filio.c=0Aindex=20701bf15..82364ca=20100644=0A= ---=20a/src/sys/compat/svr4/svr4_filio.c=0A+++=20= b/src/sys/compat/svr4/svr4_filio.c=0A@@=20-212,13=20+212,13=20@@=20= svr4_fil_ioctl(fp,=20td,=20retval,=20fd,=20cmd,=20data)=0A=20=09switch=20= (cmd)=20{=0A=20=09case=20SVR4_FIOCLEX:=0A=20=09=09FILEDESC_XLOCK(fdp);=0A= -=09=09fdp->fd_ofileflags[fd]=20|=3D=20UF_EXCLOSE;=0A+=09=09= ftable_set_cloexec(fdp,=20fd,=201);=0A=20=09=09FILEDESC_XUNLOCK(fdp);=0A=20= =09=09return=200;=0A=20=0A=20=09case=20SVR4_FIONCLEX:=0A=20=09=09= FILEDESC_XLOCK(fdp);=0A-=09=09fdp->fd_ofileflags[fd]=20&=3D=20= ~UF_EXCLOSE;=0A+=09=09ftable_set_cloexec(fdp,=20fd,=200);=0A=20=09=09= FILEDESC_XUNLOCK(fdp);=0A=20=09=09return=200;=0A=20=0Adiff=20--git=20= a/src/sys/fs/fdescfs/fdesc_vfsops.c=20= b/src/sys/fs/fdescfs/fdesc_vfsops.c=0Aindex=2016fa4cf..fb2e45e=20100644=0A= ---=20a/src/sys/fs/fdescfs/fdesc_vfsops.c=0A+++=20= b/src/sys/fs/fdescfs/fdesc_vfsops.c=0A@@=20-203,7=20+203,7=20@@=20= fdesc_statfs(mp,=20sbp,=20td)=0A=20=09last=20=3D=20min(fdp->fd_nfiles,=20= lim);=0A=20=09freefd=20=3D=200;=0A=20=09for=20(i=20=3D=20= fdp->fd_freefile;=20i=20<=20last;=20i++)=0A-=09=09if=20= (fdp->fd_ofiles[i]=20=3D=3D=20NULL)=0A+=09=09if=20(ftable_get(fdp,=20i)=20= =3D=3D=20NULL)=0A=20=09=09=09freefd++;=0A=20=0A=20=09/*=0Adiff=20--git=20= a/src/sys/fs/fdescfs/fdesc_vnops.c=20b/src/sys/fs/fdescfs/fdesc_vnops.c=0A= index=20f39c3a7..0ea6607=20100644=0A---=20= a/src/sys/fs/fdescfs/fdesc_vnops.c=0A+++=20= b/src/sys/fs/fdescfs/fdesc_vnops.c=0A@@=20-581,7=20+581,7=20@@=20= fdesc_readdir(ap)=0A=20=09=09=09dp->d_type=20=3D=20DT_DIR;=0A=20=09=09=09= break;=0A=20=09=09default:=0A-=09=09=09if=20(fdp->fd_ofiles[fcnt]=20=3D=3D= =20NULL)=20{=0A+=09=09=09if=20(ftable_get(fdp,=20fcnt)=20=3D=3D=20NULL)=20= {=0A=20=09=09=09=09FILEDESC_SUNLOCK(fdp);=0A=20=09=09=09=09goto=20done;=0A= =20=09=09=09}=0Adiff=20--git=20a/src/sys/fs/nfsserver/nfs_nfsdport.c=20= b/src/sys/fs/nfsserver/nfs_nfsdport.c=0Aindex=20232e465..94fd81c=20= 100644=0A---=20a/src/sys/fs/nfsserver/nfs_nfsdport.c=0A+++=20= b/src/sys/fs/nfsserver/nfs_nfsdport.c=0A@@=20-3103,7=20+3103,7=20@@=20= fp_getfvp(struct=20thread=20*p,=20int=20fd,=20struct=20file=20**fpp,=20= struct=20vnode=20**vpp)=0A=20=0A=20=09fdp=20=3D=20p->td_proc->p_fd;=0A=20= =09if=20(fd=20>=3D=20fdp->fd_nfiles=20||=0A-=09=20=20=20=20(fp=20=3D=20= fdp->fd_ofiles[fd])=20=3D=3D=20NULL)=0A+=09=20=20=20=20(fp=20=3D=20= ftable_get(fdp,=20fd))=20=3D=3D=20NULL)=0A=20=09=09return=20(EBADF);=0A=20= =09*fpp=20=3D=20fp;=0A=20=09return=20(0);=0Adiff=20--git=20= a/src/sys/ifs/bam/bam_pctl.c=20b/src/sys/ifs/bam/bam_pctl.c=0Aindex=20= 6ce998e..b14472f=20100644=0A---=20a/src/sys/ifs/bam/bam_pctl.c=0A+++=20= b/src/sys/ifs/bam/bam_pctl.c=0A@@=20-2619,7=20+2619,7=20@@=20= pctl2_lin_open(struct=20thread=20*td,=20const=20struct=20gmp_info=20*gi,=0A= =20=09FILEDESC_SLOCK(fdp);=0A=20=09FILE_LOCK(fp);=0A=20=09if=20= (fp->f_count=20=3D=3D=201)=20{=0A-=09=09ASSERT(fdp->fd_ofiles[indx]=20!=3D= =20fp,=0A+=09=09ASSERT(ftable_get(fdp,=20indx)=20!=3D=20fp,=0A=20=09=09=20= =20=20=20"Open=20file=20descriptor=20lost=20all=20refs");=0A=20=09=09= FILE_UNLOCK(fp);=0A=20=09=09FILEDESC_SUNLOCK(fdp);=0Adiff=20--git=20= a/src/sys/ifs/bam/bam_vfsops.c=20b/src/sys/ifs/bam/bam_vfsops.c=0Aindex=20= b5efb2f..b72e184=20100644=0A---=20a/src/sys/ifs/bam/bam_vfsops.c=0A+++=20= b/src/sys/ifs/bam/bam_vfsops.c=0A@@=20-2019,7=20+2019,7=20@@=20= bam_busy_vnodes_sysctl(SYSCTL_HANDLER_ARGS)=0A=20=09=09=09for=20(i=20=3D=20= 0;=0A=20=09=09=09=20=20=20=20fdp->fd_refcnt=20>=200=20&&=20i=20<=20= fdp->fd_nfiles;=0A=20=09=09=09=20=20=20=20i++)=20{=0A-=09=09=09=09fp=20=3D= =20fdp->fd_ofiles[i];=0A+=09=09=09=09fp=20=3D=20ftable_get(fdp,=20i);=0A=20= =09=09=09=09if=20(fp=20=3D=3D=20NULL=20||=0A=20=09=09=09=09=20=20=20=20= fp->f_type=20!=3D=20DTYPE_VNODE=20||=0A=20=09=09=09=09=20=20=20=20= fp->f_vnode=20!=3D=20vp)=0A@@=20-2056,7=20+2056,7=20@@=20= bam_busy_vnodes_sysctl(SYSCTL_HANDLER_ARGS)=0A=20=09=09for=20(i=20=3D=20= 0;=0A=20=09=09=20=20=20=20fdp->fd_refcnt=20>=200=20&&=20i=20<=20= fdp->fd_nfiles;=0A=20=09=09=20=20=20=20i++)=20{=0A-=09=09=09fp=20=3D=20= fdp->fd_ofiles[i];=0A+=09=09=09fp=20=3D=20ftable_get(fdp,=20i);=0A=20=09=09= =09if=20(fp=20=3D=3D=20NULL=20||=0A=20=09=09=09=20=20=20=20fp->f_type=20= !=3D=20DTYPE_ISIEVENT)=0A=20=09=09=09=09continue;=0Adiff=20--git=20= a/src/sys/ifs/lock/lock_advisory.c=20b/src/sys/ifs/lock/lock_advisory.c=0A= index=20c40db3c..f34e2d7=20100644=0A---=20= a/src/sys/ifs/lock/lock_advisory.c=0A+++=20= b/src/sys/ifs/lock/lock_advisory.c=0A@@=20-257,7=20+257,7=20@@=20= adv_lock_owner_fmt_conv(struct=20fmt=20*fmt,=20const=20struct=20= fmt_conv_args=20*args,=0A=20=09=09=09continue;=0A=20=09=09if=20= (sx_try_slock(FILEDESC_LOCK(fdp)))=20{=0A=20=09=09=09for=20(n=20=3D=200;=20= n=20<=20fdp->fd_nfiles;=20n++)=20{=0A-=09=09=09=09if=20(fp=20=3D=3D=20= fdp->fd_ofiles[n])=20{=0A+=09=09=09=09if=20(fp=20=3D=3D=20= ftable_get(fdp,=20n))=20{=0A=20=09=09=09=09=09/*=20Match!=20Print=20it!=20= */=0A=20=09=09=09=09=09fmt_print(fmt,=20"\nflock=20%d:=20pid=20%d,=20= %s",=0A=20=09=09=09=09=09=20=20=20=20matches,=20p->p_pid,=20p->p_comm);=0A= diff=20--git=20a/src/sys/ifs/rbm/rbm_user_ipc.c=20= b/src/sys/ifs/rbm/rbm_user_ipc.c=0Aindex=2022b0630..06ce2da=20100644=0A= ---=20a/src/sys/ifs/rbm/rbm_user_ipc.c=0A+++=20= b/src/sys/ifs/rbm/rbm_user_ipc.c=0A@@=20-399,7=20+399,7=20@@=20= ifs_rbmuipc_open(struct=20thread=20*td,=20struct=20= ifs_rbmuipc_open_sysargs=20*uap)=0A=20=09fd=20=3D=20td->td_retval[0];=0A=20= =09FILEDESC_SLOCK(fdp);=0A=20=09if=20((unsigned=20int)fd=20>=20= fdp->fd_nfiles=20||=0A-=09=20=20=20=20(fp=20=3D=20fdp->fd_ofiles[fd])=20= =3D=3D=20NULL)=20{=0A+=09=20=20=20=20(fp=20=3D=20ftable_get(fdp,=20fd))=20= =3D=3D=20NULL)=20{=0A=20=09=09FILEDESC_SUNLOCK(fdp);=0A=20=09=09error=20= =3D=20EINVAL;=0A=20=09=09fp=20=3D=20NULL;=0A@@=20-424,8=20+424,8=20@@=20= out:=0A=20=09=09/*=20Close=20user's=20fp.=20*/=0A=20=09=09if=20(fp)=20{=0A= =20=09=09=09FILEDESC_XLOCK(fdp);=0A-=09=09=09if=20(fdp->fd_ofiles[fd]=20= =3D=3D=20fp)=20{=0A-=09=09=09=09fdp->fd_ofiles[fd]=20=3D=20NULL;=0A+=09=09= =09if=20(ftable_get(fdp,=20fd)=20=3D=3D=20fp)=20{=0A+=09=09=09=09= ftable_set(fdp,=20fd,=20NULL);=0A=20=09=09=09=09FILEDESC_XUNLOCK(fdp);=0A= =20=09=09=09=09fdrop(fp,=20td);=0A=20=09=09=09}=20else=0Adiff=20--git=20= a/src/sys/kern/kern_descrip.c=20b/src/sys/kern/kern_descrip.c=0Aindex=20= 6ce0356..1a34987=20100644=0A---=20a/src/sys/kern/kern_descrip.c=0A+++=20= b/src/sys/kern/kern_descrip.c=0A@@=20-112,9=20+112,8=20@@=20enum=20= dup_type=20{=20DUP_VARIABLE,=20DUP_FIXED=20};=0A=20=0A=20static=20int=20= do_dup(struct=20thread=20*td,=20enum=20dup_type=20type,=20int=20old,=20= int=20new,=0A=20=20=20=20=20register_t=20*retval);=0A-static=20int=09= fd_first_free(struct=20filedesc=20*,=20int,=20int);=0A+static=20int=09= fd_first_free(struct=20filedesc=20*,=20int);=0A=20static=20int=09= fd_last_used(struct=20filedesc=20*,=20int,=20int);=0A-static=20void=09= fdgrowtable(struct=20filedesc=20*,=20int);=0A=20static=20int=09= fdrop_locked(struct=20file=20*fp,=20struct=20thread=20*td);=0A=20static=20= void=09fdunused(struct=20filedesc=20*fdp,=20int=20fd);=0A=20static=20= void=09fdused(struct=20filedesc=20*fdp,=20int=20fd);=0A@@=20-134,10=20= +133,406=20@@=20static=20void=09fdused(struct=20filedesc=20*fdp,=20int=20= fd);=0A=20#define=20NDBIT(x)=09((NDSLOTTYPE)1=20<<=20((x)=20%=20= NDENTRIES))=0A=20#define=09NDSLOTS(x)=09(((x)=20+=20NDENTRIES=20-=201)=20= /=20NDENTRIES)=0A=20=0A-/*=0A-=20*=20Storage=20required=20per=20open=20= file=20descriptor.=0A+#define=20IDB_BLOCK_SIZE=20PAGE_SIZE=0A+#define=20= IDB_ENT_SIZE=20sizeof(uintptr_t)=0A+#define=20IDB_ENTS_PER_BLOCK=20= (IDB_BLOCK_SIZE/IDB_ENT_SIZE)=0A+=0A+/*=20May=20be=20a=20perf=20impact=20= on=2032-bit=20kernels.=20*/=0A+CTASSERT(NDSLOTSIZE=20=3D=3D=20= IDB_ENT_SIZE);=0A+=0A+/**=0A+=20*=20Return=20the=20index=20into=20the=20= indirect=20table=20given=20an=20entry.=0A+=20*/=0A+static=20inline=20int=0A= +idb_block_index(int=20ent)=0A+{=0A+=0A+=09return=20(ent=20/=20= IDB_ENTS_PER_BLOCK);=0A+}=0A+=0A+/**=0A+=20*=20Return=20offset=20into=20= an=20indirect=20block=20given=20an=20entry.=0A+=20*/=0A+static=20inline=20= int=0A+idb_block_off(int=20ent)=0A+{=0A+=0A+=09return=20(ent=20%=20= IDB_ENTS_PER_BLOCK);=0A+}=0A+=0A+/**=0A+=20*=20Return=201=20if=20the=20= indirect=20block=20table=20is=20flat,=20else=200.=0A+=20*/=0A+static=20= inline=20int=0A+idb_is_flat(struct=20idb_table=20*idb)=0A+{=0A+=0A+=09= return=20(idb->idb_nents=20<=3D=20IDB_ENTS_PER_BLOCK);=0A+}=0A+=0A+/**=0A= +=20*=20Return=20a=20pointer=20to=20the=20block.=20=20If=20the=20block=20= is=20sparse=20or=20ent=20is=20outside=0A+=20*=20the=20current=20size=20= of=20the=20table,=20return=20NULL.=0A+=20*/=0A+static=20inline=20void=20= *=0A+idb_block(struct=20idb_table=20*idb,=20int=20ent)=0A+{=0A+=0A+=09= return=20(ent=20>=3D=20idb->idb_nents=20?=20NULL=20:=0A+=09=20=20=20=20= idb->idb_tbl.indirect[idb_block_index(ent)]);=0A+}=0A+=0A+/**=0A+=20*=20= Initialize=20a=20new=20indirect=20table.=20=20The=20caller=20is=20= responsible=20for=20allocating=0A+=20*=20the=20idb=20struct,=20and=20= must=20provide=20an=20initial=20non-null=20flat=20table.=0A+=20*=0A+=20*=20= @param=20idb=09=09=20Indirect=20table=20to=20initialize.=0A+=20*=20= @param=20idb_flat=09=20Initial=20non-null=20table.=0A+=20*=20@param=20= idb_nents=09=20Number=20of=20entries=20in=20the=20initial=20flat=20= table.=0A+=20*/=0A+static=20void=0A+idb_init(struct=20idb_table=20*idb,=20= void=20*idb_flat,=20int=20idb_nents)=0A+{=0A+=0A+=09KASSERT(idb=20!=3D=20= NULL,=20("idb=20table=20must=20be=20allocated=20by=20caller"));=0A+=09= KASSERT(idb_flat=20!=3D=20NULL,=0A+=09=20=20=20=20("idb=20flat=20table=20= must=20be=20allocated=20by=20caller"));=0A+=0A+=09idb->idb_tbl.flat=20=3D=20= idb_flat;=0A+=09idb->idb_nents=20=3D=20idb_nents;=0A+=09= idb->idb_orig_nents=20=3D=20idb_nents;=0A+}=0A+=0A+/**=0A+=20*=20Free=20= all=20blocks=20associated=20with=20the=20indirect=20table.=0A+=20*/=0A= +static=20void=0A+idb_free(struct=20idb_table=20*idb)=0A+{=0A+=09int=20= indx;=0A+=09void=20*block;=0A+=0A+=09if=20(idb_is_flat(idb))=20{=0A+=09=09= if=20(idb->idb_nents=20>=20idb->idb_orig_nents)=0A+=09=09=09= free(idb->idb_tbl.flat,=20M_FILEDESC);=0A+=09=09return;=0A+=09}=0A+=0A+=09= /*=20Free=20indirect=20leaves.=20*/=0A+=09for=20(indx=20=3D=20= idb_block_index(0);=0A+=09=20=20=20=20=20indx=20<=20= idb_block_index(idb->idb_nents);=0A+=09=20=20=20=20=20indx++)=20{=0A+=09=09= block=20=3D=20idb->idb_tbl.indirect[indx];=0A+=09=09if=20(block=20!=3D=20= NULL)=0A+=09=09=09free(block,=20M_FILEDESC);=0A+=09}=0A+=0A+=09/*=20Free=20= indirect=20root.=20*/=0A+=09free(idb->idb_tbl.indirect,=20M_FILEDESC);=0A= +}=0A+=0A+/**=0A+=20*=20Return=20a=20pointer=20into=20the=20table/block=20= given=20an=20index.=0A+=20*/=0A+static=20void=20*=0A= +idb_get_entry(struct=20idb_table=20*idb,=20int=20ent)=0A+{=0A+=09void=20= *block;=0A+=0A+=09if=20(ent=20>=20idb->idb_nents)=0A+=09=09return=20= (NULL);=0A+=0A+=09if=20(idb_is_flat(idb))=0A+=09=09return=20= (((caddr_t)idb->idb_tbl.flat)=20+=20(ent=20*=20IDB_ENT_SIZE));=0A+=0A+=09= /*=20Indirect=20block.=20=20Return=20NULL=20for=20sparse=20blocks.=20*/=0A= +=09block=20=3D=20idb_block(idb,=20ent);=0A+=09if=20(block=20=3D=3D=20= NULL)=0A+=09=09return=20(NULL);=0A+=0A+=09return=20(((caddr_t)block)=20+=20= (idb_block_off(ent)=20*=20IDB_ENT_SIZE));=0A+}=0A+=0A+/**=0A+=20*=20If=20= the=20current=20table=20size=20doesn't=20accomodate=20the=20new=20number=20= of=20entries,=0A+=20*=20grow=20it=20to=20fit=20new_nents.=20=20Mult=20is=20= a=20multiplying=20factor=20used=20to=20check=20the=0A+=20*=20number=20of=20= entries=20in=20the=20table=20against=20new_nents=20which=20allows=20= growing=20the=0A+=20*=20flat=20table=20or=20the=20indirect=20table.=20=20= The=20current=20number=20of=20entries=20in=20the=0A+=20*=20table=20must=20= be=20a=20multiple=20of=20mult.=0A+=20*=0A+=20*=20@param=20idb=09=09Table=20= to=20grow.=0A+=20*=20@param=20new_nents=09Number=20of=20entries=20to=20= grow=20the=20table=20to.=0A+=20*=20@param=20mult=09=09Multiplier=20for=20= new_nents.=0A+=20*=20@param=20sx=09=09Exclusive=20lock=20that=20may=20be=20= dropped/reqacquired.=0A=20=20*/=0A-#define=20OFILESIZE=20(sizeof(struct=20= file=20*)=20+=20sizeof(char))=0A+static=20void=0A+idb_grow_table(struct=20= idb_table=20*idb,=20int=20new_nents,=20int=20mult,=20struct=20sx=20*sx)=0A= +{=0A+=09int=20old_nents;=0A+=09void=20*ntable;=0A+=0A+=09= KASSERT(idb->idb_nents=20%=20mult=20=3D=3D=200,=0A+=09=20=20=20=20("%d=20= is=20not=20a=20multiple=20of=20%d",=20idb->idb_nents,=20mult));=0A+=0A+=09= old_nents=20=3D=20idb->idb_nents=20/=20mult;=0A+=0A+=09/*=20Do=20nothing=20= if=20the=20table=20is=20already=20big=20enough.=20*/=0A+=09if=20= (old_nents=20>=20new_nents)=0A+=09=09return;=0A+=0A+=09sx_xunlock(sx);=0A= +=09ntable=20=3D=20malloc(new_nents=20*=20IDB_ENT_SIZE,=20M_FILEDESC,=0A= +=09=20=20=20=20M_ZERO=20|=20M_WAITOK);=0A+=09sx_xlock(sx);=0A+=0A+=09/*=20= Done=20if=20table=20grew=20when=20the=20lock=20was=20dropped.=20*/=0A+=09= if=20(idb->idb_nents=20/=20mult=20>=20new_nents)=20{=0A+=09=09= free(ntable,=20M_FILEDESC);=0A+=09=09return;=0A+=09}=0A+=0A+=09/*=20Copy=20= the=20data=20to=20the=20new=20table=20and=20fix=20up=20the=20pointers.=20= */=0A+=09bcopy(idb->idb_tbl.flat,=20ntable,=20old_nents=20*=20= IDB_ENT_SIZE);=0A+=09if=20(idb->idb_nents=20>=20idb->idb_orig_nents)=0A+=09= =09free(idb->idb_tbl.flat,=20M_FILEDESC);=0A+=09idb->idb_tbl.flat=20=3D=20= ntable;=0A+=09idb->idb_nents=20=3D=20new_nents=20*=20mult;=0A+}=0A+=0A= +/**=0A+=20*=20Transition=20a=20flat=20table=20to=20an=20indirect=20= block=20table.=0A+=20*=0A+=20*=20@param=20idb=09Table=20to=20transition.=0A= +=20*=20@param=20sx=09Exclusive=20lock=20that=20may=20be=20= dropped/reqacquired.=0A+=20*/=0A+static=20void=0A= +idb_transition_to_indirect(struct=20idb_table=20*idb,=20struct=20sx=20= *sx)=0A+{=0A+=09void=20**ntable=20=3D=20NULL;=0A+=0A+=09= KASSERT(idb->idb_nents=20>=3D=20IDB_ENTS_PER_BLOCK,=0A+=09=20=20=20=20= ("Insufficient=20size=20for=20indirect=20transition:=20%d",=20= idb->idb_nents));=0A+=0A+=09/*=20Done=20if=20the=20table=20has=20already=20= transitioned.=20*/=0A+=09if=20(idb->idb_nents=20>=20IDB_ENTS_PER_BLOCK)=20= {=0A+=09=09return;=0A+=09}=0A+=0A+=09sx_xunlock(sx);=0A+=09ntable=20=3D=20= malloc(IDB_BLOCK_SIZE,=20M_FILEDESC,=0A+=09=09=20=20=20=20M_ZERO=20|=20= M_WAITOK);=0A+=09sx_xlock(sx);=0A+=0A+=09/*=20Done=20if=20indirect=20= transition=20done=20when=20the=20lock=20was=20dropped.=20*/=0A+=09if=20= (idb->idb_nents=20>=20IDB_ENTS_PER_BLOCK)=20{=0A+=09=09free(ntable,=20= M_FILEDESC);=0A+=09=09return;=0A+=09}=0A+=0A+=09/*=20Make=20indirect=20= transition.=20*/=0A+=09ntable[0]=20=3D=20idb->idb_tbl.flat;=0A+=09= idb->idb_tbl.indirect=20=3D=20ntable;=0A+=09idb->idb_nents=20=3D=20= IDB_ENTS_PER_BLOCK=20*=20IDB_ENTS_PER_BLOCK;=0A+}=0A+=0A+/**=0A+=20*=20= Allocates=20an=20indirect=20block=20in=20the=20table=20if=20one=20= doesn't=20already=20exist=20for=0A+=20*=20new_ent.=0A+=20*=0A+=20*=20= @param=20idb=09=09Table=20to=20ensure=20new_ent=20has=20an=20indirect=20= block=20in.=0A+=20*=20@param=20new_ent=09New=20entry=20index=20to=20= create=20indirect=20block=20for.=0A+=20*=20@param=20sx=09=09Exclusive=20= lock=20that=20may=20be=20dropped/reqacquired.=0A+=20*/=0A+static=20void=0A= +idb_ensure_indirect_block(struct=20idb_table=20*idb,=20int=20new_ent,=20= struct=20sx=20*sx)=0A+{=0A+=09void=20*nblock=20=3D=20NULL;=0A+=0A+=09= KASSERT(new_ent=20<=20idb->idb_nents,=0A+=09=20=20=20=20("Table=20too=20= small=20(%d)=20for=20indirect=20block=20at=20index=20%d",=0A+=09=09= idb->idb_nents,=20new_ent));=0A+=0A+=09/*=20Done=20if=20the=20block=20is=20= already=20allocated.=20*/=0A+=09if=20(idb_block(idb,=20new_ent)=20!=3D=20= NULL)=0A+=09=09return;=0A+=0A+=09sx_xunlock(sx);=0A+=09nblock=20=3D=20= malloc(IDB_BLOCK_SIZE,=20M_FILEDESC,=20M_ZERO=20|=20M_WAITOK);=0A+=09= sx_xlock(sx);=0A+=0A+=09/*=20Done=20if=20block=20was=20allocated=20when=20= the=20lock=20was=20dropped.=20*/=0A+=09if=20(idb_block(idb,=20new_ent)=20= !=3D=20NULL)=20{=0A+=09=09free(nblock,=20M_FILEDESC);=0A+=09=09return;=0A= +=09}=0A+=0A+=09idb->idb_tbl.indirect[idb_block_index(new_ent)]=20=3D=20= nblock;=0A+}=0A+=0A+/**=0A+=20*=20idb_ensure_size()=20guarantees=20that:=0A= +=20*=20=201.=20If=20the=20table=20is=20flat,=20the=20table=20will=20be=20= made=20large=20enough=20for=20new_ent,=0A+=20*=20=20=20=20=20possibly=20= being=20transitioned=20to=20an=20indirect=20table.=0A+=20*=0A+=20*=20=20= 2.=20If=20the=20table=20is=20indirect,=20the=20indirect=20table=20is=20= large=20enough=20to=20have=20an=0A+=20*=20=20=20=20=20entry=20to=20point=20= to=20the=20indirect=20block,=20and=20the=20indirect=20block=20itself=20= is=0A+=20*=20=20=20=20=20allocated.=0A+=20*=0A+=20*=20The=20sx=20lock=20= will=20be=20released=20if=20new=20memory=20needs=20to=20be=20allocated,=20= but=20will=0A+=20*=20be=20reacquired=20before=20returning.=0A+=20*=0A+=20= *=20@param=20idb=09=09Table=20to=20ensure=20new_ent=20fits=20in.=0A+=20*=20= @param=20new_ent=09New=20entry=20index.=0A+=20*=20@param=20maxsize=09Max=20= size=20of=20the=20table=20so=20excess=20memory=20isn't=20used.=0A+=20*=20= @param=20sx=09=09Exclusive=20lock=20that=20may=20be=20= dropped/reqacquired.=0A+=20*/=0A+static=20void=0A+idb_ensure_size(struct=20= idb_table=20*idb,=20int=20new_ent,=20int=20maxsize,=20struct=20sx=20*sx)=0A= +{=0A+=09KASSERT(idb->idb_nents=20>=200,=20("zero-length=20idb=20= table"));=0A+=09KASSERT(new_ent=20<=20maxsize,=0A+=09=20=20=20=20= ("new_ent(%d)=20>=3D=20maxsize(%d)",=20new_ent,=20maxsize));=0A+=0A+=09= sx_assert(sx,=20SX_XLOCKED=20|=20SX_NOTRECURSED);=0A+=0A+=09/*=20Grow=20= table=202x=20while=20it=20is=20flat.=20*/=0A+=09if=20(idb_is_flat(idb)=20= &&=20new_ent=20<=20IDB_ENTS_PER_BLOCK)=20{=0A+=09=09if=20(new_ent=20>=3D=20= idb->idb_nents)=20{=0A+=09=09=09KASSERT(new_ent=20>=200,=20("Negative=20= new_ent=20%d",=20new_ent));=0A+=09=09=09/*=20Round=20up=20to=20power=20= of=202=20to=20appease=20the=20allocator.=20*/=0A+=09=09=09= idb_grow_table(idb,=20min(min(1=20<<=20(fls(new_ent)),=0A+=09=09=09=09=20= =20=20=20IDB_ENTS_PER_BLOCK),=20maxsize),=201,=20sx);=0A+=09=09}=0A+=09=09= return;=0A+=09}=0A+=0A+=09/*=20Transition=20flat=20table=20to=20= indirect.=20*/=0A+=09if=20(idb_is_flat(idb)=20&&=20new_ent=20>=3D=20= IDB_ENTS_PER_BLOCK)=20{=0A+=09=09idb_grow_table(idb,=20= IDB_ENTS_PER_BLOCK,=201,=20sx);=0A+=09=09idb_transition_to_indirect(idb,=20= sx);=0A+=09}=0A+=0A+=09/*=20Grow=20size=20of=20indirect=20table.=20*/=0A= +=09if=20(new_ent=20>=3D=20idb->idb_nents)=20{=0A+=09=09int=20= grow_factor,=20new_nents;=0A+=09=09/*=20Need=20to=20grow=20the=20= indirect=20table.=20*/=0A+=09=09for=20(grow_factor=20=3D=202;;=20= grow_factor=20<<=3D=201)=20{=0A+=09=09=09if=20= (idb_block_index(idb->idb_nents)=20*=20grow_factor=20>=0A+=09=09=09=20=20= =20=20idb_block_index(new_ent))=0A+=09=09=09=09break;=0A+=09=09}=0A+=09=09= new_nents=20=3D=20min(idb_block_index(idb->idb_nents)=20*=20grow_factor,=0A= +=09=09=20=20=20=20idb_block_index(maxsize));=0A+=09=09= idb_grow_table(idb,=20new_nents,=20IDB_ENTS_PER_BLOCK,=20sx);=0A+=09}=0A= +=0A+=09/*=20Ensure=20block=20is=20allocated=20in=20sparse=20table.=20*/=0A= +=09idb_ensure_indirect_block(idb,=20new_ent,=20sx);=0A+}=0A+=0A+/**=0A+=20= *=20Get=20the=20file=20struct=20for=20an=20fd=20from=20the=20ftable.=0A+=20= *=0A+=20*=20@return=20The=20file=20struct=20for=20a=20particular=20or=20= NULL.=0A+=20*/=0A+struct=20file=20*=0A+ftable_get(struct=20filedesc=20= *fdp,=20int=20fd)=0A+{=0A+=09struct=20file=20**fpp;=0A+=0A+=09= FILEDESC_LOCK_ASSERT(fdp);=0A+=0A+=09fpp=20=3D=20= idb_get_entry(&fdp->fd_files,=20fd);=0A+=09return=20(fpp=20!=3D=20NULL=20= ?=20*fpp=20:=20NULL);=0A+}=0A+=0A+/**=0A+=20*=20Set=20an=20entry=20in=20= the=20table=20to=20point=20to=20a=20struct=20file.=20=20= ftable_ensure_fd()=0A+=20*=20must=20be=20first=20called=20to=20ensure=20= the=20underlying=20data=20structure=20can=20support=0A+=20*=20this=20= entry.=0A+=20*/=0A+void=0A+ftable_set(struct=20filedesc=20*fdp,=20int=20= fd,=20struct=20file=20*fp)=0A+{=0A+=09struct=20file=20**fpp;=0A+=0A+=09= FILEDESC_XLOCK_ASSERT(fdp);=0A+=0A+=09fpp=20=3D=20= idb_get_entry(&fdp->fd_files,=20fd);=0A+=09KASSERT(fpp=20!=3D=20NULL,=20= ("Trying=20to=20set=20unallocated=20entry"));=0A+=09*fpp=20=3D=20fp;=0A= +}=0A+=0A+/**=0A+=20*=20Get=20the=20close=20exec=20state=20of=20a=20file=20= descriptor.=0A+=20*=0A+=20*=20@return=201=20if=20close=20exec=20is=20= set,=20otherwise=200.=0A+=20*/=0A+int=0A+ftable_get_cloexec(struct=20= filedesc=20*fdp,=20int=20fd)=0A+{=0A+=09NDSLOTTYPE=20*map;=0A+=0A+=09= FILEDESC_LOCK_ASSERT(fdp);=0A+=0A+=09map=20=3D=20= idb_get_entry(&fdp->fd_cloexec,=20NDSLOT(fd));=0A+=09if=20(map=20=3D=3D=20= NULL)=0A+=09=09return=20(0);=0A+=0A+=09return=20((*map=20&=20NDBIT(fd))=20= !=3D=200);=0A+}=0A+=0A+/**=0A+=20*=20Set=20the=20close=20exec=20state=20= of=20a=20file=20descriptor.=0A+=20*=0A+=20*=20@param=20on=091:=20close=20= exec=20state=20will=20be=20turned=20on.=0A+=20*=09=090:=20close=20exec=20= state=20will=20be=20turned=20off.=0A+=20*/=0A+void=0A= +ftable_set_cloexec(struct=20filedesc=20*fdp,=20int=20fd,=20int=20on)=0A= +{=0A+=09NDSLOTTYPE=20*map;=0A+=0A+=09FILEDESC_XLOCK_ASSERT(fdp);=0A+=0A= +=09map=20=3D=20idb_get_entry(&fdp->fd_cloexec,=20NDSLOT(fd));=0A+=09= KASSERT(map=20!=3D=20NULL,=20("trying=20to=20set=20cloexec=20on=20an=20= unallocated=20file"));=0A+=0A+=09if=20(on)=0A+=09=09*map=20|=3D=20= NDBIT(fd);=0A+=09else=0A+=09=09*map=20&=3D=20~NDBIT(fd);=0A+}=0A+=0A+/**=0A= +=20*=20If=20the=20ftable=20is=20already=20large=20enough=20to=20store=20= the=20fd,=20then=20simply=20return.=0A+=20*=20Otherwise,=20allocate=20= the=20necessary=20blocks=20to=20accomodate=20the=20new=20fd.=20=20This=0A= +=20*=20allows=20for=20a=20sparse=20table.=20=20May=20malloc=20new=20= blocks=20requiring=20the=20fdp=20lock=20to=0A+=20*=20be=20dropped=20and=20= reacquired.=0A+=20*=0A+=20*=20@param=20nfd=09File=20descriptor=20to=20= possilbly=20grow=20the=20table=20to=20fit.=0A+=20*=20@param=20maxfd=09= Maximum=20fd=20so=20excess=20memory=20isn't=20used.=0A+=20*/=0A+static=20= void=0A+ftable_ensure_fd(struct=20filedesc=20*fdp,=20int=20nfd,=20int=20= maxfd)=0A+{=0A+=09FILEDESC_XLOCK_ASSERT(fdp);=0A+=0A+=09KASSERT(nfd=20<=3D= =20maxfd,=20("nfd(%d)=20>=20maxfd(%d)",=20nfd,=20maxfd));=0A+=0A+=09= idb_ensure_size(&fdp->fd_files,=20nfd,=20maxfd=20+=201,=20&fdp->fd_sx);=0A= +=09idb_ensure_size(&fdp->fd_map,=20NDSLOT(nfd),=20NDSLOT(maxfd)=20+=20= 1,=0A+=09=20=20=20=20&fdp->fd_sx);=0A+=09= idb_ensure_size(&fdp->fd_cloexec,=20NDSLOT(nfd),=20NDSLOT(maxfd)=20+=20= 1,=0A+=09=20=20=20=20&fdp->fd_sx);=0A+=0A+=09/*=0A+=09=20*=20ft_map=20= and=20ft_cloexec=20grow=20at=20the=20same=20rate,=20but=20ft_files=20= grows=20at=0A+=09=20*=20a=20different=20rate,=20so=20advertise=20table=20= size=20as=20the=20min.=0A+=09=20*/=0A+=09fdp->fd_nfiles=20=3D=20= min(fdp->fd_files.idb_nents,=0A+=09=20=20=20=20fdp->fd_map.idb_nents=20*=20= NDENTRIES);=0A+}=0A=20=0A=20/*=0A=20=20*=20Basic=20allocation=20of=20= descriptors:=0A@@=20-150,8=20+545,8=20@@=20struct=20filedesc0=20{=0A=20=09= =20*=20<=3D=20NDFILE,=20and=20are=20then=20pointed=20to=20by=20the=20= pointers=20above.=0A=20=09=20*/=0A=20=09struct=09file=20= *fd_dfiles[NDFILE];=0A-=09char=09fd_dfileflags[NDFILE];=0A=20=09= NDSLOTTYPE=20fd_dmap[NDSLOTS(NDFILE)];=0A+=09NDSLOTTYPE=20= fd_dcloexec[NDSLOTS(NDFILE)];=0A=20};=0A=20=0A=20/*=0A@@=20-166,14=20= +561,13=20@@=20void=09(*mq_fdclose)(struct=20thread=20*td,=20int=20fd,=20= struct=20file=20*fp);=0A=20/*=20A=20mutex=20to=20protect=20the=20= association=20between=20a=20proc=20and=20filedesc.=20*/=0A=20static=20= struct=20mtx=09fdesc_mtx;=0A=20=0A-/*=0A-=20*=20Find=20the=20first=20= zero=20bit=20in=20the=20given=20bitmap,=20starting=20at=20low=20and=20= not=0A-=20*=20exceeding=20size=20-=201.=0A+/**=0A+=20*=20Iterate=20a=20= flat=20array=20searching=20for=20the=20first=20zero=20bit=20in=20the=20= given=20bitmap,=0A+=20*=20starting=20at=20low=20and=20not=20exceeding=20= size=20-=201.=0A=20=20*/=0A=20static=20int=0A-fd_first_free(struct=20= filedesc=20*fdp,=20int=20low,=20int=20size)=0A= +fd_first_free_block(NDSLOTTYPE=20*map,=20int=20low,=20int=20size)=0A=20= {=0A-=09NDSLOTTYPE=20*map=20=3D=20fdp->fd_map;=0A=20=09NDSLOTTYPE=20= mask;=0A=20=09int=20off,=20maxoff;=0A=20=0A@@=20-193,14=20+587,61=20@@=20= fd_first_free(struct=20filedesc=20*fdp,=20int=20low,=20int=20size)=0A=20=09= return=20(size);=0A=20}=0A=20=0A+/**=0A+=20*=20Iterate=20the=20indirect=20= block=20table=20fd=20map=20searching=20for=20the=20first=20free=20fd,=0A= +=20*=20starting=20at=20low.=20=20Return=20the=20current=20number=20of=20= entries=20in=20the=20table=20if=20none=0A+=20*=20are=20free.=0A+=20*/=0A= +static=20int=0A+fd_first_free(struct=20filedesc=20*fdp,=20int=20low)=0A= +{=0A+=09struct=20idb_table=20*idb=20=3D=20&fdp->fd_map;=0A+=09= NDSLOTTYPE=20*block;=0A+=09int=20indx;=0A+=0A+=09= FILEDESC_LOCK_ASSERT(fdp);=0A+=0A+=09/*=20Flat=20table.=20*/=0A+=09if=20= (idb_is_flat(idb))=0A+=09=09return=20= (fd_first_free_block(idb->idb_tbl.flat,=20low,=0A+=09=09=09= idb->idb_nents=20*=20NDENTRIES));=0A+=0A+=09/*=20Loop=20through=20the=20= indirect=20blocks.=20*/=0A+=09for=20(indx=20=3D=20= idb_block_index(NDSLOT(low));=0A+=09=20=20=20=20=20indx=20<=20= idb_block_index(idb->idb_nents);=0A+=09=20=20=20=20=20indx++)=20{=0A+=09=09= int=20block_low,=20free_ent;=0A+=0A+=09=09block=20=3D=20= idb->idb_tbl.indirect[indx];=0A+=09=09if=20(block=20=3D=3D=20NULL)=20{=0A= +=09=09=09/*=20Unallocated=20block,=20so=20the=20first=20index=20is=20= fine.=20*/=0A+=09=09=09free_ent=20=3D=20indx=20*=20IDB_ENTS_PER_BLOCK=20= *=20NDENTRIES;=0A+=09=09=09return=20(max(free_ent,=20low));=0A+=09=09}=0A= +=0A+=09=09/*=20Scan=20block,=20starting=20mid-block=20if=20necessary.=20= */=0A+=09=09block_low=20=3D=20(indx=20=3D=3D=20= idb_block_index(NDSLOT(low)))=20?=0A+=09=09=20=20=20=20= idb_block_off(NDSLOT(low))=20*=20NDENTRIES=20:=200;=0A+=09=09free_ent=20= =3D=20fd_first_free_block(block,=20block_low,=0A+=09=09=20=20=20=20= IDB_ENTS_PER_BLOCK=20*=20NDENTRIES);=0A+=0A+=09=09/*=20If=20there=20was=20= a=20free=20fd,=20return=20it.=20*/=0A+=09=09if=20(free_ent=20<=20= IDB_ENTS_PER_BLOCK=20*=20NDENTRIES)=0A+=09=09=09return=20(indx=20*=20= IDB_ENTS_PER_BLOCK=20*=20NDENTRIES=20+=0A+=09=09=09=20=20=20=20= free_ent);=0A+=09}=0A+=0A+=09/*=20No=20free=20fds=20found.=20*/=0A+=09= return=20(idb->idb_nents);=0A+}=0A+=0A=20/*=0A=20=20*=20Find=20the=20= highest=20non-zero=20bit=20in=20the=20given=20bitmap,=20starting=20at=20= low=20and=0A=20=20*=20not=20exceeding=20size=20-=201.=0A=20=20*/=0A=20= static=20int=0A-fd_last_used(struct=20filedesc=20*fdp,=20int=20low,=20= int=20size)=0A+fd_last_used_block(NDSLOTTYPE=20*map,=20int=20low,=20int=20= size)=0A=20{=0A-=09NDSLOTTYPE=20*map=20=3D=20fdp->fd_map;=0A=20=09= NDSLOTTYPE=20mask;=0A=20=09int=20off,=20minoff;=0A=20=0A@@=20-220,12=20= +661,65=20@@=20fd_last_used(struct=20filedesc=20*fdp,=20int=20low,=20int=20= size)=0A=20=09return=20(low=20-=201);=0A=20}=0A=20=0A+/**=0A+=20*=20= Iterate=20the=20indirect=20block=20table=20fd=20map=20searching=20for=20= the=20highest=20non-zero=0A+=20*=20bit,=20starting=20at=20low=20and=20= not=20exceeding=20size=20-=201.=20=20Return=20low=20-1=20if=20no=20fds=0A= +=20*=20>=3D=20low=20are=20used.=0A+=20*/=0A+static=20int=0A= +fd_last_used(struct=20filedesc=20*fdp,=20int=20low,=20int=20size)=0A+{=0A= +=09struct=20idb_table=20*idb=20=3D=20&fdp->fd_map;=0A+=09NDSLOTTYPE=20= *block;=0A+=09int=20indx;=0A+=0A+=09FILEDESC_LOCK_ASSERT(fdp);=0A+=0A+=09= /*=20Flat=20table.=20*/=0A+=09if=20(idb_is_flat(idb))=0A+=09=09return=20= (fd_last_used_block(idb->idb_tbl.flat,=20low,=20size));=0A+=0A+=09/*=20= Loop=20through=20the=20indirect=20blocks=20backwards.=20*/=0A+=09for=20= (indx=20=3D=20idb_block_index(NDSLOT(size));=0A+=09=20=20=20=20=20indx=20= >=3D=20idb_block_index(NDSLOT(low));=0A+=09=20=20=20=20=20indx--)=20{=0A= +=09=09int=20block_low,=20block_high,=20used_ent;=0A+=0A+=09=09block=20=3D= =20idb->idb_tbl.indirect[indx];=0A+=09=09/*=20If=20the=20block=20is=20= sparse,=20move=20onto=20the=20next=20one.=20*/=0A+=09=09if=20(block=20=3D=3D= =20NULL)=0A+=09=09=09continue;=0A+=0A+=09=09/*=20Scan=20block,=20= starting/ending=20mid-block=20if=20necessary.=20*/=0A+=09=09block_low=20= =3D=20(indx=20=3D=3D=20idb_block_index(NDSLOT(low)))=20?=0A+=09=09=20=20=20= =20idb_block_off(NDSLOT(low))=20*=20NDENTRIES=20:=200;=0A+=09=09= block_high=20=3D=20(indx=20=3D=3D=20idb_block_index(NDSLOT(size)))=20?=0A= +=09=09=20=20=20=20idb_block_off(NDSLOT(size))=20*=20NDENTRIES=20:=0A+=09= =09=20=20=20=20IDB_ENTS_PER_BLOCK;=0A+=09=09used_ent=20=3D=20= fd_last_used_block(block,=20block_low,=20block_high);=0A+=0A+=09=09/*=20= If=20there=20was=20a=20used=20fd,=20return=20it.=20*/=0A+=09=09if=20= (used_ent=20>=3D=20block_low)=0A+=09=09=09return=20(indx=20*=20= IDB_ENTS_PER_BLOCK=20*=20NDENTRIES=20+=0A+=09=09=09=20=20=20=20= used_ent);=0A+=09}=0A+=0A+=09/*=20No=20used=20fds=20found.=20*/=0A+=09= return=20(low=20-=201);=0A+}=0A+=0A=20static=20int=0A=20fdisused(struct=20= filedesc=20*fdp,=20int=20fd)=0A=20{=0A+=09NDSLOTTYPE=20*map;=0A+=0A+=09= FILEDESC_LOCK_ASSERT(fdp);=0A=20=20=20=20=20=20=20=20=20KASSERT(fd=20>=3D=20= 0=20&&=20fd=20<=20fdp->fd_nfiles,=0A=20=20=20=20=20=20=20=20=20=20=20=20=20= ("file=20descriptor=20%d=20out=20of=20range=20(0,=20%d)",=20fd,=20= fdp->fd_nfiles));=0A-=09return=20((fdp->fd_map[NDSLOT(fd)]=20&=20= NDBIT(fd))=20!=3D=200);=0A+=0A+=09map=20=3D=20= idb_get_entry(&fdp->fd_map,=20NDSLOT(fd));=0A+=0A+=09return=20(map=20&&=20= (*map=20&=20NDBIT(fd))=20!=3D=200);=0A=20}=0A=20=0A=20/*=0A@@=20-234,16=20= +728,19=20@@=20fdisused(struct=20filedesc=20*fdp,=20int=20fd)=0A=20= static=20void=0A=20fdused(struct=20filedesc=20*fdp,=20int=20fd)=0A=20{=0A= +=09NDSLOTTYPE=20*map;=0A=20=0A=20=09FILEDESC_XLOCK_ASSERT(fdp);=0A-=09= KASSERT(!fdisused(fdp,=20fd),=0A-=09=20=20=20=20("fd=20already=20= used"));=0A+=09KASSERT(!fdisused(fdp,=20fd),=20("fd=20already=20used"));=0A= =20=0A-=09fdp->fd_map[NDSLOT(fd)]=20|=3D=20NDBIT(fd);=0A+=09map=20=3D=20= idb_get_entry(&fdp->fd_map,=20NDSLOT(fd));=0A+=09KASSERT(map=20!=3D=20= NULL,=20("Map=20block=20is=20NULL"));=0A+=0A+=09*map=20|=3D=20NDBIT(fd);=0A= =20=09if=20(fd=20>=20fdp->fd_lastfile)=0A=20=09=09fdp->fd_lastfile=20=3D=20= fd;=0A=20=09if=20(fd=20=3D=3D=20fdp->fd_freefile)=0A-=09=09= fdp->fd_freefile=20=3D=20fd_first_free(fdp,=20fd,=20fdp->fd_nfiles);=0A+=09= =09fdp->fd_freefile=20=3D=20fd_first_free(fdp,=20fd);=0A=20}=0A=20=0A=20= /*=0A@@=20-253,13=20+750,19=20@@=20static=20void=0A=20fdunused(struct=20= filedesc=20*fdp,=20int=20fd)=0A=20{=0A=20=0A+=09NDSLOTTYPE=20*map;=0A+=0A= =20=09FILEDESC_XLOCK_ASSERT(fdp);=0A=20=09KASSERT(fdisused(fdp,=20fd),=0A= =20=09=20=20=20=20("fd=20is=20already=20unused"));=0A-=09= KASSERT(fdp->fd_ofiles[fd]=20=3D=3D=20NULL,=0A+=09= KASSERT(ftable_get(fdp,=20fd)=20=3D=3D=20NULL,=0A=20=09=20=20=20=20("fd=20= is=20still=20in=20use"));=0A=20=0A-=09fdp->fd_map[NDSLOT(fd)]=20&=3D=20= ~NDBIT(fd);=0A+=09map=20=3D=20idb_get_entry(&fdp->fd_map,=20NDSLOT(fd));=0A= +=09KASSERT(map=20!=3D=20NULL,=20("Map=20block=20is=20NULL"));=0A+=0A+=09= *map=20&=3D=20~NDBIT(fd);=0A+=0A=20=09if=20(fd=20<=20fdp->fd_freefile)=0A= =20=09=09fdp->fd_freefile=20=3D=20fd;=0A=20=09if=20(fd=20=3D=3D=20= fdp->fd_lastfile)=0A@@=20-410,7=20+913,7=20@@=20fdtofp(int=20fd,=20= struct=20filedesc=20*fdp)=0A=20=0A=20=09FILEDESC_LOCK_ASSERT(fdp);=0A=20=09= if=20((unsigned)fd=20>=3D=20fdp->fd_nfiles=20||=0A-=09=20=20=20=20(fp=20= =3D=20fdp->fd_ofiles[fd])=20=3D=3D=20NULL)=0A+=09=20=20=20=20(fp=20=3D=20= ftable_get(fdp,=20fd))=20=3D=3D=20NULL)=0A=20=09=09return=20(NULL);=0A=20= =09return=20(fp);=0A=20}=0A@@=20-422,7=20+925,6=20@@=20kern_fcntl(struct=20= thread=20*td,=20int=20fd,=20int=20cmd,=20intptr_t=20arg)=0A=20=09struct=20= flock=20*flp;=0A=20=09struct=20file=20*fp;=0A=20=09struct=20proc=20*p;=0A= -=09char=20*pop;=0A=20=09struct=20vnode=20*vp;=0A=20=09u_int=20newmin;=0A= =20=09int=20error,=20flg,=20tmp;=0A@@=20-467,8=20+969,8=20@@=20= kern_fcntl(struct=20thread=20*td,=20int=20fd,=20int=20cmd,=20intptr_t=20= arg)=0A=20=09=09=09error=20=3D=20EBADF;=0A=20=09=09=09break;=0A=20=09=09= }=0A-=09=09pop=20=3D=20&fdp->fd_ofileflags[fd];=0A-=09=09= td->td_retval[0]=20=3D=20(*pop=20&=20UF_EXCLOSE)=20?=20FD_CLOEXEC=20:=20= 0;=0A+=09=09td->td_retval[0]=20=3D=20ftable_get_cloexec(fdp,=20fd)=20?=0A= +=09=09=20=20=20=20FD_CLOEXEC=20:0;=0A=20=09=09FILEDESC_SUNLOCK(fdp);=0A=20= =09=09break;=0A=20=0A@@=20-479,9=20+981,7=20@@=20kern_fcntl(struct=20= thread=20*td,=20int=20fd,=20int=20cmd,=20intptr_t=20arg)=0A=20=09=09=09= error=20=3D=20EBADF;=0A=20=09=09=09break;=0A=20=09=09}=0A-=09=09pop=20=3D=20= &fdp->fd_ofileflags[fd];=0A-=09=09*pop=20=3D=20(*pop=20&~=20UF_EXCLOSE)=20= |=0A-=09=09=20=20=20=20(arg=20&=20FD_CLOEXEC=20?=20UF_EXCLOSE=20:=200);=0A= +=09=09ftable_set_cloexec(fdp,=20fd,=20arg=20&=20FD_CLOEXEC);=0A=20=09=09= FILEDESC_XUNLOCK(fdp);=0A=20=09=09break;=0A=20=0A@@=20-651,7=20+1151,7=20= @@=20kern_fcntl(struct=20thread=20*td,=20int=20fd,=20int=20cmd,=20= intptr_t=20arg)=0A=20=09=09/*=20Check=20for=20race=20with=20close=20*/=0A= =20=09=09FILEDESC_SLOCK(fdp);=0A=20=09=09if=20((unsigned)=20fd=20>=3D=20= fdp->fd_nfiles=20||=0A-=09=09=20=20=20=20fp=20!=3D=20fdp->fd_ofiles[fd])=20= {=0A+=09=09=20=20=20=20fp=20!=3D=20ftable_get(fdp,=20fd))=20{=0A=20=09=09= =09FILEDESC_SUNLOCK(fdp);=0A=20=09=09=09flp->l_whence=20=3D=20SEEK_SET;=0A= =20=09=09=09flp->l_start=20=3D=200;=0A@@=20-750,7=20+1250,7=20@@=20= do_dup(struct=20thread=20*td,=20enum=20dup_type=20type,=20int=20old,=20= int=20new,=0A=20=09=09return=20(EMFILE);=0A=20=0A=20=09= FILEDESC_XLOCK(fdp);=0A-=09if=20(old=20>=3D=20fdp->fd_nfiles=20||=20= fdp->fd_ofiles[old]=20=3D=3D=20NULL)=20{=0A+=09if=20(old=20>=3D=20= fdp->fd_nfiles=20||=20ftable_get(fdp,=20old)=20=3D=3D=20NULL)=20{=0A=20=09= =09FILEDESC_XUNLOCK(fdp);=0A=20=09=09return=20(EBADF);=0A=20=09}=0A@@=20= -759,7=20+1259,7=20@@=20do_dup(struct=20thread=20*td,=20enum=20dup_type=20= type,=20int=20old,=20int=20new,=0A=20=09=09FILEDESC_XUNLOCK(fdp);=0A=20=09= =09return=20(0);=0A=20=09}=0A-=09fp=20=3D=20fdp->fd_ofiles[old];=0A+=09= fp=20=3D=20ftable_get(fdp,=20old);=0A=20=09fhold(fp);=0A=20=0A=20=09/*=0A= @@=20-770,9=20+1270,8=20@@=20do_dup(struct=20thread=20*td,=20enum=20= dup_type=20type,=20int=20old,=20int=20new,=0A=20=09=20*=20out=20for=20a=20= race.=0A=20=09=20*/=0A=20=09if=20(type=20=3D=3D=20DUP_FIXED)=20{=0A-=09=09= if=20(new=20>=3D=20fdp->fd_nfiles)=0A-=09=09=09fdgrowtable(fdp,=20new=20= +=201);=0A-=09=09if=20(fdp->fd_ofiles[new]=20=3D=3D=20NULL)=0A+=09=09= ftable_ensure_fd(fdp,=20new,=20maxfd);=0A+=09=09if=20(ftable_get(fdp,=20= new)=20=3D=3D=20NULL)=0A=20=09=09=09fdused(fdp,=20new);=0A=20=09}=20else=20= {=0A=20=09=09if=20((error=20=3D=20fdalloc(td,=20new,=20&new))=20!=3D=20= 0)=20{=0A@@=20-787,9=20+1286,9=20@@=20do_dup(struct=20thread=20*td,=20= enum=20dup_type=20type,=20int=20old,=20int=20new,=0A=20=09=20*=20bad=20= file=20descriptor.=20=20Userland=20should=20do=20its=20own=20locking=20= to=0A=20=09=20*=20avoid=20this=20case.=0A=20=09=20*/=0A-=09if=20= (fdp->fd_ofiles[old]=20!=3D=20fp)=20{=0A+=09if=20(ftable_get(fdp,=20old)=20= !=3D=20fp)=20{=0A=20=09=09/*=20we've=20allocated=20a=20descriptor=20= which=20we=20won't=20use=20*/=0A-=09=09if=20(fdp->fd_ofiles[new]=20=3D=3D=20= NULL)=0A+=09=09if=20(ftable_get(fdp,=20new)=20=3D=3D=20NULL)=0A=20=09=09=09= fdunused(fdp,=20new);=0A=20=09=09FILEDESC_XUNLOCK(fdp);=0A=20=09=09= fdrop(fp,=20td);=0A@@=20-805,7=20+1304,7=20@@=20do_dup(struct=20thread=20= *td,=20enum=20dup_type=20type,=20int=20old,=20int=20new,=0A=20=09=20*=0A=20= =09=20*=20XXX=20this=20duplicates=20parts=20of=20close().=0A=20=09=20*/=0A= -=09delfp=20=3D=20fdp->fd_ofiles[new];=0A+=09delfp=20=3D=20= ftable_get(fdp,=20new);=0A=20=09holdleaders=20=3D=200;=0A=20=09if=20= (delfp=20!=3D=20NULL)=20{=0A=20=09=09if=20(td->td_proc->p_fdtol=20!=3D=20= NULL)=20{=0A@@=20-821,8=20+1320,8=20@@=20do_dup(struct=20thread=20*td,=20= enum=20dup_type=20type,=20int=20old,=20int=20new,=0A=20=09/*=0A=20=09=20= *=20Duplicate=20the=20source=20descriptor=0A=20=09=20*/=0A-=09= fdp->fd_ofiles[new]=20=3D=20fp;=0A-=09fdp->fd_ofileflags[new]=20=3D=20= fdp->fd_ofileflags[old]=20&~=20UF_EXCLOSE;=0A+=09ftable_set(fdp,=20new,=20= fp);=0A+=09ftable_set_cloexec(fdp,=20new,=200);=0A=20=09if=20(new=20>=20= fdp->fd_lastfile)=0A=20=09=09fdp->fd_lastfile=20=3D=20new;=0A=20=09= *retval=20=3D=20new;=0A@@=20-1111,12=20+1610,12=20@@=20kern_close(td,=20= fd)=0A=20=0A=20=09FILEDESC_XLOCK(fdp);=0A=20=09if=20((unsigned)fd=20>=3D=20= fdp->fd_nfiles=20||=0A-=09=20=20=20=20(fp=20=3D=20fdp->fd_ofiles[fd])=20= =3D=3D=20NULL)=20{=0A+=09=20=20=20=20(fp=20=3D=20ftable_get(fdp,=20fd))=20= =3D=3D=20NULL)=20{=0A=20=09=09FILEDESC_XUNLOCK(fdp);=0A=20=09=09return=20= (EBADF);=0A=20=09}=0A-=09fdp->fd_ofiles[fd]=20=3D=20NULL;=0A-=09= fdp->fd_ofileflags[fd]=20=3D=200;=0A+=09ftable_set(fdp,=20fd,=20NULL);=0A= +=09ftable_set_cloexec(fdp,=20fd,=200);=0A=20=09fdunused(fdp,=20fd);=0A=20= =09if=20(td->td_proc->p_fdtol=20!=3D=20NULL)=20{=0A=20=09=09/*=0A@@=20= -1178,7=20+1677,7=20@@=20closefrom(struct=20thread=20*td,=20struct=20= closefrom_args=20*uap)=0A=20=09=09uap->lowfd=20=3D=200;=0A=20=09= FILEDESC_SLOCK(fdp);=0A=20=09for=20(fd=20=3D=20uap->lowfd;=20fd=20<=20= fdp->fd_nfiles;=20fd++)=20{=0A-=09=09if=20(fdp->fd_ofiles[fd]=20!=3D=20= NULL)=20{=0A+=09=09if=20(ftable_get(fdp,=20fd)=20!=3D=20NULL)=20{=0A=20=09= =09=09FILEDESC_SUNLOCK(fdp);=0A=20=09=09=09(void)kern_close(td,=20fd);=0A= =20=09=09=09FILEDESC_SLOCK(fdp);=0A@@=20-1806,70=20+2305,6=20@@=20out:=0A= =20}=0A=20=0A=20/*=0A-=20*=20Grow=20the=20file=20table=20to=20accomodate=20= (at=20least)=20nfd=20descriptors.=20=20This=20may=0A-=20*=20block=20and=20= drop=20the=20filedesc=20lock,=20but=20it=20will=20reacquire=20it=20= before=0A-=20*=20returning.=0A-=20*/=0A-static=20void=0A= -fdgrowtable(struct=20filedesc=20*fdp,=20int=20nfd)=0A-{=0A-=09struct=20= file=20**ntable;=0A-=09char=20*nfileflags;=0A-=09int=20nnfiles,=20= onfiles;=0A-=09NDSLOTTYPE=20*nmap;=0A-=0A-=09FILEDESC_XLOCK_ASSERT(fdp);=0A= -=0A-=09KASSERT(fdp->fd_nfiles=20>=200,=0A-=09=20=20=20=20("zero-length=20= file=20table"));=0A-=0A-=09/*=20compute=20the=20size=20of=20the=20new=20= table=20*/=0A-=09onfiles=20=3D=20fdp->fd_nfiles;=0A-=09nnfiles=20=3D=20= NDSLOTS(nfd)=20*=20NDENTRIES;=20/*=20round=20up=20*/=0A-=09if=20(nnfiles=20= <=3D=20onfiles)=0A-=09=09/*=20the=20table=20is=20already=20large=20= enough=20*/=0A-=09=09return;=0A-=0A-=09/*=20allocate=20a=20new=20table=20= and=20(if=20required)=20new=20bitmaps=20*/=0A-=09FILEDESC_XUNLOCK(fdp);=0A= -=09MALLOC(ntable,=20struct=20file=20**,=20nnfiles=20*=20OFILESIZE,=0A-=09= =20=20=20=20M_FILEDESC,=20M_ZERO=20|=20M_WAITOK);=0A-=09nfileflags=20=3D=20= (char=20*)&ntable[nnfiles];=0A-=09if=20(NDSLOTS(nnfiles)=20>=20= NDSLOTS(onfiles))=0A-=09=09MALLOC(nmap,=20NDSLOTTYPE=20*,=20= NDSLOTS(nnfiles)=20*=20NDSLOTSIZE,=0A-=09=09=20=20=20=20M_FILEDESC,=20= M_ZERO=20|=20M_WAITOK);=0A-=09else=0A-=09=09nmap=20=3D=20NULL;=0A-=09= FILEDESC_XLOCK(fdp);=0A-=0A-=09/*=0A-=09=20*=20We=20now=20have=20new=20= tables=20ready=20to=20go.=20=20Since=20we=20dropped=20the=0A-=09=20*=20= filedesc=20lock=20to=20call=20malloc(),=20watch=20out=20for=20a=20race.=0A= -=09=20*/=0A-=09onfiles=20=3D=20fdp->fd_nfiles;=0A-=09if=20(onfiles=20>=3D= =20nnfiles)=20{=0A-=09=09/*=20we=20lost=20the=20race,=20but=20that's=20= OK=20*/=0A-=09=09free(ntable,=20M_FILEDESC);=0A-=09=09if=20(nmap=20!=3D=20= NULL)=0A-=09=09=09free(nmap,=20M_FILEDESC);=0A-=09=09return;=0A-=09}=0A-=09= bcopy(fdp->fd_ofiles,=20ntable,=20onfiles=20*=20sizeof(*ntable));=0A-=09= bcopy(fdp->fd_ofileflags,=20nfileflags,=20onfiles);=0A-=09if=20(onfiles=20= >=20NDFILE)=0A-=09=09free(fdp->fd_ofiles,=20M_FILEDESC);=0A-=09= fdp->fd_ofiles=20=3D=20ntable;=0A-=09fdp->fd_ofileflags=20=3D=20= nfileflags;=0A-=09if=20(NDSLOTS(nnfiles)=20>=20NDSLOTS(onfiles))=20{=0A-=09= =09bcopy(fdp->fd_map,=20nmap,=20NDSLOTS(onfiles)=20*=20sizeof(*nmap));=0A= -=09=09if=20(NDSLOTS(onfiles)=20>=20NDSLOTS(NDFILE))=0A-=09=09=09= free(fdp->fd_map,=20M_FILEDESC);=0A-=09=09fdp->fd_map=20=3D=20nmap;=0A-=09= }=0A-=09fdp->fd_nfiles=20=3D=20nnfiles;=0A-}=0A-=0A-/*=0A=20=20*=20= Allocate=20a=20file=20descriptor=20for=20the=20process.=0A=20=20*/=0A=20= int=0A@@=20-1891,16=20+2326,18=20@@=20fdalloc(struct=20thread=20*td,=20= int=20minfd,=20int=20*result)=0A=20=09/*=0A=20=09=20*=20Search=20the=20= bitmap=20for=20a=20free=20descriptor.=20=20If=20none=20is=20found,=20try=0A= =20=09=20*=20to=20grow=20the=20file=20table.=20=20Keep=20at=20it=20until=20= we=20either=20get=20a=20file=0A-=09=20*=20descriptor=20or=20run=20into=20= process=20or=20system=20limits;=20fdgrowtable()=0A+=09=20*=20descriptor=20= or=20run=20into=20process=20or=20system=20limits;=20ftable_ensure_fd()=0A= =20=09=20*=20may=20drop=20the=20filedesc=20lock,=20so=20we're=20in=20a=20= race.=0A=20=09=20*/=0A=20=09for=20(;;)=20{=0A-=09=09fd=20=3D=20= fd_first_free(fdp,=20minfd,=20fdp->fd_nfiles);=0A+=09=09fd=20=3D=20= fd_first_free(fdp,=20minfd);=0A=20=09=09if=20(fd=20>=3D=20maxfd)=0A=20=09= =09=09return=20(EMFILE);=0A-=09=09if=20(fd=20<=20fdp->fd_nfiles)=0A+=09=09= /*=20Grow=20if=20necessary.=20*/=0A+=09=09ftable_ensure_fd(fdp,=20fd,=20= maxfd);=0A+=09=09/*=20Required=20check=20since=20ftable_ensure_fd()=20= can=20drop=20xlock.=20*/=0A+=09=09if=20(ftable_get(fdp,=20fd)=20=3D=3D=20= NULL)=0A=20=09=09=09break;=0A-=09=09fdgrowtable(fdp,=20= min(fdp->fd_nfiles=20*=202,=20maxfd));=0A=20=09}=0A=20=0A=20=09/*=0A@@=20= -1909,9=20+2346,9=20@@=20fdalloc(struct=20thread=20*td,=20int=20minfd,=20= int=20*result)=0A=20=09=20*/=0A=20=09KASSERT(!fdisused(fdp,=20fd),=0A=20=09= =20=20=20=20("fd_first_free()=20returned=20non-free=20descriptor"));=0A-=09= KASSERT(fdp->fd_ofiles[fd]=20=3D=3D=20NULL,=0A+=09= KASSERT(ftable_get(fdp,=20fd)=20=3D=3D=20NULL,=0A=20=09=20=20=20=20= ("free=20descriptor=20isn't"));=0A-=09fdp->fd_ofileflags[fd]=20=3D=200;=20= /*=20XXX=20needed?=20*/=0A+=09ftable_set_cloexec(fdp,=20fd,=200);=20/*=20= XXX=20needed?=20*/=0A=20=09fdused(fdp,=20fd);=0A=20=09*result=20=3D=20= fd;=0A=20=09return=20(0);=0A@@=20-1926,7=20+2363,7=20@@=20fdavail(struct=20= thread=20*td,=20int=20n)=0A=20{=0A=20=09struct=20proc=20*p=20=3D=20= td->td_proc;=0A=20=09struct=20filedesc=20*fdp=20=3D=20td->td_proc->p_fd;=0A= -=09struct=20file=20**fpp;=0A+=09struct=20file=20*fp;=0A=20=09int=20i,=20= lim,=20last;=0A=20=0A=20=09FILEDESC_LOCK_ASSERT(fdp);=0A@@=20-1937,9=20= +2374,10=20@@=20fdavail(struct=20thread=20*td,=20int=20n)=0A=20=09if=20= ((i=20=3D=20lim=20-=20fdp->fd_nfiles)=20>=200=20&&=20(n=20-=3D=20i)=20<=3D= =200)=0A=20=09=09return=20(1);=0A=20=09last=20=3D=20min(fdp->fd_nfiles,=20= lim);=0A-=09fpp=20=3D=20&fdp->fd_ofiles[fdp->fd_freefile];=0A-=09for=20= (i=20=3D=20last=20-=20fdp->fd_freefile;=20--i=20>=3D=200;=20fpp++)=20{=0A= -=09=09if=20(*fpp=20=3D=3D=20NULL=20&&=20--n=20<=3D=200)=0A+=09fp=20=3D=20= ftable_get(fdp,=20fdp->fd_freefile);=0A+=09for=20(i=20=3D=20last=20-=20= fdp->fd_freefile;=20--i=20>=3D=200;=0A+=09=20=20=20=20=20fp=20=3D=20= ftable_get(fdp,=20last=20-=20i))=20{=0A+=09=09if=20(fp=20=3D=3D=20NULL=20= &&=20--n=20<=3D=200)=0A=20=09=09=09return=20(1);=0A=20=09}=0A=20=09= return=20(0);=0A@@=20-2017,7=20+2455,7=20@@=20falloc(struct=20thread=20= *td,=20struct=20file=20**resultfp,=20int=20*resultfd)=0A=20=09= ifs_init_lockdata(fp);=0A=20=0A=20=09FILEDESC_XLOCK(p->p_fd);=0A-=09if=20= ((fq=20=3D=20p->p_fd->fd_ofiles[0]))=20{=0A+=09if=20((fq=20=3D=20= ftable_get(p->p_fd,=200)))=20{=0A=20=09=09LIST_INSERT_AFTER(fq,=20fp,=20= f_list);=0A=20=09}=20else=20{=0A=20=09=09LIST_INSERT_HEAD(&filehead,=20= fp,=20f_list);=0A@@=20-2030,7=20+2468,7=20@@=20falloc(struct=20thread=20= *td,=20struct=20file=20**resultfp,=20int=20*resultfd)=0A=20=09=09=09= fdrop(fp,=20td);=0A=20=09=09return=20(error);=0A=20=09}=0A-=09= p->p_fd->fd_ofiles[i]=20=3D=20fp;=0A+=09ftable_set(p->p_fd,=20i,=20fp);=0A= =20=09FILEDESC_XUNLOCK(p->p_fd);=0A=20=09if=20(resultfp)=0A=20=09=09= *resultfp=20=3D=20fp;=0A@@=20-2068,10=20+2506,13=20@@=20fdinit(struct=20= filedesc=20*fdp)=0A=20=09newfdp->fd_fd.fd_refcnt=20=3D=201;=0A=20=09= newfdp->fd_fd.fd_holdcnt=20=3D=201;=0A=20=09newfdp->fd_fd.fd_cmask=20=3D=20= CMASK;=0A-=09newfdp->fd_fd.fd_ofiles=20=3D=20newfdp->fd_dfiles;=0A-=09= newfdp->fd_fd.fd_ofileflags=20=3D=20newfdp->fd_dfileflags;=0A=20=09= newfdp->fd_fd.fd_nfiles=20=3D=20NDFILE;=0A-=09newfdp->fd_fd.fd_map=20=3D=20= newfdp->fd_dmap;=0A+=0A+=09idb_init(&newfdp->fd_fd.fd_files,=20= &newfdp->fd_dfiles,=20NDFILE);=0A+=09idb_init(&newfdp->fd_fd.fd_map,=20= &newfdp->fd_dmap,=20NDSLOTS(NDFILE));=0A+=09= idb_init(&newfdp->fd_fd.fd_cloexec,=20&newfdp->fd_dcloexec,=0A+=09=20=20=20= =20NDSLOTS(NDFILE));=0A+=0A=20=09newfdp->fd_fd.fd_lastfile=20=3D=20-1;=0A= =20=09return=20(&newfdp->fd_fd);=0A=20}=0A@@=20-2144,6=20+2585,7=20@@=20= struct=20filedesc=20*=0A=20fdcopy(struct=20filedesc=20*fdp)=0A=20{=0A=20=09= struct=20filedesc=20*newfdp;=0A+=09struct=20file=20*fp;=0A=20=09int=20i;=0A= =20=0A=20=09/*=20Certain=20daemons=20might=20not=20have=20file=20= descriptors.=20*/=0A@@=20-2152,23=20+2594,23=20@@=20fdcopy(struct=20= filedesc=20*fdp)=0A=20=0A=20=09newfdp=20=3D=20fdinit(fdp);=0A=20=09= FILEDESC_SLOCK(fdp);=0A-=09while=20(fdp->fd_lastfile=20>=3D=20= newfdp->fd_nfiles)=20{=0A-=09=09FILEDESC_SUNLOCK(fdp);=0A-=09=09= FILEDESC_XLOCK(newfdp);=0A-=09=09fdgrowtable(newfdp,=20fdp->fd_lastfile=20= +=201);=0A-=09=09FILEDESC_XUNLOCK(newfdp);=0A-=09=09FILEDESC_SLOCK(fdp);=0A= -=09}=0A=20=09/*=20copy=20everything=20except=20kqueue=20descriptors=20= */=0A=20=09newfdp->fd_freefile=20=3D=20-1;=0A=20=09for=20(i=20=3D=200;=20= i=20<=3D=20fdp->fd_lastfile;=20++i)=20{=0A-=09=09if=20(fdisused(fdp,=20= i)=20&&=0A-=09=09=20=20=20=20fdp->fd_ofiles[i]->f_type=20!=3D=20= DTYPE_KQUEUE=20&&=0A-=09=09=20=20=20=20fdp->fd_ofiles[i]->f_ops=20!=3D=20= &badfileops)=20{=0A-=09=09=09newfdp->fd_ofiles[i]=20=3D=20= fdp->fd_ofiles[i];=0A-=09=09=09newfdp->fd_ofileflags[i]=20=3D=20= fdp->fd_ofileflags[i];=0A-=09=09=09fhold(newfdp->fd_ofiles[i]);=0A+=09=09= if=20(fdisused(fdp,=20i)=20&&=20(fp=20=3D=20ftable_get(fdp,=20i))=20&&=0A= +=09=09=20=20=20=20fp->f_type=20!=3D=20DTYPE_KQUEUE=20&&=20fp->f_ops=20= !=3D=20&badfileops)=20{=0A+=09=09=09int=20cloexec=20=3D=20= ftable_get_cloexec(fdp,=20i);=0A+=09=09=09int=20maxfd=20=3D=20= fdp->fd_lastfile;=0A+=0A+=09=09=09FILEDESC_SUNLOCK(fdp);=0A+=09=09=09= FILEDESC_XLOCK(newfdp);=0A+=09=09=09ftable_ensure_fd(newfdp,=20i,=20= maxfd);=0A+=09=09=09ftable_set(newfdp,=20i,=20fp);=0A+=09=09=09= ftable_set_cloexec(newfdp,=20i,=20cloexec);=0A=20=09=09=09= newfdp->fd_lastfile=20=3D=20i;=0A+=09=09=09FILEDESC_XUNLOCK(newfdp);=0A+=09= =09=09FILEDESC_SLOCK(fdp);=0A+=09=09=09fhold(fp);=0A=20=09=09}=20else=20= {=0A=20=09=09=09if=20(newfdp->fd_freefile=20=3D=3D=20-1)=0A=20=09=09=09=09= newfdp->fd_freefile=20=3D=20i;=0A@@=20-2177,7=20+2619,7=20@@=20= fdcopy(struct=20filedesc=20*fdp)=0A=20=09FILEDESC_SUNLOCK(fdp);=0A=20=09= FILEDESC_XLOCK(newfdp);=0A=20=09for=20(i=20=3D=200;=20i=20<=3D=20= newfdp->fd_lastfile;=20++i)=0A-=09=09if=20(newfdp->fd_ofiles[i]=20!=3D=20= NULL)=0A+=09=09if=20(ftable_get(newfdp,=20i)=20!=3D=20NULL)=0A=20=09=09=09= fdused(newfdp,=20i);=0A=20=09FILEDESC_XUNLOCK(newfdp);=0A=20=09= FILEDESC_SLOCK(fdp);=0A@@=20-2195,7=20+2637,6=20@@=20void=0A=20= fdfree(struct=20thread=20*td)=0A=20{=0A=20=09struct=20filedesc=20*fdp;=0A= -=09struct=20file=20**fpp;=0A=20=09int=20i,=20locked;=0A=20=09struct=20= filedesc_to_leader=20*fdtol;=0A=20=09struct=20file=20*fp;=0A@@=20= -2216,13=20+2657,10=20@@=20fdfree(struct=20thread=20*td)=0A=20=09=09=09=20= fdtol->fdl_refcount));=0A=20=09=09if=20(fdtol->fdl_refcount=20=3D=3D=201=20= &&=0A=20=09=09=20=20=20=20(td->td_proc->p_leader->p_flag=20&=20= P_ADVLOCK)=20!=3D=200)=20{=0A-=09=09=09for=20(i=20=3D=200,=20fpp=20=3D=20= fdp->fd_ofiles;=0A-=09=09=09=20=20=20=20=20i=20<=3D=20fdp->fd_lastfile;=0A= -=09=09=09=20=20=20=20=20i++,=20fpp++)=20{=0A-=09=09=09=09if=20(*fpp=20= =3D=3D=20NULL=20||=0A-=09=09=09=09=20=20=20=20(*fpp)->f_type=20!=3D=20= DTYPE_VNODE)=0A+=09=09=09for=20(i=20=3D=200;=20i=20<=3D=20= fdp->fd_lastfile;=20i++)=20{=0A+=09=09=09=09fp=20=3D=20ftable_get(fdp,=20= i);=0A+=09=09=09=09if=20(fp=20=3D=3D=20NULL=20||=20fp->f_type=20!=3D=20= DTYPE_VNODE)=0A=20=09=09=09=09=09continue;=0A-=09=09=09=09fp=20=3D=20= *fpp;=0A=20=09=09=09=09fhold(fp);=0A=20=09=09=09=09= FILEDESC_XUNLOCK(fdp);=0A=20=09=09=09=09lf.l_whence=20=3D=20SEEK_SET;=0A= @@=20-2240,7=20+2678,6=20@@=20fdfree(struct=20thread=20*td)=0A=20=09=09=09= =09VFS_UNLOCK_GIANT(locked);=0A=20=09=09=09=09FILEDESC_XLOCK(fdp);=0A=20=09= =09=09=09fdrop(fp,=20td);=0A-=09=09=09=09fpp=20=3D=20fdp->fd_ofiles=20+=20= i;=0A=20=09=09=09}=0A=20=09=09}=0A=20=09retry:=0A@@=20-2281,31=20= +2718,29=20@@=20fdfree(struct=20thread=20*td)=0A=20=09}=0A=20=09= FILEDESC_XLOCK(fdp);=0A=20=09i=20=3D=20--fdp->fd_refcnt;=0A-=09= FILEDESC_XUNLOCK(fdp);=0A-=09if=20(i=20>=200)=0A+=09if=20(i=20>=200)=20{=0A= +=09=09FILEDESC_XUNLOCK(fdp);=0A=20=09=09return;=0A+=09}=0A=20=0A-=09fpp=20= =3D=20fdp->fd_ofiles;=0A-=09for=20(i=20=3D=20fdp->fd_lastfile;=20i--=20= >=3D=200;=20fpp++)=20{=0A-=09=09if=20(*fpp)=20{=0A-=09=09=09= FILEDESC_XLOCK(fdp);=0A-=09=09=09fp=20=3D=20*fpp;=0A-=09=09=09*fpp=20=3D=20= NULL;=0A+=09for=20(i=20=3D=20fdp->fd_lastfile;=20i=20>=3D=200=20;=20i--)=20= {=0A+=09=09fp=20=3D=20ftable_get(fdp,=20i);=0A+=09=09if=20(fp)=20{=0A+=09= =09=09ftable_set(fdp,=20i,=20NULL);=0A=20=09=09=09FILEDESC_XUNLOCK(fdp);=0A= =20=09=09=09(void)=20closef(fp,=20td);=0A+=09=09=09FILEDESC_XLOCK(fdp);=0A= =20=09=09}=0A=20=09}=0A-=09FILEDESC_XLOCK(fdp);=0A=20=0A=20=09/*=20XXX=20= This=20should=20happen=20earlier.=20*/=0A=20=09mtx_lock(&fdesc_mtx);=0A=20= =09td->td_proc->p_fd=20=3D=20NULL;=0A=20=09mtx_unlock(&fdesc_mtx);=0A=20=0A= -=09if=20(fdp->fd_nfiles=20>=20NDFILE)=0A-=09=09FREE(fdp->fd_ofiles,=20= M_FILEDESC);=0A-=09if=20(NDSLOTS(fdp->fd_nfiles)=20>=20NDSLOTS(NDFILE))=0A= -=09=09FREE(fdp->fd_map,=20M_FILEDESC);=0A+=09idb_free(&fdp->fd_files);=0A= +=09idb_free(&fdp->fd_map);=0A+=09idb_free(&fdp->fd_cloexec);=0A=20=0A=20= =09fdp->fd_nfiles=20=3D=200;=0A=20=0A@@=20-2377,19=20+2812,20=20@@=20= setugidsafety(struct=20thread=20*td)=0A=20=09=20*/=0A=20=09= FILEDESC_XLOCK(fdp);=0A=20=09for=20(i=20=3D=200;=20i=20<=3D=20= fdp->fd_lastfile;=20i++)=20{=0A+=09=09struct=20file=20*fp;=0A+=0A=20=09=09= if=20(i=20>=202)=0A=20=09=09=09break;=0A-=09=09if=20(fdp->fd_ofiles[i]=20= &&=20is_unsafe(fdp->fd_ofiles[i]))=20{=0A-=09=09=09struct=20file=20*fp;=0A= +=09=09fp=20=3D=20ftable_get(fdp,=20i);=0A+=09=09if=20(fp=20&&=20= is_unsafe(fp))=20{=0A=20=0A=20=09=09=09knote_fdclose(td,=20i);=0A=20=09=09= =09/*=0A=20=09=09=09=20*=20NULL-out=20descriptor=20prior=20to=20close=20= to=20avoid=0A=20=09=09=09=20*=20a=20race=20while=20close=20blocks.=0A=20=09= =09=09=20*/=0A-=09=09=09fp=20=3D=20fdp->fd_ofiles[i];=0A-=09=09=09= fdp->fd_ofiles[i]=20=3D=20NULL;=0A-=09=09=09fdp->fd_ofileflags[i]=20=3D=20= 0;=0A+=09=09=09ftable_set(fdp,=20i,=20NULL);=0A+=09=09=09= ftable_set_cloexec(fdp,=20i,=200);=0A=20=09=09=09fdunused(fdp,=20i);=0A=20= =09=09=09FILEDESC_XUNLOCK(fdp);=0A=20=09=09=09(void)=20closef(fp,=20td);=0A= @@=20-2411,8=20+2847,8=20@@=20fdclose(struct=20filedesc=20*fdp,=20struct=20= file=20*fp,=20int=20idx,=20struct=20thread=20*td)=0A=20{=0A=20=0A=20=09= FILEDESC_XLOCK(fdp);=0A-=09if=20(fdp->fd_ofiles[idx]=20=3D=3D=20fp)=20{=0A= -=09=09fdp->fd_ofiles[idx]=20=3D=20NULL;=0A+=09if=20(ftable_get(fdp,=20= idx)=20=3D=3D=20fp)=20{=0A+=09=09ftable_set(fdp,=20idx,=20NULL);=0A=20=09= =09fdunused(fdp,=20idx);=0A=20=09=09FILEDESC_XUNLOCK(fdp);=0A=20=09=09= fdrop(fp,=20td);=0A@@=20-2441,19=20+2877,20=20@@=20fdcloseexec(struct=20= thread=20*td)=0A=20=09=20*=20may=20block=20and=20rip=20them=20out=20from=20= under=20us.=0A=20=09=20*/=0A=20=09for=20(i=20=3D=200;=20i=20<=3D=20= fdp->fd_lastfile;=20i++)=20{=0A-=09=09if=20(fdp->fd_ofiles[i]=20!=3D=20= NULL=20&&=0A-=09=09=20=20=20=20(fdp->fd_ofiles[i]->f_type=20=3D=3D=20= DTYPE_MQUEUE=20||=0A-=09=09=20=20=20=20(fdp->fd_ofileflags[i]=20&=20= UF_EXCLOSE)))=20{=0A-=09=09=09struct=20file=20*fp;=0A+=09=09struct=20= file=20*fp;=0A+=0A+=09=09fp=20=3D=20ftable_get(fdp,=20i);=0A+=09=09if=20= (fp=20!=3D=20NULL=20&&=0A+=09=09=20=20=20=20(fp->f_type=20=3D=3D=20= DTYPE_MQUEUE=20||=0A+=09=09=09ftable_get_cloexec(fdp,=20i)))=20{=0A=20=0A= =20=09=09=09knote_fdclose(td,=20i);=0A=20=09=09=09/*=0A=20=09=09=09=20*=20= NULL-out=20descriptor=20prior=20to=20close=20to=20avoid=0A=20=09=09=09=20= *=20a=20race=20while=20close=20blocks.=0A=20=09=09=09=20*/=0A-=09=09=09= fp=20=3D=20fdp->fd_ofiles[i];=0A-=09=09=09fdp->fd_ofiles[i]=20=3D=20= NULL;=0A-=09=09=09fdp->fd_ofileflags[i]=20=3D=200;=0A+=09=09=09= ftable_set(fdp,=20i,=20NULL);=0A+=09=09=09ftable_set_cloexec(fdp,=20i,=20= 0);=0A=20=09=09=09fdunused(fdp,=20i);=0A=20=09=09=09if=20(fp->f_type=20= =3D=3D=20DTYPE_MQUEUE)=0A=20=09=09=09=09mq_fdclose(td,=20i,=20fp);=0A@@=20= -2486,7=20+2923,7=20@@=20fdcheckstd(struct=20thread=20*td)=0A=20=09= devnull=20=3D=20-1;=0A=20=09error=20=3D=200;=0A=20=09for=20(i=20=3D=200;=20= i=20<=203;=20i++)=20{=0A-=09=09if=20(fdp->fd_ofiles[i]=20!=3D=20NULL)=0A= +=09=09if=20(ftable_get(fdp,=20i)=20!=3D=20NULL)=0A=20=09=09=09continue;=0A= =20=09=09if=20(devnull=20<=200)=20{=0A=20=09=09=09save=20=3D=20= td->td_retval[0];=0A@@=20-2904,7=20+3341,7=20@@=20dupfdopen(struct=20= thread=20*td,=20struct=20filedesc=20*fdp,=20int=20indx,=20int=20dfd,=20= int=20mode,=0A=20=09=20*/=0A=20=09FILEDESC_XLOCK(fdp);=0A=20=09if=20(dfd=20= <=200=20||=20dfd=20>=3D=20fdp->fd_nfiles=20||=0A-=09=20=20=20=20(wfp=20=3D= =20fdp->fd_ofiles[dfd])=20=3D=3D=20NULL)=20{=0A+=09=20=20=20=20(wfp=20=3D=20= ftable_get(fdp,=20dfd))=20=3D=3D=20NULL)=20{=0A=20=09=09= FILEDESC_XUNLOCK(fdp);=0A=20=09=09return=20(EBADF);=0A=20=09}=0A@@=20= -2931,9=20+3368,9=20@@=20dupfdopen(struct=20thread=20*td,=20struct=20= filedesc=20*fdp,=20int=20indx,=20int=20dfd,=20int=20mode,=0A=20=09=09=09= FILEDESC_XUNLOCK(fdp);=0A=20=09=09=09return=20(EACCES);=0A=20=09=09}=0A-=09= =09fp=20=3D=20fdp->fd_ofiles[indx];=0A-=09=09fdp->fd_ofiles[indx]=20=3D=20= wfp;=0A-=09=09fdp->fd_ofileflags[indx]=20=3D=20fdp->fd_ofileflags[dfd];=0A= +=09=09fp=20=3D=20ftable_get(fdp,=20indx);=0A+=09=09ftable_set(fdp,=20= indx,=20wfp);=0A+=09=09ftable_set_cloexec(fdp,=20indx,=20= ftable_get_cloexec(fdp,=20dfd));=0A=20=09=09if=20(fp=20=3D=3D=20NULL)=0A=20= =09=09=09fdused(fdp,=20indx);=0A=20=09=09fhold_locked(wfp);=0A@@=20= -2951,11=20+3388,11=20@@=20dupfdopen(struct=20thread=20*td,=20struct=20= filedesc=20*fdp,=20int=20indx,=20int=20dfd,=20int=20mode,=0A=20=09=09/*=0A= =20=09=09=20*=20Steal=20away=20the=20file=20pointer=20from=20dfd=20and=20= stuff=20it=20into=20indx.=0A=20=09=09=20*/=0A-=09=09fp=20=3D=20= fdp->fd_ofiles[indx];=0A-=09=09fdp->fd_ofiles[indx]=20=3D=20= fdp->fd_ofiles[dfd];=0A-=09=09fdp->fd_ofiles[dfd]=20=3D=20NULL;=0A-=09=09= fdp->fd_ofileflags[indx]=20=3D=20fdp->fd_ofileflags[dfd];=0A-=09=09= fdp->fd_ofileflags[dfd]=20=3D=200;=0A+=09=09fp=20=3D=20ftable_get(fdp,=20= indx);=0A+=09=09ftable_set(fdp,=20indx,=20ftable_get(fdp,=20dfd));=0A+=09= =09ftable_set(fdp,=20dfd,=20NULL);=0A+=09=09ftable_set_cloexec(fdp,=20= indx,=20ftable_get_cloexec(fdp,=20dfd));=0A+=09=09= ftable_set_cloexec(fdp,=20dfd,=200);=0A=20=09=09fdunused(fdp,=20dfd);=0A=20= =09=09if=20(fp=20=3D=3D=20NULL)=0A=20=09=09=09fdused(fdp,=20indx);=0A@@=20= -3103,7=20+3540,7=20@@=20sysctl_kern_file(SYSCTL_HANDLER_ARGS)=0A=20=09=09= =09continue;=0A=20=09=09FILEDESC_SLOCK(fdp);=0A=20=09=09for=20(n=20=3D=20= 0;=20fdp->fd_refcnt=20>=200=20&&=20n=20<=20fdp->fd_nfiles;=20++n)=20{=0A= -=09=09=09if=20((fp=20=3D=20fdp->fd_ofiles[n])=20=3D=3D=20NULL)=0A+=09=09= =09if=20((fp=20=3D=20ftable_get(fdp,=20n))=20=3D=3D=20NULL)=0A=20=09=09=09= =09continue;=0A=20=09=09=09xf.xf_fd=20=3D=20n;=0A=20=09=09=09xf.xf_file=20= =3D=20fp;=0A@@=20-3215,7=20+3652,7=20@@=20= sysctl_kern_proc_ofiledesc(SYSCTL_HANDLER_ARGS)=0A=20=09=09= export_vnode_for_osysctl(fdp->fd_jdir,=20KF_FD_TYPE_JAIL,=20kif,=0A=20=09= =09=09=09fdp,=20req);=0A=20=09for=20(i=20=3D=200;=20i=20<=20= fdp->fd_nfiles;=20i++)=20{=0A-=09=09if=20((fp=20=3D=20fdp->fd_ofiles[i])=20= =3D=3D=20NULL)=0A+=09=09if=20((fp=20=3D=20ftable_get(fdp,=20i))=20=3D=3D=20= NULL)=0A=20=09=09=09continue;=0A=20=09=09bzero(kif,=20sizeof(*kif));=0A=20= =09=09kif->kf_structsize=20=3D=20sizeof(*kif);=0A@@=20-3450,7=20+3887,7=20= @@=20sysctl_kern_proc_filedesc(SYSCTL_HANDLER_ARGS)=0A=20=09=09= export_vnode_for_sysctl(fdp->fd_jdir,=20KF_FD_TYPE_JAIL,=20kif,=0A=20=09=09= =09=09fdp,=20req);=0A=20=09for=20(i=20=3D=200;=20i=20<=20fdp->fd_nfiles;=20= i++)=20{=0A-=09=09if=20((fp=20=3D=20fdp->fd_ofiles[i])=20=3D=3D=20NULL)=0A= +=09=09if=20((fp=20=3D=20ftable_get(fdp,=20i))=20=3D=3D=20NULL)=0A=20=09=09= =09continue;=0A=20=09=09bzero(kif,=20sizeof(*kif));=0A=20=09=09= FILE_LOCK(fp);=0A@@=20-3669,7=20+4106,7=20@@=20file_to_first_proc(struct=20= file=20*fp)=0A=20=09=09if=20(fdp=20=3D=3D=20NULL)=0A=20=09=09=09= continue;=0A=20=09=09for=20(n=20=3D=200;=20n=20<=20fdp->fd_nfiles;=20= n++)=20{=0A-=09=09=09if=20(fp=20=3D=3D=20fdp->fd_ofiles[n])=0A+=09=09=09= if=20(fp=20=3D=3D=20ftable_get(fdp,=20n))=0A=20=09=09=09=09return=20(p);=0A= =20=09=09}=0A=20=09}=0Adiff=20--git=20a/src/sys/kern/kern_lsof.c=20= b/src/sys/kern/kern_lsof.c=0Aindex=2004e5dd7..70a8286=20100644=0A---=20= a/src/sys/kern/kern_lsof.c=0A+++=20b/src/sys/kern/kern_lsof.c=0A@@=20= -260,7=20+260,7=20@@=20lsof(struct=20thread=20*td,=20struct=20lsof_args=20= *uap)=0A=20=0A=20=09=09/*=20Ordinary=20descriptors=20for=20files,=20= pipes,=20sockets:=20*/=0A=20=09=09}=20else=20if=20(msg.fd=20<=20= fdp->fd_nfiles)=20{=0A-=09=09=09fp=20=3D=20fdp->fd_ofiles[msg.fd];=0A+=09= =09=09fp=20=3D=20ftable_get(fdp,=20msg.fd);=0A=20=09=09=09if=20(fp)=20{=0A= =20=09=09=09=09switch=20(fp->f_type)=20{=0A=20=09=09=09=09case=20= DTYPE_VNODE:=0Adiff=20--git=20a/src/sys/kern/sys_generic.c=20= b/src/sys/kern/sys_generic.c=0Aindex=201a9b061..8aba73d=20100644=0A---=20= a/src/sys/kern/sys_generic.c=0A+++=20b/src/sys/kern/sys_generic.c=0A@@=20= -596,12=20+596,12=20@@=20kern_ioctl(struct=20thread=20*td,=20int=20fd,=20= u_long=20com,=20caddr_t=20data)=0A=20=09switch=20(com)=20{=0A=20=09case=20= FIONCLEX:=0A=20=09=09FILEDESC_XLOCK(fdp);=0A-=09=09= fdp->fd_ofileflags[fd]=20&=3D=20~UF_EXCLOSE;=0A+=09=09= ftable_set_cloexec(fdp,=20fd,=200);=0A=20=09=09FILEDESC_XUNLOCK(fdp);=0A=20= =09=09goto=20out;=0A=20=09case=20FIOCLEX:=0A=20=09=09= FILEDESC_XLOCK(fdp);=0A-=09=09fdp->fd_ofileflags[fd]=20|=3D=20= UF_EXCLOSE;=0A+=09=09ftable_set_cloexec(fdp,=20fd,=201);=0A=20=09=09= FILEDESC_XUNLOCK(fdp);=0A=20=09=09goto=20out;=0A=20=09case=20FIONBIO:=0A= @@=20-1043,7=20+1043,7=20@@=20pollscan(td,=20fds,=20nfd)=0A=20=09=09}=20= else=20if=20(fds->fd=20<=200)=20{=0A=20=09=09=09fds->revents=20=3D=200;=0A= =20=09=09}=20else=20{=0A-=09=09=09fp=20=3D=20fdp->fd_ofiles[fds->fd];=0A= +=09=09=09fp=20=3D=20ftable_get(fdp,=20fds->fd);=0A=20=09=09=09if=20(fp=20= =3D=3D=20NULL)=20{=0A=20=09=09=09=09fds->revents=20=3D=20POLLNVAL;=0A=20=09= =09=09=09n++;=0Adiff=20--git=20a/src/sys/kern/uipc_mqueue.c=20= b/src/sys/kern/uipc_mqueue.c=0Aindex=20fb2ef6a..59c339a=20100644=0A---=20= a/src/sys/kern/uipc_mqueue.c=0A+++=20b/src/sys/kern/uipc_mqueue.c=0A@@=20= -2005,8=20+2005,8=20@@=20kmq_open(struct=20thread=20*td,=20struct=20= kmq_open_args=20*uap)=0A=20=09FILE_UNLOCK(fp);=0A=20=0A=20=09= FILEDESC_XLOCK(fdp);=0A-=09if=20(fdp->fd_ofiles[fd]=20=3D=3D=20fp)=0A-=09= =09fdp->fd_ofileflags[fd]=20|=3D=20UF_EXCLOSE;=0A+=09if=20= (ftable_get(fdp,=20fd)=20=3D=3D=20fp)=0A+=09=09ftable_set_cloexec(fdp,=20= fd,=201);=0A=20=09FILEDESC_XUNLOCK(fdp);=0A=20=09td->td_retval[0]=20=3D=20= fd;=0A=20=09fdrop(fp,=20td);=0Adiff=20--git=20a/src/sys/kern/uipc_sem.c=20= b/src/sys/kern/uipc_sem.c=0Aindex=20d5525a4..b1e6b62=20100644=0A---=20= a/src/sys/kern/uipc_sem.c=0A+++=20b/src/sys/kern/uipc_sem.c=0A@@=20= -488,8=20+488,8=20@@=20ksem_create(struct=20thread=20*td,=20const=20char=20= *name,=20semid_t=20*semidp,=20mode_t=20mode,=0A=20=09fp->f_ops=20=3D=20= &ksem_ops;=0A=20=0A=20=09FILEDESC_XLOCK(fdp);=0A-=09if=20= (fdp->fd_ofiles[fd]=20=3D=3D=20fp)=0A-=09=09fdp->fd_ofileflags[fd]=20|=3D=20= UF_EXCLOSE;=0A+=09if=20(ftable_get(fdp,=20fd)=20=3D=3D=20fp)=0A+=09=09= ftable_set_cloexec(fdp,=20fd,=201);=0A=20=09FILEDESC_XUNLOCK(fdp);=0A=20=09= fdrop(fp,=20td);=0A=20=0Adiff=20--git=20a/src/sys/kern/uipc_usrreq.c=20= b/src/sys/kern/uipc_usrreq.c=0Aindex=20b8255f0..1bfc037=20100644=0A---=20= a/src/sys/kern/uipc_usrreq.c=0A+++=20b/src/sys/kern/uipc_usrreq.c=0A@@=20= -1605,7=20+1605,8=20@@=20unp_externalize(struct=20mbuf=20*control,=20= struct=20mbuf=20**controlp)=0A=20=09=09=09=09if=20(fdalloc(td,=200,=20= &f))=0A=20=09=09=09=09=09panic("unp_externalize=20fdalloc=20failed");=0A=20= =09=09=09=09fp=20=3D=20*rp++;=0A-=09=09=09=09= td->td_proc->p_fd->fd_ofiles[f]=20=3D=20fp;=0A+=09=09=09=09= ftable_set(td->td_proc->p_fd,=20f,=0A+=09=09=09=09=20=20=20=20fp);=0A=20=09= =09=09=09FILE_LOCK(fp);=0A=20=09=09=09=09fp->f_msgcount--;=0A=20=09=09=09= =09FILE_UNLOCK(fp);=0A@@=20-1735,12=20+1736,12=20@@=20= unp_internalize(struct=20mbuf=20**controlp,=20struct=20thread=20*td)=0A=20= =09=09=09for=20(i=20=3D=200;=20i=20<=20oldfds;=20i++)=20{=0A=20=09=09=09=09= fd=20=3D=20*fdp++;=0A=20=09=09=09=09if=20((unsigned)fd=20>=3D=20= fdescp->fd_nfiles=20||=0A-=09=09=09=09=20=20=20=20fdescp->fd_ofiles[fd]=20= =3D=3D=20NULL)=20{=0A+=09=09=09=09=20=20=20=20ftable_get(fdescp,=20fd)=20= =3D=3D=20NULL)=20{=0A=20=09=09=09=09=09FILEDESC_SUNLOCK(fdescp);=0A=20=09= =09=09=09=09error=20=3D=20EBADF;=0A=20=09=09=09=09=09goto=20out;=0A=20=09= =09=09=09}=0A-=09=09=09=09fp=20=3D=20fdescp->fd_ofiles[fd];=0A+=09=09=09=09= fp=20=3D=20ftable_get(fdescp,=20fd);=0A=20=09=09=09=09if=20= (!(fp->f_ops->fo_flags=20&=20DFLAG_PASSABLE))=20{=0A=20=09=09=09=09=09= FILEDESC_SUNLOCK(fdescp);=0A=20=09=09=09=09=09error=20=3D=20EOPNOTSUPP;=0A= @@=20-1765,7=20+1766,7=20@@=20unp_internalize(struct=20mbuf=20= **controlp,=20struct=20thread=20*td)=0A=20=09=09=09rp=20=3D=20(struct=20= file=20**)=0A=20=09=09=09=20=20=20=20CMSG_DATA(mtod(*controlp,=20struct=20= cmsghdr=20*));=0A=20=09=09=09for=20(i=20=3D=200;=20i=20<=20oldfds;=20= i++)=20{=0A-=09=09=09=09fp=20=3D=20fdescp->fd_ofiles[*fdp++];=0A+=09=09=09= =09fp=20=3D=20ftable_get(fdescp,=20*fdp++);=0A=20=09=09=09=09*rp++=20=3D=20= fp;=0A=20=09=09=09=09FILE_LOCK(fp);=0A=20=09=09=09=09fp->f_count++;=0A= diff=20--git=20a/src/sys/kern/vfs_syscalls.c=20= b/src/sys/kern/vfs_syscalls.c=0Aindex=202f28263..fa0a5e6=20100644=0A---=20= a/src/sys/kern/vfs_syscalls.c=0A+++=20b/src/sys/kern/vfs_syscalls.c=0A@@=20= -4884,7=20+4884,7=20@@=20getvnode(fdp,=20fd,=20fpp)=0A=20=09else=20{=0A=20= =09=09FILEDESC_SLOCK(fdp);=0A=20=09=09if=20((u_int)fd=20>=3D=20= fdp->fd_nfiles=20||=0A-=09=09=20=20=20=20(fp=20=3D=20fdp->fd_ofiles[fd])=20= =3D=3D=20NULL)=0A+=09=09=20=20=20=20(fp=20=3D=20ftable_get(fdp,=20fd))=20= =3D=3D=20NULL)=0A=20=09=09=09error=20=3D=20EBADF;=0A=20=09=09else=20if=20= (fp->f_vnode=20=3D=3D=20NULL)=20{=0A=20=09=09=09fp=20=3D=20NULL;=0Adiff=20= --git=20a/src/sys/netsmb/smb_dev.c=20b/src/sys/netsmb/smb_dev.c=0Aindex=20= fd0dcbe..a0dd80c=20100644=0A---=20a/src/sys/netsmb/smb_dev.c=0A+++=20= b/src/sys/netsmb/smb_dev.c=0A@@=20-370,7=20+370,7=20@@=20= nsmb_getfp(struct=20filedesc*=20fdp,=20int=20fd,=20int=20flag)=0A=20=0A=20= =09FILEDESC_SLOCK(fdp);=0A=20=09if=20(((u_int)fd)=20>=3D=20= fdp->fd_nfiles=20||=0A-=09=20=20=20=20(fp=20=3D=20fdp->fd_ofiles[fd])=20= =3D=3D=20NULL=20||=0A+=09=20=20=20=20(fp=20=3D=20ftable_get(fdp,=20fd))=20= =3D=3D=20NULL=20||=0A=20=09=20=20=20=20(fp->f_flag=20&=20flag)=20=3D=3D=20= 0)=20{=0A=20=09=09FILEDESC_SUNLOCK(fdp);=0A=20=09=09return=20(NULL);=0A= diff=20--git=20a/src/sys/sys/filedesc.h=20b/src/sys/sys/filedesc.h=0A= index=201831e5c..e9ea56a=20100644=0A---=20a/src/sys/sys/filedesc.h=0A+++=20= b/src/sys/sys/filedesc.h=0A@@=20-45,16=20+45,26=20@@=0A=20=20*=20This=20= structure=20is=20used=20for=20the=20management=20of=20descriptors.=20=20= It=20may=20be=0A=20=20*=20shared=20by=20multiple=20processes.=0A=20=20*/=0A= -#define=20NDSLOTTYPE=09u_long=0A+#define=20NDSLOTTYPE=09uintptr_t=0A+=0A= +/*=20Generic=20indirect=20block=20table=20*/=0A+struct=20idb_table=20{=0A= +=09union=20{=0A+=09=09void=20*flat;=0A+=09=09void=20**indirect;=0A+=09}=20= idb_tbl;=0A+=09int=20idb_nents;=20/*=20Current=20max=20#=20of=20entries.=20= */=0A+=09int=20idb_orig_nents;=20/*=20Orig=20#=20of=20entries=20for=20= the=20flat=20table.=20*/=0A+};=0A=20=0A=20struct=20filedesc=20{=0A-=09= struct=09file=20**fd_ofiles;=09/*=20file=20structures=20for=20open=20= files=20*/=0A-=09char=09*fd_ofileflags;=09=09/*=20per-process=20open=20= file=20flags=20*/=0A+=09struct=20idb_table=20fd_files;=20=20=20=20=20/*=20= table=20of=20open=20file=20structs=20*/=0A+=09struct=20idb_table=20= fd_map;=09/*=20bitmap=20of=20free=20fds=20*/=0A+=09struct=20idb_table=20= fd_cloexec;=09/*=20bitmap=20of=20fd=20close=20exec=20state=20*/=0A=20=09= struct=09vnode=20*fd_cdir;=09=09/*=20current=20directory=20*/=0A=20=09= struct=09vnode=20*fd_rdir;=09=09/*=20root=20directory=20*/=0A=20=09= struct=09vnode=20*fd_jdir;=09=09/*=20jail=20root=20directory=20*/=0A=20=09= int=09fd_nfiles;=09=09/*=20number=20of=20open=20files=20allocated=20*/=0A= -=09NDSLOTTYPE=20*fd_map;=09=09/*=20bitmap=20of=20free=20fds=20*/=0A=20=09= int=09fd_lastfile;=09=09/*=20high-water=20mark=20of=20fd_ofiles=20*/=0A=20= =09int=09fd_freefile;=09=09/*=20approx.=20next=20free=20file=20*/=0A=20=09= u_short=09fd_cmask;=09=09/*=20mask=20for=20file=20creation=20*/=0A@@=20= -130,12=20+140,18=20@@=20struct=20filedesc_to_leader=20*=0A=20int=09= getvnode(struct=20filedesc=20*fdp,=20int=20fd,=20struct=20file=20**fpp);=0A= =20void=09mountcheckdirs(struct=20vnode=20*olddp,=20struct=20vnode=20= *newdp);=0A=20void=09setugidsafety(struct=20thread=20*td);=0A+struct=09= file=20*ftable_get(struct=20filedesc=20*fdp,=20int=20fd);=0A+void=09= ftable_set(struct=20filedesc=20*fdp,=20int=20fd,=20struct=20file=20*fp);=0A= +int=09ftable_get_cloexec(struct=20filedesc=20*fdp,=20int=20fd);=0A+void=09= ftable_set_cloexec(struct=20filedesc=20*fdp,=20int=20fd,=20int=20on);=0A= +=0A=20=0A=20static=20__inline=20struct=20file=20*=0A=20= fget_locked(struct=20filedesc=20*fdp,=20int=20fd)=0A=20{=0A=20=0A-=09= return=20(fd=20<=200=20||=20fd=20>=3D=20fdp->fd_nfiles=20?=20NULL=20:=20= fdp->fd_ofiles[fd]);=0A+=09return=20(fd=20<=20= --Apple-Mail-16--1061268945 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit --Apple-Mail-16--1061268945-- From owner-freebsd-arch@FreeBSD.ORG Tue May 11 17:42:31 2010 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4D7711065673 for ; Tue, 11 May 2010 17:42:31 +0000 (UTC) (envelope-from phcoder@gmail.com) Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.155]) by mx1.freebsd.org (Postfix) with ESMTP id CB31D8FC14 for ; Tue, 11 May 2010 17:42:30 +0000 (UTC) Received: by fg-out-1718.google.com with SMTP id 22so1041903fge.13 for ; Tue, 11 May 2010 10:42:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:x-enigmail-version:content-type; bh=emw7omUdgqhq3vrY0Ce8aUpm7A07ZOW7UD/wR9Caifg=; b=E2wkItg7YIdNDPRsrubJclqu9655yTzUhYsFHlP2zkEoJuyb0VRBY26pxjKGKF+RGO 6NKHDfm4QjqYNZxoukY+vPMwoW4RyWCZ3i+8BODkqzg2lNZLhbxydWO9QZqlmVZVe3zI NdzisagMHeSXUEgEeCmG6SFliRExOSCZD9q3A= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject :x-enigmail-version:content-type; b=OzvfWAuUSLPtFN9aBeRaff5g27GSt7mIlwy6coD/4vSLSjUgpja5YhZP5X2rQWJph0 Gd5MvYfgFGpAR05W6qHcsRND238yGvIpUtGiDVL8zg69hXnhwa3dG3DgXw4znoCT4bZx QXGCfg4IXMyVWrkzdUR5bxH2NcX3ohTq+7IIA= Received: by 10.87.74.17 with SMTP id b17mr12489609fgl.59.1273597884422; Tue, 11 May 2010 10:11:24 -0700 (PDT) Received: from debian.bg45.phnet (gprs37.swisscom-mobile.ch [193.247.250.37]) by mx.google.com with ESMTPS id e3sm650340fga.14.2010.05.11.10.11.21 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 11 May 2010 10:11:22 -0700 (PDT) Message-ID: <4BE98FB5.3060906@gmail.com> Date: Tue, 11 May 2010 19:11:17 +0200 From: =?UTF-8?B?VmxhZGltaXIgJ8+GLWNvZGVyL3BoY29kZXInIFNlcmJpbmVua28=?= User-Agent: Mozilla-Thunderbird 2.0.0.22 (X11/20091109) MIME-Version: 1.0 To: freebsd-arch@freebsd.org, The development of GRUB 2 X-Enigmail-Version: 0.95.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="------------enig714B29E53AA71068810CE1FA" Cc: Subject: [RFC] Multiboot2 drafting X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 May 2010 17:42:31 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig714B29E53AA71068810CE1FA Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hello, all. In GRUB2 community we're currently working on a next-generation multiboot specification. It has goals similar to the original multiboot specification but with important flaws fixed: 1) Instead of having bunch of pointers to subtables it uses a tagged structure now. It allows it to be easier expandable, consume less space if some fields aren't used and is easier to relocate. 2) Now it's portable. It has fields for specification of architecture and proper field alignment. So now adding a new arcitecture is as easy as adding a new arcitecture id and a section dealing with architecture-specific problems like register usage to pass information. Currently it has only i386 and mips though. Both are implemented in bzr trunk grub[1] Short summary: Multiboot specification is done as an unified protocol between bootloader and kernel to allow supporting more kernels and bootloaders with less effort. The easiest way to use it is to create an ELF image with an additional header which announces multiboot support and specific kernel requirements. But it's also possible to put loading address in multiboot header and use a non-ELF format. When image is loaded one of GPRs contaians a magic number to identify that kernel was loaded as multiboot and another GPR contains a pointer to information table. The most needed information is already there, more is in review progress, and if you feel like we're missing somethin feel free to contact. Complete specification is available at http://bzr.savannah.gnu.org/r/grub/branches/multiboot2/ or at http://download.savannah.gnu.org/releases-noredirect/grub/phcoder/multibo= ot.pdf Some advantages: 1) Removes the need to support a fundamentaly different boot protocol for every architecture. In future it may even be possible to have just one image per ISA and rely on information supplied by bootloader to differentiate between platforms (it doesn't prevent creation of an image optimised for one platform) 2) Better collaboration between bootloaders and kernels by avoiding to implement "one protocol per kernel". 3) Possibility to inform bootloader of exact kernel requirements and supported features. 4) Uniform interface for retrieving e.g. memory map and initial console info across platforms. Any comment about multiboot2 spec is welcome. Would it be possible for FreeBSD in perspective to use multiboot2 instead= or in addition to current protocols? Thanks for your time. [1] Available with bzr co --lightweight http://bzr.savannah.gnu.org/r/grub/trunk/grub/ or as a tarball at http://download.savannah.gnu.org/releases-noredirect/grub/phcoder/grub-r2= 283.tgz --=20 Regards Vladimir '=CF=86-coder/phcoder' Serbinenko --------------enig714B29E53AA71068810CE1FA Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iF4EAREKAAYFAkvpj7UACgkQNak7dOguQgksvwEAoNcaIrND86DbVRiCFc75caRT l1Qh8ofVPkDjHgEturgA/2FWS3yZAGqg6mKTTN/i41nOijdIIlSkXrKrrl1nn2Td =ZyWU -----END PGP SIGNATURE----- --------------enig714B29E53AA71068810CE1FA-- From owner-freebsd-arch@FreeBSD.ORG Tue May 11 23:13:47 2010 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1CEAD1065673 for ; Tue, 11 May 2010 23:13:47 +0000 (UTC) (envelope-from tim.prouty@isilon.com) Received: from seaxch09.isilon.com (seaxch09.isilon.com [74.85.160.25]) by mx1.freebsd.org (Postfix) with ESMTP id EA9D28FC17 for ; Tue, 11 May 2010 23:13:46 +0000 (UTC) Received: from 10-8-5-63.isilon.com ([10.8.5.63]) by seaxch09.isilon.com with Microsoft SMTPSVC(6.0.3790.3959); Tue, 11 May 2010 16:13:46 -0700 Message-Id: From: Tim Prouty To: freebsd-arch@freebsd.org In-Reply-To: Content-Type: multipart/mixed; boundary=Apple-Mail-18--1040317416 Mime-Version: 1.0 (Apple Message framework v936) Date: Tue, 11 May 2010 16:13:45 -0700 References: X-Mailer: Apple Mail (2.936) X-OriginalArrivalTime: 11 May 2010 23:13:46.0298 (UTC) FILETIME=[9B49E9A0:01CAF15F] Cc: Zachary Loafman , Matthew Fleming Subject: Re: [PATCH]/[RFC] Increase scalability of per-process file descriptor data structures X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 May 2010 23:13:47 -0000 --Apple-Mail-18--1040317416 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit The patch was slightly truncated, I'm guessing because it was > 50K. Attached is a slightly trimmed down patch. -Tim --Apple-Mail-18--1040317416 Content-Disposition: attachment; filename=fd_scalability.patch Content-Type: application/octet-stream; x-unix-mode=0700; name="fd_scalability.patch" Content-Transfer-Encoding: 7bit diff --git a/src/sys/compat/linux/linux_stats.c b/src/sys/compat/linux/linux_stats.c index 374ce39..905db20 100644 --- a/src/sys/compat/linux/linux_stats.c +++ b/src/sys/compat/linux/linux_stats.c @@ -129,7 +129,7 @@ translate_path_major_minor(struct thread *td, char *path, struct stat *buf) fd = td->td_retval[0]; td->td_retval[0] = temp; translate_fd_major_minor(td, fd, buf); - fdclose(fdp, fdp->fd_ofiles[fd], fd, td); + fdclose(fdp, ftable_get(fdp, fd), fd, td); } static int diff --git a/src/sys/compat/svr4/svr4_filio.c b/src/sys/compat/svr4/svr4_filio.c index 701bf15..82364ca 100644 --- a/src/sys/compat/svr4/svr4_filio.c +++ b/src/sys/compat/svr4/svr4_filio.c @@ -212,13 +212,13 @@ svr4_fil_ioctl(fp, td, retval, fd, cmd, data) switch (cmd) { case SVR4_FIOCLEX: FILEDESC_XLOCK(fdp); - fdp->fd_ofileflags[fd] |= UF_EXCLOSE; + ftable_set_cloexec(fdp, fd, 1); FILEDESC_XUNLOCK(fdp); return 0; case SVR4_FIONCLEX: FILEDESC_XLOCK(fdp); - fdp->fd_ofileflags[fd] &= ~UF_EXCLOSE; + ftable_set_cloexec(fdp, fd, 0); FILEDESC_XUNLOCK(fdp); return 0; diff --git a/src/sys/fs/fdescfs/fdesc_vfsops.c b/src/sys/fs/fdescfs/fdesc_vfsops.c index 16fa4cf..fb2e45e 100644 --- a/src/sys/fs/fdescfs/fdesc_vfsops.c +++ b/src/sys/fs/fdescfs/fdesc_vfsops.c @@ -203,7 +203,7 @@ fdesc_statfs(mp, sbp, td) last = min(fdp->fd_nfiles, lim); freefd = 0; for (i = fdp->fd_freefile; i < last; i++) - if (fdp->fd_ofiles[i] == NULL) + if (ftable_get(fdp, i) == NULL) freefd++; /* diff --git a/src/sys/fs/fdescfs/fdesc_vnops.c b/src/sys/fs/fdescfs/fdesc_vnops.c index f39c3a7..0ea6607 100644 --- a/src/sys/fs/fdescfs/fdesc_vnops.c +++ b/src/sys/fs/fdescfs/fdesc_vnops.c @@ -581,7 +581,7 @@ fdesc_readdir(ap) dp->d_type = DT_DIR; break; default: - if (fdp->fd_ofiles[fcnt] == NULL) { + if (ftable_get(fdp, fcnt) == NULL) { FILEDESC_SUNLOCK(fdp); goto done; } diff --git a/src/sys/fs/nfsserver/nfs_nfsdport.c b/src/sys/fs/nfsserver/nfs_nfsdport.c index 232e465..94fd81c 100644 --- a/src/sys/fs/nfsserver/nfs_nfsdport.c +++ b/src/sys/fs/nfsserver/nfs_nfsdport.c @@ -3103,7 +3103,7 @@ fp_getfvp(struct thread *p, int fd, struct file **fpp, struct vnode **vpp) fdp = p->td_proc->p_fd; if (fd >= fdp->fd_nfiles || - (fp = fdp->fd_ofiles[fd]) == NULL) + (fp = ftable_get(fdp, fd)) == NULL) return (EBADF); *fpp = fp; return (0); diff --git a/src/sys/kern/kern_descrip.c b/src/sys/kern/kern_descrip.c index 6ce0356..1a34987 100644 --- a/src/sys/kern/kern_descrip.c +++ b/src/sys/kern/kern_descrip.c @@ -112,9 +112,8 @@ enum dup_type { DUP_VARIABLE, DUP_FIXED }; static int do_dup(struct thread *td, enum dup_type type, int old, int new, register_t *retval); -static int fd_first_free(struct filedesc *, int, int); +static int fd_first_free(struct filedesc *, int); static int fd_last_used(struct filedesc *, int, int); -static void fdgrowtable(struct filedesc *, int); static int fdrop_locked(struct file *fp, struct thread *td); static void fdunused(struct filedesc *fdp, int fd); static void fdused(struct filedesc *fdp, int fd); @@ -134,10 +133,406 @@ static void fdused(struct filedesc *fdp, int fd); #define NDBIT(x) ((NDSLOTTYPE)1 << ((x) % NDENTRIES)) #define NDSLOTS(x) (((x) + NDENTRIES - 1) / NDENTRIES) -/* - * Storage required per open file descriptor. +#define IDB_BLOCK_SIZE PAGE_SIZE +#define IDB_ENT_SIZE sizeof(uintptr_t) +#define IDB_ENTS_PER_BLOCK (IDB_BLOCK_SIZE/IDB_ENT_SIZE) + +/* May be a perf impact on 32-bit kernels. */ +CTASSERT(NDSLOTSIZE == IDB_ENT_SIZE); + +/** + * Return the index into the indirect table given an entry. + */ +static inline int +idb_block_index(int ent) +{ + + return (ent / IDB_ENTS_PER_BLOCK); +} + +/** + * Return offset into an indirect block given an entry. + */ +static inline int +idb_block_off(int ent) +{ + + return (ent % IDB_ENTS_PER_BLOCK); +} + +/** + * Return 1 if the indirect block table is flat, else 0. + */ +static inline int +idb_is_flat(struct idb_table *idb) +{ + + return (idb->idb_nents <= IDB_ENTS_PER_BLOCK); +} + +/** + * Return a pointer to the block. If the block is sparse or ent is outside + * the current size of the table, return NULL. + */ +static inline void * +idb_block(struct idb_table *idb, int ent) +{ + + return (ent >= idb->idb_nents ? NULL : + idb->idb_tbl.indirect[idb_block_index(ent)]); +} + +/** + * Initialize a new indirect table. The caller is responsible for allocating + * the idb struct, and must provide an initial non-null flat table. + * + * @param idb Indirect table to initialize. + * @param idb_flat Initial non-null table. + * @param idb_nents Number of entries in the initial flat table. + */ +static void +idb_init(struct idb_table *idb, void *idb_flat, int idb_nents) +{ + + KASSERT(idb != NULL, ("idb table must be allocated by caller")); + KASSERT(idb_flat != NULL, + ("idb flat table must be allocated by caller")); + + idb->idb_tbl.flat = idb_flat; + idb->idb_nents = idb_nents; + idb->idb_orig_nents = idb_nents; +} + +/** + * Free all blocks associated with the indirect table. + */ +static void +idb_free(struct idb_table *idb) +{ + int indx; + void *block; + + if (idb_is_flat(idb)) { + if (idb->idb_nents > idb->idb_orig_nents) + free(idb->idb_tbl.flat, M_FILEDESC); + return; + } + + /* Free indirect leaves. */ + for (indx = idb_block_index(0); + indx < idb_block_index(idb->idb_nents); + indx++) { + block = idb->idb_tbl.indirect[indx]; + if (block != NULL) + free(block, M_FILEDESC); + } + + /* Free indirect root. */ + free(idb->idb_tbl.indirect, M_FILEDESC); +} + +/** + * Return a pointer into the table/block given an index. + */ +static void * +idb_get_entry(struct idb_table *idb, int ent) +{ + void *block; + + if (ent > idb->idb_nents) + return (NULL); + + if (idb_is_flat(idb)) + return (((caddr_t)idb->idb_tbl.flat) + (ent * IDB_ENT_SIZE)); + + /* Indirect block. Return NULL for sparse blocks. */ + block = idb_block(idb, ent); + if (block == NULL) + return (NULL); + + return (((caddr_t)block) + (idb_block_off(ent) * IDB_ENT_SIZE)); +} + +/** + * If the current table size doesn't accomodate the new number of entries, + * grow it to fit new_nents. Mult is a multiplying factor used to check the + * number of entries in the table against new_nents which allows growing the + * flat table or the indirect table. The current number of entries in the + * table must be a multiple of mult. + * + * @param idb Table to grow. + * @param new_nents Number of entries to grow the table to. + * @param mult Multiplier for new_nents. + * @param sx Exclusive lock that may be dropped/reqacquired. */ -#define OFILESIZE (sizeof(struct file *) + sizeof(char)) +static void +idb_grow_table(struct idb_table *idb, int new_nents, int mult, struct sx *sx) +{ + int old_nents; + void *ntable; + + KASSERT(idb->idb_nents % mult == 0, + ("%d is not a multiple of %d", idb->idb_nents, mult)); + + old_nents = idb->idb_nents / mult; + + /* Do nothing if the table is already big enough. */ + if (old_nents > new_nents) + return; + + sx_xunlock(sx); + ntable = malloc(new_nents * IDB_ENT_SIZE, M_FILEDESC, + M_ZERO | M_WAITOK); + sx_xlock(sx); + + /* Done if table grew when the lock was dropped. */ + if (idb->idb_nents / mult > new_nents) { + free(ntable, M_FILEDESC); + return; + } + + /* Copy the data to the new table and fix up the pointers. */ + bcopy(idb->idb_tbl.flat, ntable, old_nents * IDB_ENT_SIZE); + if (idb->idb_nents > idb->idb_orig_nents) + free(idb->idb_tbl.flat, M_FILEDESC); + idb->idb_tbl.flat = ntable; + idb->idb_nents = new_nents * mult; +} + +/** + * Transition a flat table to an indirect block table. + * + * @param idb Table to transition. + * @param sx Exclusive lock that may be dropped/reqacquired. + */ +static void +idb_transition_to_indirect(struct idb_table *idb, struct sx *sx) +{ + void **ntable = NULL; + + KASSERT(idb->idb_nents >= IDB_ENTS_PER_BLOCK, + ("Insufficient size for indirect transition: %d", idb->idb_nents)); + + /* Done if the table has already transitioned. */ + if (idb->idb_nents > IDB_ENTS_PER_BLOCK) { + return; + } + + sx_xunlock(sx); + ntable = malloc(IDB_BLOCK_SIZE, M_FILEDESC, + M_ZERO | M_WAITOK); + sx_xlock(sx); + + /* Done if indirect transition done when the lock was dropped. */ + if (idb->idb_nents > IDB_ENTS_PER_BLOCK) { + free(ntable, M_FILEDESC); + return; + } + + /* Make indirect transition. */ + ntable[0] = idb->idb_tbl.flat; + idb->idb_tbl.indirect = ntable; + idb->idb_nents = IDB_ENTS_PER_BLOCK * IDB_ENTS_PER_BLOCK; +} + +/** + * Allocates an indirect block in the table if one doesn't already exist for + * new_ent. + * + * @param idb Table to ensure new_ent has an indirect block in. + * @param new_ent New entry index to create indirect block for. + * @param sx Exclusive lock that may be dropped/reqacquired. + */ +static void +idb_ensure_indirect_block(struct idb_table *idb, int new_ent, struct sx *sx) +{ + void *nblock = NULL; + + KASSERT(new_ent < idb->idb_nents, + ("Table too small (%d) for indirect block at index %d", + idb->idb_nents, new_ent)); + + /* Done if the block is already allocated. */ + if (idb_block(idb, new_ent) != NULL) + return; + + sx_xunlock(sx); + nblock = malloc(IDB_BLOCK_SIZE, M_FILEDESC, M_ZERO | M_WAITOK); + sx_xlock(sx); + + /* Done if block was allocated when the lock was dropped. */ + if (idb_block(idb, new_ent) != NULL) { + free(nblock, M_FILEDESC); + return; + } + + idb->idb_tbl.indirect[idb_block_index(new_ent)] = nblock; +} + +/** + * idb_ensure_size() guarantees that: + * 1. If the table is flat, the table will be made large enough for new_ent, + * possibly being transitioned to an indirect table. + * + * 2. If the table is indirect, the indirect table is large enough to have an + * entry to point to the indirect block, and the indirect block itself is + * allocated. + * + * The sx lock will be released if new memory needs to be allocated, but will + * be reacquired before returning. + * + * @param idb Table to ensure new_ent fits in. + * @param new_ent New entry index. + * @param maxsize Max size of the table so excess memory isn't used. + * @param sx Exclusive lock that may be dropped/reqacquired. + */ +static void +idb_ensure_size(struct idb_table *idb, int new_ent, int maxsize, struct sx *sx) +{ + KASSERT(idb->idb_nents > 0, ("zero-length idb table")); + KASSERT(new_ent < maxsize, + ("new_ent(%d) >= maxsize(%d)", new_ent, maxsize)); + + sx_assert(sx, SX_XLOCKED | SX_NOTRECURSED); + + /* Grow table 2x while it is flat. */ + if (idb_is_flat(idb) && new_ent < IDB_ENTS_PER_BLOCK) { + if (new_ent >= idb->idb_nents) { + KASSERT(new_ent > 0, ("Negative new_ent %d", new_ent)); + /* Round up to power of 2 to appease the allocator. */ + idb_grow_table(idb, min(min(1 << (fls(new_ent)), + IDB_ENTS_PER_BLOCK), maxsize), 1, sx); + } + return; + } + + /* Transition flat table to indirect. */ + if (idb_is_flat(idb) && new_ent >= IDB_ENTS_PER_BLOCK) { + idb_grow_table(idb, IDB_ENTS_PER_BLOCK, 1, sx); + idb_transition_to_indirect(idb, sx); + } + + /* Grow size of indirect table. */ + if (new_ent >= idb->idb_nents) { + int grow_factor, new_nents; + /* Need to grow the indirect table. */ + for (grow_factor = 2;; grow_factor <<= 1) { + if (idb_block_index(idb->idb_nents) * grow_factor > + idb_block_index(new_ent)) + break; + } + new_nents = min(idb_block_index(idb->idb_nents) * grow_factor, + idb_block_index(maxsize)); + idb_grow_table(idb, new_nents, IDB_ENTS_PER_BLOCK, sx); + } + + /* Ensure block is allocated in sparse table. */ + idb_ensure_indirect_block(idb, new_ent, sx); +} + +/** + * Get the file struct for an fd from the ftable. + * + * @return The file struct for a particular or NULL. + */ +struct file * +ftable_get(struct filedesc *fdp, int fd) +{ + struct file **fpp; + + FILEDESC_LOCK_ASSERT(fdp); + + fpp = idb_get_entry(&fdp->fd_files, fd); + return (fpp != NULL ? *fpp : NULL); +} + +/** + * Set an entry in the table to point to a struct file. ftable_ensure_fd() + * must be first called to ensure the underlying data structure can support + * this entry. + */ +void +ftable_set(struct filedesc *fdp, int fd, struct file *fp) +{ + struct file **fpp; + + FILEDESC_XLOCK_ASSERT(fdp); + + fpp = idb_get_entry(&fdp->fd_files, fd); + KASSERT(fpp != NULL, ("Trying to set unallocated entry")); + *fpp = fp; +} + +/** + * Get the close exec state of a file descriptor. + * + * @return 1 if close exec is set, otherwise 0. + */ +int +ftable_get_cloexec(struct filedesc *fdp, int fd) +{ + NDSLOTTYPE *map; + + FILEDESC_LOCK_ASSERT(fdp); + + map = idb_get_entry(&fdp->fd_cloexec, NDSLOT(fd)); + if (map == NULL) + return (0); + + return ((*map & NDBIT(fd)) != 0); +} + +/** + * Set the close exec state of a file descriptor. + * + * @param on 1: close exec state will be turned on. + * 0: close exec state will be turned off. + */ +void +ftable_set_cloexec(struct filedesc *fdp, int fd, int on) +{ + NDSLOTTYPE *map; + + FILEDESC_XLOCK_ASSERT(fdp); + + map = idb_get_entry(&fdp->fd_cloexec, NDSLOT(fd)); + KASSERT(map != NULL, ("trying to set cloexec on an unallocated file")); + + if (on) + *map |= NDBIT(fd); + else + *map &= ~NDBIT(fd); +} + +/** + * If the ftable is already large enough to store the fd, then simply return. + * Otherwise, allocate the necessary blocks to accomodate the new fd. This + * allows for a sparse table. May malloc new blocks requiring the fdp lock to + * be dropped and reacquired. + * + * @param nfd File descriptor to possilbly grow the table to fit. + * @param maxfd Maximum fd so excess memory isn't used. + */ +static void +ftable_ensure_fd(struct filedesc *fdp, int nfd, int maxfd) +{ + FILEDESC_XLOCK_ASSERT(fdp); + + KASSERT(nfd <= maxfd, ("nfd(%d) > maxfd(%d)", nfd, maxfd)); + + idb_ensure_size(&fdp->fd_files, nfd, maxfd + 1, &fdp->fd_sx); + idb_ensure_size(&fdp->fd_map, NDSLOT(nfd), NDSLOT(maxfd) + 1, + &fdp->fd_sx); + idb_ensure_size(&fdp->fd_cloexec, NDSLOT(nfd), NDSLOT(maxfd) + 1, + &fdp->fd_sx); + + /* + * ft_map and ft_cloexec grow at the same rate, but ft_files grows at + * a different rate, so advertise table size as the min. + */ + fdp->fd_nfiles = min(fdp->fd_files.idb_nents, + fdp->fd_map.idb_nents * NDENTRIES); +} /* * Basic allocation of descriptors: @@ -150,8 +545,8 @@ struct filedesc0 { * <= NDFILE, and are then pointed to by the pointers above. */ struct file *fd_dfiles[NDFILE]; - char fd_dfileflags[NDFILE]; NDSLOTTYPE fd_dmap[NDSLOTS(NDFILE)]; + NDSLOTTYPE fd_dcloexec[NDSLOTS(NDFILE)]; }; /* @@ -166,14 +561,13 @@ void (*mq_fdclose)(struct thread *td, int fd, struct file *fp); /* A mutex to protect the association between a proc and filedesc. */ static struct mtx fdesc_mtx; -/* - * Find the first zero bit in the given bitmap, starting at low and not - * exceeding size - 1. +/** + * Iterate a flat array searching for the first zero bit in the given bitmap, + * starting at low and not exceeding size - 1. */ static int -fd_first_free(struct filedesc *fdp, int low, int size) +fd_first_free_block(NDSLOTTYPE *map, int low, int size) { - NDSLOTTYPE *map = fdp->fd_map; NDSLOTTYPE mask; int off, maxoff; @@ -193,14 +587,61 @@ fd_first_free(struct filedesc *fdp, int low, int size) return (size); } +/** + * Iterate the indirect block table fd map searching for the first free fd, + * starting at low. Return the current number of entries in the table if none + * are free. + */ +static int +fd_first_free(struct filedesc *fdp, int low) +{ + struct idb_table *idb = &fdp->fd_map; + NDSLOTTYPE *block; + int indx; + + FILEDESC_LOCK_ASSERT(fdp); + + /* Flat table. */ + if (idb_is_flat(idb)) + return (fd_first_free_block(idb->idb_tbl.flat, low, + idb->idb_nents * NDENTRIES)); + + /* Loop through the indirect blocks. */ + for (indx = idb_block_index(NDSLOT(low)); + indx < idb_block_index(idb->idb_nents); + indx++) { + int block_low, free_ent; + + block = idb->idb_tbl.indirect[indx]; + if (block == NULL) { + /* Unallocated block, so the first index is fine. */ + free_ent = indx * IDB_ENTS_PER_BLOCK * NDENTRIES; + return (max(free_ent, low)); + } + + /* Scan block, starting mid-block if necessary. */ + block_low = (indx == idb_block_index(NDSLOT(low))) ? + idb_block_off(NDSLOT(low)) * NDENTRIES : 0; + free_ent = fd_first_free_block(block, block_low, + IDB_ENTS_PER_BLOCK * NDENTRIES); + + /* If there was a free fd, return it. */ + if (free_ent < IDB_ENTS_PER_BLOCK * NDENTRIES) + return (indx * IDB_ENTS_PER_BLOCK * NDENTRIES + + free_ent); + } + + /* No free fds found. */ + return (idb->idb_nents); +} + /* * Find the highest non-zero bit in the given bitmap, starting at low and * not exceeding size - 1. */ static int -fd_last_used(struct filedesc *fdp, int low, int size) +fd_last_used_block(NDSLOTTYPE *map, int low, int size) { - NDSLOTTYPE *map = fdp->fd_map; NDSLOTTYPE mask; int off, minoff; @@ -220,12 +661,65 @@ fd_last_used(struct filedesc *fdp, int low, int size) return (low - 1); } +/** + * Iterate the indirect block table fd map searching for the highest non-zero + * bit, starting at low and not exceeding size - 1. Return low -1 if no fds + * >= low are used. + */ +static int +fd_last_used(struct filedesc *fdp, int low, int size) +{ + struct idb_table *idb = &fdp->fd_map; + NDSLOTTYPE *block; + int indx; + + FILEDESC_LOCK_ASSERT(fdp); + + /* Flat table. */ + if (idb_is_flat(idb)) + return (fd_last_used_block(idb->idb_tbl.flat, low, size)); + + /* Loop through the indirect blocks backwards. */ + for (indx = idb_block_index(NDSLOT(size)); + indx >= idb_block_index(NDSLOT(low)); + indx--) { + int block_low, block_high, used_ent; + + block = idb->idb_tbl.indirect[indx]; + /* If the block is sparse, move onto the next one. */ + if (block == NULL) + continue; + + /* Scan block, starting/ending mid-block if necessary. */ + block_low = (indx == idb_block_index(NDSLOT(low))) ? + idb_block_off(NDSLOT(low)) * NDENTRIES : 0; + block_high = (indx == idb_block_index(NDSLOT(size))) ? + idb_block_off(NDSLOT(size)) * NDENTRIES : + IDB_ENTS_PER_BLOCK; + used_ent = fd_last_used_block(block, block_low, block_high); + + /* If there was a used fd, return it. */ + if (used_ent >= block_low) + return (indx * IDB_ENTS_PER_BLOCK * NDENTRIES + + used_ent); + } + + /* No used fds found. */ + return (low - 1); +} + static int fdisused(struct filedesc *fdp, int fd) { + NDSLOTTYPE *map; + + FILEDESC_LOCK_ASSERT(fdp); KASSERT(fd >= 0 && fd < fdp->fd_nfiles, ("file descriptor %d out of range (0, %d)", fd, fdp->fd_nfiles)); - return ((fdp->fd_map[NDSLOT(fd)] & NDBIT(fd)) != 0); + + map = idb_get_entry(&fdp->fd_map, NDSLOT(fd)); + + return (map && (*map & NDBIT(fd)) != 0); } /* @@ -234,16 +728,19 @@ fdisused(struct filedesc *fdp, int fd) static void fdused(struct filedesc *fdp, int fd) { + NDSLOTTYPE *map; FILEDESC_XLOCK_ASSERT(fdp); - KASSERT(!fdisused(fdp, fd), - ("fd already used")); + KASSERT(!fdisused(fdp, fd), ("fd already used")); - fdp->fd_map[NDSLOT(fd)] |= NDBIT(fd); + map = idb_get_entry(&fdp->fd_map, NDSLOT(fd)); + KASSERT(map != NULL, ("Map block is NULL")); + + *map |= NDBIT(fd); if (fd > fdp->fd_lastfile) fdp->fd_lastfile = fd; if (fd == fdp->fd_freefile) - fdp->fd_freefile = fd_first_free(fdp, fd, fdp->fd_nfiles); + fdp->fd_freefile = fd_first_free(fdp, fd); } /* @@ -253,13 +750,19 @@ static void fdunused(struct filedesc *fdp, int fd) { + NDSLOTTYPE *map; + FILEDESC_XLOCK_ASSERT(fdp); KASSERT(fdisused(fdp, fd), ("fd is already unused")); - KASSERT(fdp->fd_ofiles[fd] == NULL, + KASSERT(ftable_get(fdp, fd) == NULL, ("fd is still in use")); - fdp->fd_map[NDSLOT(fd)] &= ~NDBIT(fd); + map = idb_get_entry(&fdp->fd_map, NDSLOT(fd)); + KASSERT(map != NULL, ("Map block is NULL")); + + *map &= ~NDBIT(fd); + if (fd < fdp->fd_freefile) fdp->fd_freefile = fd; if (fd == fdp->fd_lastfile) @@ -410,7 +913,7 @@ fdtofp(int fd, struct filedesc *fdp) FILEDESC_LOCK_ASSERT(fdp); if ((unsigned)fd >= fdp->fd_nfiles || - (fp = fdp->fd_ofiles[fd]) == NULL) + (fp = ftable_get(fdp, fd)) == NULL) return (NULL); return (fp); } @@ -422,7 +925,6 @@ kern_fcntl(struct thread *td, int fd, int cmd, intptr_t arg) struct flock *flp; struct file *fp; struct proc *p; - char *pop; struct vnode *vp; u_int newmin; int error, flg, tmp; @@ -467,8 +969,8 @@ kern_fcntl(struct thread *td, int fd, int cmd, intptr_t arg) error = EBADF; break; } - pop = &fdp->fd_ofileflags[fd]; - td->td_retval[0] = (*pop & UF_EXCLOSE) ? FD_CLOEXEC : 0; + td->td_retval[0] = ftable_get_cloexec(fdp, fd) ? + FD_CLOEXEC :0; FILEDESC_SUNLOCK(fdp); break; @@ -479,9 +981,7 @@ kern_fcntl(struct thread *td, int fd, int cmd, intptr_t arg) error = EBADF; break; } - pop = &fdp->fd_ofileflags[fd]; - *pop = (*pop &~ UF_EXCLOSE) | - (arg & FD_CLOEXEC ? UF_EXCLOSE : 0); + ftable_set_cloexec(fdp, fd, arg & FD_CLOEXEC); FILEDESC_XUNLOCK(fdp); break; @@ -651,7 +1151,7 @@ kern_fcntl(struct thread *td, int fd, int cmd, intptr_t arg) /* Check for race with close */ FILEDESC_SLOCK(fdp); if ((unsigned) fd >= fdp->fd_nfiles || - fp != fdp->fd_ofiles[fd]) { + fp != ftable_get(fdp, fd)) { FILEDESC_SUNLOCK(fdp); flp->l_whence = SEEK_SET; flp->l_start = 0; @@ -750,7 +1250,7 @@ do_dup(struct thread *td, enum dup_type type, int old, int new, return (EMFILE); FILEDESC_XLOCK(fdp); - if (old >= fdp->fd_nfiles || fdp->fd_ofiles[old] == NULL) { + if (old >= fdp->fd_nfiles || ftable_get(fdp, old) == NULL) { FILEDESC_XUNLOCK(fdp); return (EBADF); } @@ -759,7 +1259,7 @@ do_dup(struct thread *td, enum dup_type type, int old, int new, FILEDESC_XUNLOCK(fdp); return (0); } - fp = fdp->fd_ofiles[old]; + fp = ftable_get(fdp, old); fhold(fp); /* @@ -770,9 +1270,8 @@ do_dup(struct thread *td, enum dup_type type, int old, int new, * out for a race. */ if (type == DUP_FIXED) { - if (new >= fdp->fd_nfiles) - fdgrowtable(fdp, new + 1); - if (fdp->fd_ofiles[new] == NULL) + ftable_ensure_fd(fdp, new, maxfd); + if (ftable_get(fdp, new) == NULL) fdused(fdp, new); } else { if ((error = fdalloc(td, new, &new)) != 0) { @@ -787,9 +1286,9 @@ do_dup(struct thread *td, enum dup_type type, int old, int new, * bad file descriptor. Userland should do its own locking to * avoid this case. */ - if (fdp->fd_ofiles[old] != fp) { + if (ftable_get(fdp, old) != fp) { /* we've allocated a descriptor which we won't use */ - if (fdp->fd_ofiles[new] == NULL) + if (ftable_get(fdp, new) == NULL) fdunused(fdp, new); FILEDESC_XUNLOCK(fdp); fdrop(fp, td); @@ -805,7 +1304,7 @@ do_dup(struct thread *td, enum dup_type type, int old, int new, * * XXX this duplicates parts of close(). */ - delfp = fdp->fd_ofiles[new]; + delfp = ftable_get(fdp, new); holdleaders = 0; if (delfp != NULL) { if (td->td_proc->p_fdtol != NULL) { @@ -821,8 +1320,8 @@ do_dup(struct thread *td, enum dup_type type, int old, int new, /* * Duplicate the source descriptor */ - fdp->fd_ofiles[new] = fp; - fdp->fd_ofileflags[new] = fdp->fd_ofileflags[old] &~ UF_EXCLOSE; + ftable_set(fdp, new, fp); + ftable_set_cloexec(fdp, new, 0); if (new > fdp->fd_lastfile) fdp->fd_lastfile = new; *retval = new; @@ -1111,12 +1610,12 @@ kern_close(td, fd) FILEDESC_XLOCK(fdp); if ((unsigned)fd >= fdp->fd_nfiles || - (fp = fdp->fd_ofiles[fd]) == NULL) { + (fp = ftable_get(fdp, fd)) == NULL) { FILEDESC_XUNLOCK(fdp); return (EBADF); } - fdp->fd_ofiles[fd] = NULL; - fdp->fd_ofileflags[fd] = 0; + ftable_set(fdp, fd, NULL); + ftable_set_cloexec(fdp, fd, 0); fdunused(fdp, fd); if (td->td_proc->p_fdtol != NULL) { /* @@ -1178,7 +1677,7 @@ closefrom(struct thread *td, struct closefrom_args *uap) uap->lowfd = 0; FILEDESC_SLOCK(fdp); for (fd = uap->lowfd; fd < fdp->fd_nfiles; fd++) { - if (fdp->fd_ofiles[fd] != NULL) { + if (ftable_get(fdp, fd) != NULL) { FILEDESC_SUNLOCK(fdp); (void)kern_close(td, fd); FILEDESC_SLOCK(fdp); @@ -1806,70 +2305,6 @@ out: } /* - * Grow the file table to accomodate (at least) nfd descriptors. This may - * block and drop the filedesc lock, but it will reacquire it before - * returning. - */ -static void -fdgrowtable(struct filedesc *fdp, int nfd) -{ - struct file **ntable; - char *nfileflags; - int nnfiles, onfiles; - NDSLOTTYPE *nmap; - - FILEDESC_XLOCK_ASSERT(fdp); - - KASSERT(fdp->fd_nfiles > 0, - ("zero-length file table")); - - /* compute the size of the new table */ - onfiles = fdp->fd_nfiles; - nnfiles = NDSLOTS(nfd) * NDENTRIES; /* round up */ - if (nnfiles <= onfiles) - /* the table is already large enough */ - return; - - /* allocate a new table and (if required) new bitmaps */ - FILEDESC_XUNLOCK(fdp); - MALLOC(ntable, struct file **, nnfiles * OFILESIZE, - M_FILEDESC, M_ZERO | M_WAITOK); - nfileflags = (char *)&ntable[nnfiles]; - if (NDSLOTS(nnfiles) > NDSLOTS(onfiles)) - MALLOC(nmap, NDSLOTTYPE *, NDSLOTS(nnfiles) * NDSLOTSIZE, - M_FILEDESC, M_ZERO | M_WAITOK); - else - nmap = NULL; - FILEDESC_XLOCK(fdp); - - /* - * We now have new tables ready to go. Since we dropped the - * filedesc lock to call malloc(), watch out for a race. - */ - onfiles = fdp->fd_nfiles; - if (onfiles >= nnfiles) { - /* we lost the race, but that's OK */ - free(ntable, M_FILEDESC); - if (nmap != NULL) - free(nmap, M_FILEDESC); - return; - } - bcopy(fdp->fd_ofiles, ntable, onfiles * sizeof(*ntable)); - bcopy(fdp->fd_ofileflags, nfileflags, onfiles); - if (onfiles > NDFILE) - free(fdp->fd_ofiles, M_FILEDESC); - fdp->fd_ofiles = ntable; - fdp->fd_ofileflags = nfileflags; - if (NDSLOTS(nnfiles) > NDSLOTS(onfiles)) { - bcopy(fdp->fd_map, nmap, NDSLOTS(onfiles) * sizeof(*nmap)); - if (NDSLOTS(onfiles) > NDSLOTS(NDFILE)) - free(fdp->fd_map, M_FILEDESC); - fdp->fd_map = nmap; - } - fdp->fd_nfiles = nnfiles; -} - -/* * Allocate a file descriptor for the process. */ int @@ -1891,16 +2326,18 @@ fdalloc(struct thread *td, int minfd, int *result) /* * Search the bitmap for a free descriptor. If none is found, try * to grow the file table. Keep at it until we either get a file - * descriptor or run into process or system limits; fdgrowtable() + * descriptor or run into process or system limits; ftable_ensure_fd() * may drop the filedesc lock, so we're in a race. */ for (;;) { - fd = fd_first_free(fdp, minfd, fdp->fd_nfiles); + fd = fd_first_free(fdp, minfd); if (fd >= maxfd) return (EMFILE); - if (fd < fdp->fd_nfiles) + /* Grow if necessary. */ + ftable_ensure_fd(fdp, fd, maxfd); + /* Required check since ftable_ensure_fd() can drop xlock. */ + if (ftable_get(fdp, fd) == NULL) break; - fdgrowtable(fdp, min(fdp->fd_nfiles * 2, maxfd)); } /* @@ -1909,9 +2346,9 @@ fdalloc(struct thread *td, int minfd, int *result) */ KASSERT(!fdisused(fdp, fd), ("fd_first_free() returned non-free descriptor")); - KASSERT(fdp->fd_ofiles[fd] == NULL, + KASSERT(ftable_get(fdp, fd) == NULL, ("free descriptor isn't")); - fdp->fd_ofileflags[fd] = 0; /* XXX needed? */ + ftable_set_cloexec(fdp, fd, 0); /* XXX needed? */ fdused(fdp, fd); *result = fd; return (0); @@ -1926,7 +2363,7 @@ fdavail(struct thread *td, int n) { struct proc *p = td->td_proc; struct filedesc *fdp = td->td_proc->p_fd; - struct file **fpp; + struct file *fp; int i, lim, last; FILEDESC_LOCK_ASSERT(fdp); @@ -1937,9 +2374,10 @@ fdavail(struct thread *td, int n) if ((i = lim - fdp->fd_nfiles) > 0 && (n -= i) <= 0) return (1); last = min(fdp->fd_nfiles, lim); - fpp = &fdp->fd_ofiles[fdp->fd_freefile]; - for (i = last - fdp->fd_freefile; --i >= 0; fpp++) { - if (*fpp == NULL && --n <= 0) + fp = ftable_get(fdp, fdp->fd_freefile); + for (i = last - fdp->fd_freefile; --i >= 0; + fp = ftable_get(fdp, last - i)) { + if (fp == NULL && --n <= 0) return (1); } return (0); @@ -2017,7 +2455,7 @@ falloc(struct thread *td, struct file **resultfp, int *resultfd) ifs_init_lockdata(fp); FILEDESC_XLOCK(p->p_fd); - if ((fq = p->p_fd->fd_ofiles[0])) { + if ((fq = ftable_get(p->p_fd, 0))) { LIST_INSERT_AFTER(fq, fp, f_list); } else { LIST_INSERT_HEAD(&filehead, fp, f_list); @@ -2030,7 +2468,7 @@ falloc(struct thread *td, struct file **resultfp, int *resultfd) fdrop(fp, td); return (error); } - p->p_fd->fd_ofiles[i] = fp; + ftable_set(p->p_fd, i, fp); FILEDESC_XUNLOCK(p->p_fd); if (resultfp) *resultfp = fp; @@ -2068,10 +2506,13 @@ fdinit(struct filedesc *fdp) newfdp->fd_fd.fd_refcnt = 1; newfdp->fd_fd.fd_holdcnt = 1; newfdp->fd_fd.fd_cmask = CMASK; - newfdp->fd_fd.fd_ofiles = newfdp->fd_dfiles; - newfdp->fd_fd.fd_ofileflags = newfdp->fd_dfileflags; newfdp->fd_fd.fd_nfiles = NDFILE; - newfdp->fd_fd.fd_map = newfdp->fd_dmap; + + idb_init(&newfdp->fd_fd.fd_files, &newfdp->fd_dfiles, NDFILE); + idb_init(&newfdp->fd_fd.fd_map, &newfdp->fd_dmap, NDSLOTS(NDFILE)); + idb_init(&newfdp->fd_fd.fd_cloexec, &newfdp->fd_dcloexec, + NDSLOTS(NDFILE)); + newfdp->fd_fd.fd_lastfile = -1; return (&newfdp->fd_fd); } @@ -2144,6 +2585,7 @@ struct filedesc * fdcopy(struct filedesc *fdp) { struct filedesc *newfdp; + struct file *fp; int i; /* Certain daemons might not have file descriptors. */ @@ -2152,23 +2594,23 @@ fdcopy(struct filedesc *fdp) newfdp = fdinit(fdp); FILEDESC_SLOCK(fdp); - while (fdp->fd_lastfile >= newfdp->fd_nfiles) { - FILEDESC_SUNLOCK(fdp); - FILEDESC_XLOCK(newfdp); - fdgrowtable(newfdp, fdp->fd_lastfile + 1); - FILEDESC_XUNLOCK(newfdp); - FILEDESC_SLOCK(fdp); - } /* copy everything except kqueue descriptors */ newfdp->fd_freefile = -1; for (i = 0; i <= fdp->fd_lastfile; ++i) { - if (fdisused(fdp, i) && - fdp->fd_ofiles[i]->f_type != DTYPE_KQUEUE && - fdp->fd_ofiles[i]->f_ops != &badfileops) { - newfdp->fd_ofiles[i] = fdp->fd_ofiles[i]; - newfdp->fd_ofileflags[i] = fdp->fd_ofileflags[i]; - fhold(newfdp->fd_ofiles[i]); + if (fdisused(fdp, i) && (fp = ftable_get(fdp, i)) && + fp->f_type != DTYPE_KQUEUE && fp->f_ops != &badfileops) { + int cloexec = ftable_get_cloexec(fdp, i); + int maxfd = fdp->fd_lastfile; + + FILEDESC_SUNLOCK(fdp); + FILEDESC_XLOCK(newfdp); + ftable_ensure_fd(newfdp, i, maxfd); + ftable_set(newfdp, i, fp); + ftable_set_cloexec(newfdp, i, cloexec); newfdp->fd_lastfile = i; + FILEDESC_XUNLOCK(newfdp); + FILEDESC_SLOCK(fdp); + fhold(fp); } else { if (newfdp->fd_freefile == -1) newfdp->fd_freefile = i; @@ -2177,7 +2619,7 @@ fdcopy(struct filedesc *fdp) FILEDESC_SUNLOCK(fdp); FILEDESC_XLOCK(newfdp); for (i = 0; i <= newfdp->fd_lastfile; ++i) - if (newfdp->fd_ofiles[i] != NULL) + if (ftable_get(newfdp, i) != NULL) fdused(newfdp, i); FILEDESC_XUNLOCK(newfdp); FILEDESC_SLOCK(fdp); @@ -2195,7 +2637,6 @@ void fdfree(struct thread *td) { struct filedesc *fdp; - struct file **fpp; int i, locked; struct filedesc_to_leader *fdtol; struct file *fp; @@ -2216,13 +2657,10 @@ fdfree(struct thread *td) fdtol->fdl_refcount)); if (fdtol->fdl_refcount == 1 && (td->td_proc->p_leader->p_flag & P_ADVLOCK) != 0) { - for (i = 0, fpp = fdp->fd_ofiles; - i <= fdp->fd_lastfile; - i++, fpp++) { - if (*fpp == NULL || - (*fpp)->f_type != DTYPE_VNODE) + for (i = 0; i <= fdp->fd_lastfile; i++) { + fp = ftable_get(fdp, i); + if (fp == NULL || fp->f_type != DTYPE_VNODE) continue; - fp = *fpp; fhold(fp); FILEDESC_XUNLOCK(fdp); lf.l_whence = SEEK_SET; @@ -2240,7 +2678,6 @@ fdfree(struct thread *td) VFS_UNLOCK_GIANT(locked); FILEDESC_XLOCK(fdp); fdrop(fp, td); - fpp = fdp->fd_ofiles + i; } } retry: @@ -2281,31 +2718,29 @@ fdfree(struct thread *td) } FILEDESC_XLOCK(fdp); i = --fdp->fd_refcnt; - FILEDESC_XUNLOCK(fdp); - if (i > 0) + if (i > 0) { + FILEDESC_XUNLOCK(fdp); return; + } - fpp = fdp->fd_ofiles; - for (i = fdp->fd_lastfile; i-- >= 0; fpp++) { - if (*fpp) { - FILEDESC_XLOCK(fdp); - fp = *fpp; - *fpp = NULL; + for (i = fdp->fd_lastfile; i >= 0 ; i--) { + fp = ftable_get(fdp, i); + if (fp) { + ftable_set(fdp, i, NULL); FILEDESC_XUNLOCK(fdp); (void) closef(fp, td); + FILEDESC_XLOCK(fdp); } } - FILEDESC_XLOCK(fdp); /* XXX This should happen earlier. */ mtx_lock(&fdesc_mtx); td->td_proc->p_fd = NULL; mtx_unlock(&fdesc_mtx); - if (fdp->fd_nfiles > NDFILE) - FREE(fdp->fd_ofiles, M_FILEDESC); - if (NDSLOTS(fdp->fd_nfiles) > NDSLOTS(NDFILE)) - FREE(fdp->fd_map, M_FILEDESC); + idb_free(&fdp->fd_files); + idb_free(&fdp->fd_map); + idb_free(&fdp->fd_cloexec); fdp->fd_nfiles = 0; @@ -2377,19 +2812,20 @@ setugidsafety(struct thread *td) */ FILEDESC_XLOCK(fdp); for (i = 0; i <= fdp->fd_lastfile; i++) { + struct file *fp; + if (i > 2) break; - if (fdp->fd_ofiles[i] && is_unsafe(fdp->fd_ofiles[i])) { - struct file *fp; + fp = ftable_get(fdp, i); + if (fp && is_unsafe(fp)) { knote_fdclose(td, i); /* * NULL-out descriptor prior to close to avoid * a race while close blocks. */ - fp = fdp->fd_ofiles[i]; - fdp->fd_ofiles[i] = NULL; - fdp->fd_ofileflags[i] = 0; + ftable_set(fdp, i, NULL); + ftable_set_cloexec(fdp, i, 0); fdunused(fdp, i); FILEDESC_XUNLOCK(fdp); (void) closef(fp, td); @@ -2411,8 +2847,8 @@ fdclose(struct filedesc *fdp, struct file *fp, int idx, struct thread *td) { FILEDESC_XLOCK(fdp); - if (fdp->fd_ofiles[idx] == fp) { - fdp->fd_ofiles[idx] = NULL; + if (ftable_get(fdp, idx) == fp) { + ftable_set(fdp, idx, NULL); fdunused(fdp, idx); FILEDESC_XUNLOCK(fdp); fdrop(fp, td); @@ -2441,19 +2877,20 @@ fdcloseexec(struct thread *td) * may block and rip them out from under us. */ for (i = 0; i <= fdp->fd_lastfile; i++) { - if (fdp->fd_ofiles[i] != NULL && - (fdp->fd_ofiles[i]->f_type == DTYPE_MQUEUE || - (fdp->fd_ofileflags[i] & UF_EXCLOSE))) { - struct file *fp; + struct file *fp; + + fp = ftable_get(fdp, i); + if (fp != NULL && + (fp->f_type == DTYPE_MQUEUE || + ftable_get_cloexec(fdp, i))) { knote_fdclose(td, i); /* * NULL-out descriptor prior to close to avoid * a race while close blocks. */ - fp = fdp->fd_ofiles[i]; - fdp->fd_ofiles[i] = NULL; - fdp->fd_ofileflags[i] = 0; + ftable_set(fdp, i, NULL); + ftable_set_cloexec(fdp, i, 0); fdunused(fdp, i); if (fp->f_type == DTYPE_MQUEUE) mq_fdclose(td, i, fp); @@ -2486,7 +2923,7 @@ fdcheckstd(struct thread *td) devnull = -1; error = 0; for (i = 0; i < 3; i++) { - if (fdp->fd_ofiles[i] != NULL) + if (ftable_get(fdp, i) != NULL) continue; if (devnull < 0) { save = td->td_retval[0]; @@ -2904,7 +3341,7 @@ dupfdopen(struct thread *td, struct filedesc *fdp, int indx, int dfd, int mode, */ FILEDESC_XLOCK(fdp); if (dfd < 0 || dfd >= fdp->fd_nfiles || - (wfp = fdp->fd_ofiles[dfd]) == NULL) { + (wfp = ftable_get(fdp, dfd)) == NULL) { FILEDESC_XUNLOCK(fdp); return (EBADF); } @@ -2931,9 +3368,9 @@ dupfdopen(struct thread *td, struct filedesc *fdp, int indx, int dfd, int mode, FILEDESC_XUNLOCK(fdp); return (EACCES); } - fp = fdp->fd_ofiles[indx]; - fdp->fd_ofiles[indx] = wfp; - fdp->fd_ofileflags[indx] = fdp->fd_ofileflags[dfd]; + fp = ftable_get(fdp, indx); + ftable_set(fdp, indx, wfp); + ftable_set_cloexec(fdp, indx, ftable_get_cloexec(fdp, dfd)); if (fp == NULL) fdused(fdp, indx); fhold_locked(wfp); @@ -2951,11 +3388,11 @@ dupfdopen(struct thread *td, struct filedesc *fdp, int indx, int dfd, int mode, /* * Steal away the file pointer from dfd and stuff it into indx. */ - fp = fdp->fd_ofiles[indx]; - fdp->fd_ofiles[indx] = fdp->fd_ofiles[dfd]; - fdp->fd_ofiles[dfd] = NULL; - fdp->fd_ofileflags[indx] = fdp->fd_ofileflags[dfd]; - fdp->fd_ofileflags[dfd] = 0; + fp = ftable_get(fdp, indx); + ftable_set(fdp, indx, ftable_get(fdp, dfd)); + ftable_set(fdp, dfd, NULL); + ftable_set_cloexec(fdp, indx, ftable_get_cloexec(fdp, dfd)); + ftable_set_cloexec(fdp, dfd, 0); fdunused(fdp, dfd); if (fp == NULL) fdused(fdp, indx); @@ -3103,7 +3540,7 @@ sysctl_kern_file(SYSCTL_HANDLER_ARGS) continue; FILEDESC_SLOCK(fdp); for (n = 0; fdp->fd_refcnt > 0 && n < fdp->fd_nfiles; ++n) { - if ((fp = fdp->fd_ofiles[n]) == NULL) + if ((fp = ftable_get(fdp, n)) == NULL) continue; xf.xf_fd = n; xf.xf_file = fp; @@ -3215,7 +3652,7 @@ sysctl_kern_proc_ofiledesc(SYSCTL_HANDLER_ARGS) export_vnode_for_osysctl(fdp->fd_jdir, KF_FD_TYPE_JAIL, kif, fdp, req); for (i = 0; i < fdp->fd_nfiles; i++) { - if ((fp = fdp->fd_ofiles[i]) == NULL) + if ((fp = ftable_get(fdp, i)) == NULL) continue; bzero(kif, sizeof(*kif)); kif->kf_structsize = sizeof(*kif); @@ -3450,7 +3887,7 @@ sysctl_kern_proc_filedesc(SYSCTL_HANDLER_ARGS) export_vnode_for_sysctl(fdp->fd_jdir, KF_FD_TYPE_JAIL, kif, fdp, req); for (i = 0; i < fdp->fd_nfiles; i++) { - if ((fp = fdp->fd_ofiles[i]) == NULL) + if ((fp = ftable_get(fdp, i)) == NULL) continue; bzero(kif, sizeof(*kif)); FILE_LOCK(fp); @@ -3669,7 +4106,7 @@ file_to_first_proc(struct file *fp) if (fdp == NULL) continue; for (n = 0; n < fdp->fd_nfiles; n++) { - if (fp == fdp->fd_ofiles[n]) + if (fp == ftable_get(fdp, n)) return (p); } } diff --git a/src/sys/kern/kern_lsof.c b/src/sys/kern/kern_lsof.c index 04e5dd7..70a8286 100644 --- a/src/sys/kern/kern_lsof.c +++ b/src/sys/kern/kern_lsof.c @@ -260,7 +260,7 @@ lsof(struct thread *td, struct lsof_args *uap) /* Ordinary descriptors for files, pipes, sockets: */ } else if (msg.fd < fdp->fd_nfiles) { - fp = fdp->fd_ofiles[msg.fd]; + fp = ftable_get(fdp, msg.fd); if (fp) { switch (fp->f_type) { case DTYPE_VNODE: diff --git a/src/sys/kern/sys_generic.c b/src/sys/kern/sys_generic.c index 1a9b061..8aba73d 100644 --- a/src/sys/kern/sys_generic.c +++ b/src/sys/kern/sys_generic.c @@ -596,12 +596,12 @@ kern_ioctl(struct thread *td, int fd, u_long com, caddr_t data) switch (com) { case FIONCLEX: FILEDESC_XLOCK(fdp); - fdp->fd_ofileflags[fd] &= ~UF_EXCLOSE; + ftable_set_cloexec(fdp, fd, 0); FILEDESC_XUNLOCK(fdp); goto out; case FIOCLEX: FILEDESC_XLOCK(fdp); - fdp->fd_ofileflags[fd] |= UF_EXCLOSE; + ftable_set_cloexec(fdp, fd, 1); FILEDESC_XUNLOCK(fdp); goto out; case FIONBIO: @@ -1043,7 +1043,7 @@ pollscan(td, fds, nfd) } else if (fds->fd < 0) { fds->revents = 0; } else { - fp = fdp->fd_ofiles[fds->fd]; + fp = ftable_get(fdp, fds->fd); if (fp == NULL) { fds->revents = POLLNVAL; n++; diff --git a/src/sys/kern/uipc_mqueue.c b/src/sys/kern/uipc_mqueue.c index fb2ef6a..59c339a 100644 --- a/src/sys/kern/uipc_mqueue.c +++ b/src/sys/kern/uipc_mqueue.c @@ -2005,8 +2005,8 @@ kmq_open(struct thread *td, struct kmq_open_args *uap) FILE_UNLOCK(fp); FILEDESC_XLOCK(fdp); - if (fdp->fd_ofiles[fd] == fp) - fdp->fd_ofileflags[fd] |= UF_EXCLOSE; + if (ftable_get(fdp, fd) == fp) + ftable_set_cloexec(fdp, fd, 1); FILEDESC_XUNLOCK(fdp); td->td_retval[0] = fd; fdrop(fp, td); diff --git a/src/sys/kern/uipc_sem.c b/src/sys/kern/uipc_sem.c index d5525a4..b1e6b62 100644 --- a/src/sys/kern/uipc_sem.c +++ b/src/sys/kern/uipc_sem.c @@ -488,8 +488,8 @@ ksem_create(struct thread *td, const char *name, semid_t *semidp, mode_t mode, fp->f_ops = &ksem_ops; FILEDESC_XLOCK(fdp); - if (fdp->fd_ofiles[fd] == fp) - fdp->fd_ofileflags[fd] |= UF_EXCLOSE; + if (ftable_get(fdp, fd) == fp) + ftable_set_cloexec(fdp, fd, 1); FILEDESC_XUNLOCK(fdp); fdrop(fp, td); diff --git a/src/sys/kern/uipc_usrreq.c b/src/sys/kern/uipc_usrreq.c index b8255f0..1bfc037 100644 --- a/src/sys/kern/uipc_usrreq.c +++ b/src/sys/kern/uipc_usrreq.c @@ -1605,7 +1605,8 @@ unp_externalize(struct mbuf *control, struct mbuf **controlp) if (fdalloc(td, 0, &f)) panic("unp_externalize fdalloc failed"); fp = *rp++; - td->td_proc->p_fd->fd_ofiles[f] = fp; + ftable_set(td->td_proc->p_fd, f, + fp); FILE_LOCK(fp); fp->f_msgcount--; FILE_UNLOCK(fp); @@ -1735,12 +1736,12 @@ unp_internalize(struct mbuf **controlp, struct thread *td) for (i = 0; i < oldfds; i++) { fd = *fdp++; if ((unsigned)fd >= fdescp->fd_nfiles || - fdescp->fd_ofiles[fd] == NULL) { + ftable_get(fdescp, fd) == NULL) { FILEDESC_SUNLOCK(fdescp); error = EBADF; goto out; } - fp = fdescp->fd_ofiles[fd]; + fp = ftable_get(fdescp, fd); if (!(fp->f_ops->fo_flags & DFLAG_PASSABLE)) { FILEDESC_SUNLOCK(fdescp); error = EOPNOTSUPP; @@ -1765,7 +1766,7 @@ unp_internalize(struct mbuf **controlp, struct thread *td) rp = (struct file **) CMSG_DATA(mtod(*controlp, struct cmsghdr *)); for (i = 0; i < oldfds; i++) { - fp = fdescp->fd_ofiles[*fdp++]; + fp = ftable_get(fdescp, *fdp++); *rp++ = fp; FILE_LOCK(fp); fp->f_count++; diff --git a/src/sys/kern/vfs_syscalls.c b/src/sys/kern/vfs_syscalls.c index 2f28263..fa0a5e6 100644 --- a/src/sys/kern/vfs_syscalls.c +++ b/src/sys/kern/vfs_syscalls.c @@ -4884,7 +4884,7 @@ getvnode(fdp, fd, fpp) else { FILEDESC_SLOCK(fdp); if ((u_int)fd >= fdp->fd_nfiles || - (fp = fdp->fd_ofiles[fd]) == NULL) + (fp = ftable_get(fdp, fd)) == NULL) error = EBADF; else if (fp->f_vnode == NULL) { fp = NULL; diff --git a/src/sys/netsmb/smb_dev.c b/src/sys/netsmb/smb_dev.c index fd0dcbe..a0dd80c 100644 --- a/src/sys/netsmb/smb_dev.c +++ b/src/sys/netsmb/smb_dev.c @@ -370,7 +370,7 @@ nsmb_getfp(struct filedesc* fdp, int fd, int flag) FILEDESC_SLOCK(fdp); if (((u_int)fd) >= fdp->fd_nfiles || - (fp = fdp->fd_ofiles[fd]) == NULL || + (fp = ftable_get(fdp, fd)) == NULL || (fp->f_flag & flag) == 0) { FILEDESC_SUNLOCK(fdp); return (NULL); diff --git a/src/sys/sys/filedesc.h b/src/sys/sys/filedesc.h index 1831e5c..e9ea56a 100644 --- a/src/sys/sys/filedesc.h +++ b/src/sys/sys/filedesc.h @@ -45,16 +45,26 @@ * This structure is used for the management of descriptors. It may be * shared by multiple processes. */ -#define NDSLOTTYPE u_long +#define NDSLOTTYPE uintptr_t + +/* Generic indirect block table */ +struct idb_table { + union { + void *flat; + void **indirect; + } idb_tbl; + int idb_nents; /* Current max # of entries. */ + int idb_orig_nents; /* Orig # of entries for the flat table. */ +}; struct filedesc { - struct file **fd_ofiles; /* file structures for open files */ - char *fd_ofileflags; /* per-process open file flags */ + struct idb_table fd_files; /* table of open file structs */ + struct idb_table fd_map; /* bitmap of free fds */ + struct idb_table fd_cloexec; /* bitmap of fd close exec state */ struct vnode *fd_cdir; /* current directory */ struct vnode *fd_rdir; /* root directory */ struct vnode *fd_jdir; /* jail root directory */ int fd_nfiles; /* number of open files allocated */ - NDSLOTTYPE *fd_map; /* bitmap of free fds */ int fd_lastfile; /* high-water mark of fd_ofiles */ int fd_freefile; /* approx. next free file */ u_short fd_cmask; /* mask for file creation */ @@ -130,12 +140,18 @@ struct filedesc_to_leader * int getvnode(struct filedesc *fdp, int fd, struct file **fpp); void mountcheckdirs(struct vnode *olddp, struct vnode *newdp); void setugidsafety(struct thread *td); +struct file *ftable_get(struct filedesc *fdp, int fd); +void ftable_set(struct filedesc *fdp, int fd, struct file *fp); +int ftable_get_cloexec(struct filedesc *fdp, int fd); +void ftable_set_cloexec(struct filedesc *fdp, int fd, int on); + static __inline struct file * fget_locked(struct filedesc *fdp, int fd) { - return (fd < 0 || fd >= fdp->fd_nfiles ? NULL : fdp->fd_ofiles[fd]); + return (fd < 0 || fd >= fdp->fd_nfiles ? NULL : + ftable_get(fdp, fd)); } #endif /* _KERNEL */ --Apple-Mail-18--1040317416 Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit On May 11, 2010, at 10:24 AM, Tim Prouty wrote: > Hi, > > This is my first time sending a patch to the list, so let me know if > there > are any conventions I missed. > > Attached is a patch that attempts to remove the data structure > limitations on the number of open file descriptors in the system. The > patch is against our modified version of FreeBSD 7, so it probably > won't apply cleanly against upstream, but I wanted to get this out > there for discussion soon so if there is feedback, we can address it > and then worry about porting a specific patch for upstream. > > We (Isilon) have been running this internally for a few months without > any issues, although there is at least one known issue that I need to > resolve, which is mentioned below. > > Motivation: > > With the increasing amount of memory and processing power in modern > machines, there are certain userspace processes that are able to > handle much higher concurrent load than previously possible. A > specific example is a single-process/multi-threaded SMB stack which > can handle thousands of connected clients, each with hundreds of > files open. Once kernel sysctl limits are increased for max files, > the next limitation is in the actual actual file descriptor data > structures. > > Problem - Data Structure Limits: > > The existing per-process data structures for the file descriptor are > flat tables, which are reallocated each time they need need to grow. > This is innefficient as the amount of data to allocate and copy each > time increases, but the bigger issue is the potentially limited > amount of contiguous KVA memory as the table grows very large. Over > time as the KVA memory becomes fragmanted, malloc may be unable to > provide large enough blocks of contiguous memory. > > In the current code the struct proc contains both an array of struct > file pointers and a bit field indicating which file descriptors are > in use. The primary issue is how to handle these structures growing > beyond the kernel page size of 4K. > > The array of file pointers will grow much faster than the bit field, > especially on a 64 bit kernel. The 4K block size will be hit at 512 > files (64 bit kernel) for the file pointer array and 32,768 files > for the bit field. > > Solution: > > File Pointer Array > > Focusing first on the file pointer array limitation, an indirect > block approach is used. An indirect block size of 4K (equal to page > size) is used, allowing for 512 files per block. To optimize for > the common case of low/normal fd usage, a flat array is initialized > to 20 entries and then grows at 2x each time until the block reaches > it's maximum size. Once more than 512 files are opened, the array > will transition to a single level indirect block table. > > Fd Bitfield: > > The fd bit field as it stands can represent 32K files when it grows > to the page size limit. Using the same indirect system as the file > pointer array, it is able to grow beyond it's existing limits. > > Close Exec Field: > > One complication of the old file pointer table is that for each file > pointer there was 1 byte flags. The memory was laid out such that > the file pointers are all in one contiguous array, followed by a > second array of chars where each char entry is a flags field that > corresponds to the file pointer at the same index. Interestingly > there is actually only one flag that is used: UF_EXCLOSE, so it's > fairly wasteful to have an array of chars. What linux does, and > what I have done is to just use a bitfield for all fds that should > be closed on exec. This could be further optimized by doing some > pointer trickery to store the close exec bit in the struct file > pointer rather than keep a separate bitfield. > > Indirect Block Table: > > Since there are three consumers of the indirect block table, I > generalized it so all of the consumers rely on the same code. This > could eventually be refactored into a kernel library since it could > be generally useful in other areas. The table uses a single level > of indirection, so the base table can still grow beyond the 4K. As > a process uses more fds, the need to continue growing the base table > should be fairly limited, and a single realloc will significantly > increase the number of fds the process can allocate. > > Accessing the new data structures: > > All consumers of the file pointer array and bitfield will now have > to use accessors rather than using direct access. > > Known Issues: > > The new fdp locking in fdcopy needs to be reworked. > > > Thank you for reviewing! > > -Tim > > <0001-Increase-scalabilty-of-per-process-file-descriptor-d.patch> > _______________________________________________ > freebsd-arch@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-arch > To unsubscribe, send any mail to "freebsd-arch- > unsubscribe@freebsd.org" --Apple-Mail-18--1040317416-- From owner-freebsd-arch@FreeBSD.ORG Wed May 12 08:31:39 2010 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 82153106566B for ; Wed, 12 May 2010 08:31:39 +0000 (UTC) (envelope-from gljennjohn@googlemail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id 0A5408FC08 for ; Wed, 12 May 2010 08:31:38 +0000 (UTC) Received: by fxm1 with SMTP id 1so688421fxm.13 for ; Wed, 12 May 2010 01:31:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:in-reply-to:references:reply-to:x-mailer:mime-version :content-type:content-transfer-encoding; bh=P0mUCwhFzbsoH6iCF22h+iAIbTRppewgcCQbU1IPk2Q=; b=Ajiju1eQ5Vh25tIyAz6XI55So3/05SLR2/bFoAPmYKRp7w6uvcQf2TREZXDhYKhK9P yyKIFLFr6TylEAtWUGhPYMppxgwSNsz9uG2YpG1OstkSOixn4ZguIL1K3g5quawG0jp1 uJFkgQqOjXj5zrp2QcD3bvk5y9UVCQSvOHKbs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=date:from:to:cc:subject:message-id:in-reply-to:references:reply-to :x-mailer:mime-version:content-type:content-transfer-encoding; b=MVd/X8LjWqw2WQEdTEteYQeMgSo11chJiwgKiBbyw4evGvB+NtnLfVy2VLYX0KDp10 lqgd9+cQA8EVTFKjvlX8Za771RNmLrirvtsMGhELZ9nSoEkMu+Tk7Um3NGbOCAdCK9pu otrb9hKF2Zc02qske2rUTs5b4dkhyqlOdMALo= Received: by 10.223.45.83 with SMTP id d19mr7657280faf.65.1273653098205; Wed, 12 May 2010 01:31:38 -0700 (PDT) Received: from ernst.jennejohn.org (p57AE5487.dip.t-dialin.net [87.174.84.135]) by mx.google.com with ESMTPS id 2sm30736443faf.15.2010.05.12.01.31.36 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 12 May 2010 01:31:37 -0700 (PDT) Date: Wed, 12 May 2010 10:31:35 +0200 From: Gary Jennejohn To: Tim Prouty Message-ID: <20100512103135.6b10f9cf@ernst.jennejohn.org> In-Reply-To: References: X-Mailer: Claws Mail 3.7.5 (GTK+ 2.18.7; amd64-portbld-freebsd9.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Zachary Loafman , Matthew Fleming , freebsd-arch@freebsd.org Subject: Re: [PATCH]/[RFC] Increase scalability of per-process file descriptor data structures X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: gljennjohn@googlemail.com List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 May 2010 08:31:39 -0000 On Tue, 11 May 2010 16:13:45 -0700 Tim Prouty wrote: > The patch was slightly truncated, I'm guessing because it was > 50K. > Attached is a slightly trimmed down patch. > The first patch I received was 74,365 bytes in size. Was that all of it? -- Gary Jennejohn From owner-freebsd-arch@FreeBSD.ORG Wed May 12 16:56:32 2010 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EE527106567C for ; Wed, 12 May 2010 16:56:31 +0000 (UTC) (envelope-from fabien.thomas@netasq.com) Received: from work.netasq.com (mars.netasq.com [91.212.116.3]) by mx1.freebsd.org (Postfix) with ESMTP id 726E28FC29 for ; Wed, 12 May 2010 16:56:30 +0000 (UTC) Received: from [10.2.1.5] (unknown [10.2.1.5]) by work.netasq.com (Postfix) with ESMTPSA id A6AD574001C for ; Wed, 12 May 2010 18:40:52 +0200 (CEST) From: Fabien Thomas Content-Type: multipart/signed; micalg=sha1; boundary=Apple-Mail-8--977469835; protocol="application/pkcs7-signature" Message-Id: Date: Wed, 12 May 2010 18:41:13 +0200 To: freebsd-arch@freebsd.org Mime-Version: 1.0 (Apple Message framework v1078) X-Mailer: Apple Mail (2.1078) X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: kernel FPU context save X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: fabient@freebsd.org List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 May 2010 16:56:32 -0000 --Apple-Mail-8--977469835 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Hi all, It seems a long standing question but i would like to known the current = state of an API for saving / restoring FPU state in the kernel (like = kernel_fpu_bebin/kernel_fpu_end in Linux). The goal would be to integrate AES-NI in the crypto(9) framework. Regards, Fabien --Apple-Mail-8--977469835-- From owner-freebsd-arch@FreeBSD.ORG Wed May 12 17:21:05 2010 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 510F61065672 for ; Wed, 12 May 2010 17:21:05 +0000 (UTC) (envelope-from tim.prouty@isilon.com) Received: from seaxch09.isilon.com (seaxch09.isilon.com [74.85.160.25]) by mx1.freebsd.org (Postfix) with ESMTP id 3155B8FC1D for ; Wed, 12 May 2010 17:21:04 +0000 (UTC) Received: from 10-8-5-63.isilon.com ([10.8.5.63]) by seaxch09.isilon.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 12 May 2010 10:21:04 -0700 Message-Id: <35ED640B-D387-4BEE-9F81-407FEC64AB0B@isilon.com> From: Tim Prouty To: gljennjohn@googlemail.com In-Reply-To: <20100512103135.6b10f9cf@ernst.jennejohn.org> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v936) Date: Wed, 12 May 2010 10:21:04 -0700 References: <20100512103135.6b10f9cf@ernst.jennejohn.org> X-Mailer: Apple Mail (2.936) X-OriginalArrivalTime: 12 May 2010 17:21:04.0818 (UTC) FILETIME=[807A1120:01CAF1F7] Cc: Zachary Loafman , Matthew Fleming , freebsd-arch@freebsd.org Subject: Re: [PATCH]/[RFC] Increase scalability of per-process file descriptor data structures X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 May 2010 17:21:05 -0000 On May 12, 2010, at 1:31 AM, Gary Jennejohn wrote: > On Tue, 11 May 2010 16:13:45 -0700 > Tim Prouty wrote: > >> The patch was slightly truncated, I'm guessing because it was > 50K. >> Attached is a slightly trimmed down patch. >> > > The first patch I received was 74,365 bytes in size. Was that all > of it? Looks like only the last few lines were truncated. The second patch appears to be complete. From owner-freebsd-arch@FreeBSD.ORG Wed May 12 19:03:03 2010 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B391C1065680; Wed, 12 May 2010 19:03:03 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 3562B8FC1E; Wed, 12 May 2010 19:03:02 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id o4CJ2JvC084648 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 12 May 2010 22:02:19 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4) with ESMTP id o4CJ26ni056748; Wed, 12 May 2010 22:02:06 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id o4CJ25UJ056747; Wed, 12 May 2010 22:02:05 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 12 May 2010 22:02:05 +0300 From: Kostik Belousov To: fabient@freebsd.org Message-ID: <20100512190205.GC83316@deviant.kiev.zoral.com.ua> References: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="POjlveFHrWq2ZO+N" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-2.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_20, DNS_FROM_OPENWHOIS autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: freebsd-arch@freebsd.org Subject: Re: kernel FPU context save X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 May 2010 19:03:03 -0000 --POjlveFHrWq2ZO+N Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, May 12, 2010 at 06:41:13PM +0200, Fabien Thomas wrote: > Hi all, >=20 > It seems a long standing question but i would like to known the > current state of an API for saving / restoring FPU state in the kernel > (like kernel_fpu_bebin/kernel_fpu_end in Linux). > > The goal would be to integrate AES-NI in the crypto(9) framework. > > Regards, Fabien > Current state of KPI for FPU context access in kernel is there: http://people.freebsd.org/~kib/misc/kern_fpu.3.patch AESNI driver is progressing, look for the news shortly. --POjlveFHrWq2ZO+N Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAkvq+y0ACgkQC3+MBN1Mb4g7pACgwAB05+u/sEsMlc93U7vgiPXk ccIAnReLZco36YV9F0yf3Rci+SKTk1XS =SB1m -----END PGP SIGNATURE----- --POjlveFHrWq2ZO+N-- From owner-freebsd-arch@FreeBSD.ORG Wed May 12 21:46:02 2010 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3A79B1065670; Wed, 12 May 2010 21:46:02 +0000 (UTC) (envelope-from fabien.thomas@netasq.com) Received: from work.netasq.com (mars.netasq.com [91.212.116.3]) by mx1.freebsd.org (Postfix) with ESMTP id 4C9588FC21; Wed, 12 May 2010 21:46:01 +0000 (UTC) Received: from [192.168.0.1] (unknown [172.16.0.46]) by work.netasq.com (Postfix) with ESMTPSA id B5889740007; Wed, 12 May 2010 23:45:32 +0200 (CEST) Mime-Version: 1.0 (Apple Message framework v1078) Content-Type: text/plain; charset=us-ascii From: Fabien Thomas In-Reply-To: <20100512190205.GC83316@deviant.kiev.zoral.com.ua> Date: Wed, 12 May 2010 23:45:56 +0200 Content-Transfer-Encoding: 7bit Message-Id: <3ED588EF-5565-44C9-9662-0ABFF9DF829A@netasq.com> References: <20100512190205.GC83316@deviant.kiev.zoral.com.ua> To: Kostik Belousov X-Mailer: Apple Mail (2.1078) Cc: fabient@freebsd.org, freebsd-arch@freebsd.org Subject: Re: kernel FPU context save X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 May 2010 21:46:02 -0000 >> Hi all, >> >> It seems a long standing question but i would like to known the >> current state of an API for saving / restoring FPU state in the kernel >> (like kernel_fpu_bebin/kernel_fpu_end in Linux). >> >> The goal would be to integrate AES-NI in the crypto(9) framework. >> >> Regards, Fabien >> > > Current state of KPI for FPU context access in kernel is there: > http://people.freebsd.org/~kib/misc/kern_fpu.3.patch > > AESNI driver is progressing, look for the news shortly. Great ! Tell me if you need testing. Fabien From owner-freebsd-arch@FreeBSD.ORG Fri May 14 04:46:30 2010 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5A2B71065673 for ; Fri, 14 May 2010 04:46:30 +0000 (UTC) (envelope-from areilly@bigpond.net.au) Received: from nskntqsrv02p.mx.bigpond.com (nskntqsrv02p.mx.bigpond.com [61.9.168.234]) by mx1.freebsd.org (Postfix) with ESMTP id E1F468FC17 for ; Fri, 14 May 2010 04:46:29 +0000 (UTC) Received: from nskntotgx03p.mx.bigpond.com ([124.188.161.100]) by nskntmtas04p.mx.bigpond.com with ESMTP id <20100514020056.GDHX19420.nskntmtas04p.mx.bigpond.com@nskntotgx03p.mx.bigpond.com>; Fri, 14 May 2010 02:00:56 +0000 Received: from duncan.reilly.home ([124.188.161.100]) by nskntotgx03p.mx.bigpond.com with ESMTP id <20100514020056.XSTI1978.nskntotgx03p.mx.bigpond.com@duncan.reilly.home>; Fri, 14 May 2010 02:00:56 +0000 Date: Fri, 14 May 2010 12:00:55 +1000 From: Andrew Reilly To: Vladimir =?utf-8?Q?'=CF=86-coder=2Fphcoder'?= Serbinenko Message-ID: <20100514020055.GB89230@duncan.reilly.home> References: <4BE98FB5.3060906@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4BE98FB5.3060906@gmail.com> User-Agent: Mutt/1.4.2.3i X-Authentication-Info: Submitted using SMTP AUTH LOGIN at nskntotgx03p.mx.bigpond.com from [124.188.161.100] using ID areilly@bigpond.net.au at Fri, 14 May 2010 02:00:56 +0000 X-RPD-ScanID: Class unknown; VirusThreatLevel unknown, RefID str=0001.0A150202.4BECAED8.008E,ss=1,fgs=0 X-SIH-MSG-ID: rx02GNL6TAD0zmQs0WyzOwJxyArnqyN48Z4QX81loRIGTUDCp8DeQ9rVMfpRvN+vxD9IJhqHNGEgaaniTY3Rs9mK Cc: The development of GRUB 2 , freebsd-arch@freebsd.org Subject: Re: [RFC] Multiboot2 drafting X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 May 2010 04:46:30 -0000 Hi there, I know next to nothing about GRUB, and have not yet read the multiboot spec, but I wonder if you could comment on how or whether this is related to either the Open Firmware Device Tree or the Flattened Device Tree used in various embedded OS ports. It would be cool if there were some convergence going on... Cheers, -- Andrew From owner-freebsd-arch@FreeBSD.ORG Fri May 14 06:31:33 2010 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2778F106564A for ; Fri, 14 May 2010 06:31:33 +0000 (UTC) (envelope-from phcoder@gmail.com) Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.159]) by mx1.freebsd.org (Postfix) with ESMTP id 9FB488FC0A for ; Fri, 14 May 2010 06:31:32 +0000 (UTC) Received: by fg-out-1718.google.com with SMTP id l26so1130046fgb.13 for ; Thu, 13 May 2010 23:31:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:content-type; bh=0M9FjU1OM0N3dcUEGghUrtRTsrFCIucDfh5bjNzQjgg=; b=Tgr2izzF+t0VCcFS4iHKus9SaAogTrpRLo+MnByaUWfa9iFyBv/gnPMPLZlVPe90Xl p/TSCTWiD1V8HxXkD2F7WExEc4r5X74GrgzNXG7h+dF7ZfKvIj4xFUbEUq7udMGjH4Rk VWo6EWwgTZ0cP/kzMeqj5Sf3MCD9GA79vCQP0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type; b=NqXkaF5EWjK4acFbsB8/Dk+miru60QJpPnzzLuBIp01JnzIx6Xin9MVTBStJFBK602 9n5ytARpC9SaQlRjuBgE6BhYZzNcDuGi5UT3pOch5TPNM7U6OqkqhcuKb1lZewjCts3k HDIToNcMDsUO7A1Xvx2ctbjYU+aa/zWSoFVoY= Received: by 10.87.66.15 with SMTP id t15mr2024242fgk.37.1273818691531; Thu, 13 May 2010 23:31:31 -0700 (PDT) Received: from debian.bg45.phnet (public-docking-hg-4-194.ethz.ch [129.132.244.194]) by mx.google.com with ESMTPS id h2sm2830492fkh.55.2010.05.13.23.31.30 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 13 May 2010 23:31:30 -0700 (PDT) Message-ID: <4BECEE31.3060004@gmail.com> Date: Fri, 14 May 2010 08:31:13 +0200 From: =?UTF-8?B?VmxhZGltaXIgJ8+GLWNvZGVyL3BoY29kZXInIFNlcmJpbmVua28=?= User-Agent: Mozilla-Thunderbird 2.0.0.22 (X11/20091109) MIME-Version: 1.0 To: Andrew Reilly References: <4BE98FB5.3060906@gmail.com> <20100514020055.GB89230@duncan.reilly.home> In-Reply-To: <20100514020055.GB89230@duncan.reilly.home> X-Enigmail-Version: 0.95.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="------------enig167EF57E5A1AF8B901523CAB" Cc: The development of GRUB 2 , freebsd-arch@freebsd.org Subject: Re: [RFC] Multiboot2 drafting X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 May 2010 06:31:33 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig167EF57E5A1AF8B901523CAB Andrew Reilly wrote: > Hi there, > > I know next to nothing about GRUB, and have not yet read the > multiboot spec, but I wonder if you could comment on how or > whether this is related to either the Open Firmware Device Tree > or the Flattened Device Tree used in various embedded OS ports. > It would be cool if there were some convergence going on... > > =20 Yes and No. multiboot2 describes some aspects of the host system hardware but I've never heard of device trees outside of IEEE1275 or xnu, where it's probably a historical leftover. If this specification is clear and share some of our goals we can think of collaboration. Our goals in this direction: 1) Allow the same kernel load on all machines implementing the same ISA. This will require supplying info about machine. 2) Keep the things as advanced as they need to but not more advanced. E.g. when you supply an info about serial port you tell: it's at I/O port N rather than: it's in PCI bar X of device Y offset F. Since if OS doesn't support PCI this info is useless and if it does it will find out that this address is actually a part of PCI bar. This can be discussed though. 3) Firmware independency. Ideally OS shouldn't care at all which firmware it's running on. In some cases we may add pointers to firmware interfaces if there are good reasons for it but it's not the goal So if it's something clean and nice we should try integrating it. If it's however yet another firmware-dependant overkill interface it should be avoided. --=20 Regards Vladimir '=CF=86-coder/phcoder' Serbinenko --------------enig167EF57E5A1AF8B901523CAB Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iF4EAREKAAYFAkvs7kEACgkQNak7dOguQgnDjwD/aZSHgDD4gj3k3ZnlE69boV2o YLdM2mZckB7juyGmVbUA/Rra3VpsJInbJxFUGOxRg5Creh1g3ythHLB9YJkg0TsK =ayn6 -----END PGP SIGNATURE----- --------------enig167EF57E5A1AF8B901523CAB-- From owner-freebsd-arch@FreeBSD.ORG Fri May 14 11:21:47 2010 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7B58C106566B for ; Fri, 14 May 2010 11:21:47 +0000 (UTC) (envelope-from gljennjohn@googlemail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id 030F48FC19 for ; Fri, 14 May 2010 11:21:46 +0000 (UTC) Received: by fxm17 with SMTP id 17so1501547fxm.13 for ; Fri, 14 May 2010 04:21:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:in-reply-to:references:reply-to:x-mailer:mime-version :content-type:content-transfer-encoding; bh=YmTmCbcSNLwBHQZjf9i/i9ZUx/nfZupuIjmWOsnAERE=; b=x2zDoht3TYOaRF1NXf4WJxPDijh78jfTGRQCs2obXukwSNdxJO+EeDtIFuCU7mGXTn bEwxaRZ+tncqT/ZLF/PK6H9no98B/MHv3FQwatIH3G+8kRyFyaltVOxGvA/IN6A6gOqS Fn5NzDMA9FOs1OilLBC5u9IH58HQWyYyYGp2A= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=date:from:to:cc:subject:message-id:in-reply-to:references:reply-to :x-mailer:mime-version:content-type:content-transfer-encoding; b=lvAuph8FYDbaWWzy9es1Qevrd9vrPCGy+TNeFmLeyJTiooWCaQ8yXRf7Yzyd7sZOoD KZZGNz3PSz8FlFZSACD+QAP5ib9dUwa7pBBY57SQ0XrMRpBOJkGVjMCxPk0dMCZ8Vy5p bbMmwtPcAPwLgaGd3G6yj5IdvCjGGJL8YR/x0= Received: by 10.223.99.78 with SMTP id t14mr1419854fan.85.1273836104619; Fri, 14 May 2010 04:21:44 -0700 (PDT) Received: from ernst.jennejohn.org (p57AE4DB2.dip.t-dialin.net [87.174.77.178]) by mx.google.com with ESMTPS id u12sm10495549fah.4.2010.05.14.04.21.43 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 14 May 2010 04:21:43 -0700 (PDT) Date: Fri, 14 May 2010 13:21:42 +0200 From: Gary Jennejohn To: Vladimir =?UTF-8?Q?'=CF=86-coder/phcoder'?= Serbinenko Message-ID: <20100514132142.252b092d@ernst.jennejohn.org> In-Reply-To: <4BECEE31.3060004@gmail.com> References: <4BE98FB5.3060906@gmail.com> <20100514020055.GB89230@duncan.reilly.home> <4BECEE31.3060004@gmail.com> X-Mailer: Claws Mail 3.7.5 (GTK+ 2.18.7; amd64-portbld-freebsd9.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: The development of GRUB 2 , freebsd-arch@freebsd.org Subject: Re: [RFC] Multiboot2 drafting X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: gljennjohn@googlemail.com List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 May 2010 11:21:47 -0000 On Fri, 14 May 2010 08:31:13 +0200 Vladimir '__-coder/phcoder' Serbinenko wrote: > > Hi there, > > > > I know next to nothing about GRUB, and have not yet read the > > multiboot spec, but I wonder if you could comment on how or > > whether this is related to either the Open Firmware Device Tree > > or the Flattened Device Tree used in various embedded OS ports. > > It would be cool if there were some convergence going on... > > > > > Yes and No. multiboot2 describes some aspects of the host system > hardware but I've never heard of device trees outside of IEEE1275 or > xnu, where it's probably a historical leftover. If this specification is > clear and share some of our goals we can think of collaboration. Our > goals in this direction: > 1) Allow the same kernel load on all machines implementing the same ISA. > This will require supplying info about machine. > 2) Keep the things as advanced as they need to but not more advanced. > E.g. when you supply an info about serial port you tell: it's at I/O > port N rather than: it's in PCI bar X of device Y offset F. Since if OS > doesn't support PCI this info is useless and if it does it will find out > that this address is actually a part of PCI bar. This can be discussed > though. > 3) Firmware independency. Ideally OS shouldn't care at all which > firmware it's running on. In some cases we may add pointers to firmware > interfaces if there are good reasons for it but it's not the goal > > So if it's something clean and nice we should try integrating it. If > it's however yet another firmware-dependant overkill interface it should > be avoided. > As an example of what I think Andrew was addressing, U-Boot can pass a Flattened Device Tree to the Linux kernel. This basically allows a Linux kernel to handle variants of a board without having to custom compile Linux for each board. At the moment I think only powerpc-based boards can be handled in this way. -- Gary Jennejohn From owner-freebsd-arch@FreeBSD.ORG Fri May 14 12:47:08 2010 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2DE371065674 for ; Fri, 14 May 2010 12:47:08 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id E62F88FC16 for ; Fri, 14 May 2010 12:47:07 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o4ECjajv057815; Fri, 14 May 2010 06:45:37 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Fri, 14 May 2010 06:45:58 -0600 (MDT) Message-Id: <20100514.064558.956847443251806466.imp@bsdimp.com> To: gljennjohn@googlemail.com From: "M. Warner Losh" In-Reply-To: <20100514132142.252b092d@ernst.jennejohn.org> References: <20100514020055.GB89230@duncan.reilly.home> <4BECEE31.3060004@gmail.com> <20100514132142.252b092d@ernst.jennejohn.org> X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: phcoder@gmail.com, freebsd-arch@freebsd.org, grub-devel@gnu.org Subject: Re: [RFC] Multiboot2 drafting X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 May 2010 12:47:08 -0000 In message: <20100514132142.252b092d@ernst.jennejohn.org> Gary Jennejohn writes: : As an example of what I think Andrew was addressing, U-Boot can pass a : Flattened Device Tree to the Linux kernel. This basically allows a : Linux kernel to handle variants of a board without having to custom : compile Linux for each board. At the moment I think only powerpc-based : boards can be handled in this way. In the kernel.org kernel, this is correct. There's a fairly mature set of patches for ARM that brings many of the newer ARM boards into the FDT picture. There's some very immature MIPS patches flowing around as well. Warner From owner-freebsd-arch@FreeBSD.ORG Fri May 14 12:47:25 2010 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 98C15106567A for ; Fri, 14 May 2010 12:47:25 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 5B7B78FC2B for ; Fri, 14 May 2010 12:47:25 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o4EChoot057756; Fri, 14 May 2010 06:43:50 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Fri, 14 May 2010 06:44:09 -0600 (MDT) Message-Id: <20100514.064409.634347869525783787.imp@bsdimp.com> To: phcoder@gmail.com From: "M. Warner Losh" In-Reply-To: <4BECEE31.3060004@gmail.com> References: <4BE98FB5.3060906@gmail.com> <20100514020055.GB89230@duncan.reilly.home> <4BECEE31.3060004@gmail.com> X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=utf-8 Content-Transfer-Encoding: base64 Cc: grub-devel@gnu.org, freebsd-arch@freebsd.org Subject: Re: [RFC] Multiboot2 drafting X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 May 2010 12:47:25 -0000 SW4gbWVzc2FnZTogPDRCRUNFRTMxLjMwNjAwMDRAZ21haWwuY29tPg0KICAgICAgICAgICAgVmxh ZGltaXIgJ8+GLWNvZGVyL3BoY29kZXInIFNlcmJpbmVua28gPHBoY29kZXJAZ21haWwuY29tPiB3 cml0ZXM6DQo6IFllcyBhbmQgTm8uIG11bHRpYm9vdDIgZGVzY3JpYmVzIHNvbWUgYXNwZWN0cyBv ZiB0aGUgaG9zdCBzeXN0ZW0NCjogaGFyZHdhcmUgYnV0IEkndmUgbmV2ZXIgaGVhcmQgb2YgZGV2 aWNlIHRyZWVzIG91dHNpZGUgb2YgSUVFRTEyNzUgb3INCjogeG51LCB3aGVyZSBpdCdzIHByb2Jh Ymx5IGEgaGlzdG9yaWNhbCBsZWZ0b3Zlci4NCg0KSXQgaXMgZmFyIGZyb20gYSBoaXN0b3JpY2Fs IGxlZnQtb3Zlci4gIExpbnV4IGNyaXRpY2FsbHkgZGVwZW5kcyBvbg0KdGhlIGJvb3QgbG9hZGVy IG9uIFBvd2VyUEMgdG8gcHJvdmlkZSBpdCB3aXRoIGEgdHJlZSBvZiBkZXZpY2VzIHRoYXQNCml0 IGNhbm5vdCBvdGhlcndpc2UgcHJvYmUuICBPbiBvdGhlciBhcmNoaXRlY3R1cmVzLCBpdCBpcyBi ZWNvbWluZyBhbg0Kb3B0aW9uYWwgd2F5IHRvIHNwZWNpZnkgdGhlIGRldmljZSB0cmVlIGFzIHdl bGwuICBUaGVyZSBhcmUgbWFueQ0KZGlmZmVyZW50IGltcGxlbWVudGF0aW9ucyBvZiB0aGlzLCBz aW5jZSBwcmltYXJpbHkgaXQgaXMganVzdCBkYXRhIGFuZA0KYm9vdCBsb2FkZXJzIGFyZSBnb29k IGF0IHByb3ZpZGluZyBiaW5hcnkgYmxvYnMgdG8gdGhlIGtlcm5lbC4uLg0KDQpJbiBhZGRpdGlv biwgUmFmYWwgSmF3YXJza2kgaGFzIHBvcnRlZCB0aGlzIHRlY2hub2xvZ3kgdG8gRnJlZUJTRC4N CkhlJ3MgcHJlc2VudGluZyBhIHBhcGVyIG9uIGl0IHRvZGF5IGF0IEJTRGNhbjoNCglodHRwOi8v d3d3LmJzZGNhbi5vcmcvMjAxMC9zY2hlZHVsZS9ldmVudHMvMTcxLmVuLmh0bWwNCkkndmUgcmV2 aWV3ZWQgdGhlIHdvcmssIGFuZCBpdCBnb2VzIGEgbG9uZyB3YXkgdG93YXJkcyBtYWtpbmcgc29t ZSBvZg0KdGhlIG1vcmUgc3R1cGlkIGFuZCByZXBldGl0aXZlIHBhcnRzIG9mIGRvaW5nIGEgcG9y dCB0byBhIG5ldyBlbWJlZGRlZA0KYXJjaGl0ZWN0dXJlIGVhc3kuDQoNCldhcm5lcg0K From owner-freebsd-arch@FreeBSD.ORG Fri May 14 12:54:47 2010 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 51600106566C for ; Fri, 14 May 2010 12:54:47 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 114768FC25 for ; Fri, 14 May 2010 12:54:46 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o4ECnooI057852; Fri, 14 May 2010 06:49:50 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Fri, 14 May 2010 06:50:12 -0600 (MDT) Message-Id: <20100514.065012.460114267423767720.imp@bsdimp.com> To: phcoder@gmail.com From: "M. Warner Losh" In-Reply-To: <4BECEE31.3060004@gmail.com> References: <4BE98FB5.3060906@gmail.com> <20100514020055.GB89230@duncan.reilly.home> <4BECEE31.3060004@gmail.com> X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=utf-8 Content-Transfer-Encoding: base64 Cc: grub-devel@gnu.org, freebsd-arch@freebsd.org Subject: Re: [RFC] Multiboot2 drafting X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 May 2010 12:54:47 -0000 SW4gbWVzc2FnZTogPDRCRUNFRTMxLjMwNjAwMDRAZ21haWwuY29tPg0KICAgICAgICAgICAgVmxh ZGltaXIgJ8+GLWNvZGVyL3BoY29kZXInIFNlcmJpbmVua28gPHBoY29kZXJAZ21haWwuY29tPiB3 cml0ZXM6DQo6IDIpIEtlZXAgdGhlIHRoaW5ncyBhcyBhZHZhbmNlZCBhcyB0aGV5IG5lZWQgdG8g YnV0IG5vdCBtb3JlIGFkdmFuY2VkLg0KOiBFLmcuIHdoZW4geW91IHN1cHBseSBhbiBpbmZvIGFi b3V0IHNlcmlhbCBwb3J0IHlvdSB0ZWxsOiBpdCdzIGF0IEkvTw0KOiBwb3J0IE4gcmF0aGVyIHRo YW46IGl0J3MgaW4gUENJIGJhciBYIG9mIGRldmljZSBZIG9mZnNldCBGLiBTaW5jZSBpZiBPUw0K OiBkb2Vzbid0IHN1cHBvcnQgUENJIHRoaXMgaW5mbyBpcyB1c2VsZXNzIGFuZCBpZiBpdCBkb2Vz IGl0IHdpbGwgZmluZCBvdXQNCjogdGhhdCB0aGlzIGFkZHJlc3MgaXMgYWN0dWFsbHkgYSBwYXJ0 IG9mIFBDSSBiYXIuIFRoaXMgY2FuIGJlIGRpc2N1c3NlZA0KOiB0aG91Z2guDQoNCkZEVCwgYnR3 LCBpcyBleGFjdGx5IHRoaXMuICBJdCB0ZWxscyB0aGUgT1Mgd2hhdCBoYXJkd2FyZSBpcyBwcmVz ZW50LA0Kd2hhdCByZXNvdXJjZXMgaXQgY29uc3VtZXMsIHdoYXQgY29ubmVjdGlvbnMgYmV0d2Vl biB0aGUgaGFyZHdhcmUNCnRoZXJlIGlzIChpbXBvcnRhbnQgZm9yIGludGVycnVwdHMsIHdoaWNo IGRvbid0IGZvbGxvdywgbmVjZXNzYXJpbHksDQp0aGUgYnVzIGhpZXJhcmNoeSkuICBJdCB0ZWxs cyB5b3UgYWJvdXQgUENJIGhvc3QgYnJpZGdlcywgYW5kDQppbnRlcmVzdGluZyB0aGluZ3MgYWJv dXQgdGhlIGRldmljZXMgb24gdGhlIFBDSSBidXMsIGJ1dCBvbmx5IHRvIHRoZQ0KZXh0ZW50IHRo YXQgdGhlIGhhcmR3YXJlIGl0c2VsZiBjYW4ndCBpbXBhcnQgdGhpcyBpbmZvcm1hdGlvbi4gIEl0 DQphbHNvIG9mZmVycyBmaXJtd2FyZSBpbmRlcGVuZGVuY2UsIHNvIHRoZSBrZXJuZWwgZG9lc24n dCBjYXJlIHdoZXJlIGl0DQpib290ZWQsIG9yIHdoYXQgYm9vdGVkIGl0LCBhdCBsZWFzdCB0byBh IGxhcmdlIGV4dGVudC4NCg0KQWdhaW4sIFJhZmFsIEphd2Fyc2tpJ3Mgd29yayBpbiB0aGlzIGFy ZWEgaW4gRnJlZUJTRCBpcyBtYXR1cmUuICBXaGlsZQ0KaGUgaGFzIG9ubHkgYWRhcHRlZCBpdCB0 byBQb3dlclBDIGFuZCBBUk0sIGl0IHdvdWxkIGJlIGVhc3kgdG8gZXhwYW5kDQp0byBpbmNsdWRl IGkzODYsIGFtZDY0IGFuZCBNSVBTLiAgSXQgaXMgcXVpdGUgYSBiaXQgbGVzcyByZWxldmFudCB0 bw0KeDg2LCBob3dldmVyLCBzaW5jZSBBQ1BJIHByb3ZpZGVzIG5lYXJseSBhbGwgdGhlIGluZm9y bWF0aW9uIHRoYXQNCndvdWxkIGJlIGluIGFuIEZEVC4NCg0KV2FybmVyDQo= From owner-freebsd-arch@FreeBSD.ORG Fri May 14 13:16:09 2010 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E3BE91065677 for ; Fri, 14 May 2010 13:16:09 +0000 (UTC) (envelope-from raj@semihalf.com) Received: from smtp.semihalf.com (smtp.semihalf.com [213.17.239.109]) by mx1.freebsd.org (Postfix) with ESMTP id 875248FC29 for ; Fri, 14 May 2010 13:16:09 +0000 (UTC) Received: from localhost (unknown [213.17.239.109]) by smtp.semihalf.com (Postfix) with ESMTP id 7FDDFC42D8; Fri, 14 May 2010 15:01:33 +0200 (CEST) X-Virus-Scanned: by amavisd-new at semihalf.com Received: from smtp.semihalf.com ([213.17.239.109]) by localhost (smtp.semihalf.com [213.17.239.109]) (amavisd-new, port 10024) with ESMTP id 2MC55HCRvLtm; Fri, 14 May 2010 15:01:32 +0200 (CEST) Received: from [192.168.14.120] (unknown [24.114.252.238]) by smtp.semihalf.com (Postfix) with ESMTPSA id B96C2C42D5; Fri, 14 May 2010 15:01:31 +0200 (CEST) Mime-Version: 1.0 (Apple Message framework v1078) Content-Type: text/plain; charset=utf-8 From: Rafal Jaworowski In-Reply-To: <20100514.064409.634347869525783787.imp@bsdimp.com> Date: Fri, 14 May 2010 14:57:03 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <9C502882-2DF8-42F7-8E97-B88A386E36E9@semihalf.com> References: <4BE98FB5.3060906@gmail.com> <20100514020055.GB89230@duncan.reilly.home> <4BECEE31.3060004@gmail.com> <20100514.064409.634347869525783787.imp@bsdimp.com> To: "M. Warner Losh" X-Mailer: Apple Mail (2.1078) Cc: phcoder@gmail.com, freebsd-arch@freebsd.org, grub-devel@gnu.org Subject: Re: [RFC] Multiboot2 drafting X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 May 2010 13:16:10 -0000 On 2010-05-14, at 14:44, M. Warner Losh wrote: > In message: <4BECEE31.3060004@gmail.com> > Vladimir '=CF=86-coder/phcoder' Serbinenko = writes: > : Yes and No. multiboot2 describes some aspects of the host system > : hardware but I've never heard of device trees outside of IEEE1275 or > : xnu, where it's probably a historical leftover. >=20 > It is far from a historical left-over. Linux critically depends on > the boot loader on PowerPC to provide it with a tree of devices that > it cannot otherwise probe. On other architectures, it is becoming an > optional way to specify the device tree as well. There are many > different implementations of this, since primarily it is just data and > boot loaders are good at providing binary blobs to the kernel... >=20 > In addition, Rafal Jawarski has ported this technology to FreeBSD. > He's presenting a paper on it today at BSDcan: > http://www.bsdcan.org/2010/schedule/events/171.en.html > I've reviewed the work, and it goes a long way towards making some of > the more stupid and repetitive parts of doing a port to a new embedded > architecture easy. Yes, more on this can be found at the wiki page = http://wiki.freebsd.org/FlattenedDeviceTree, there will also be a paper = available as a post-conference material about this project. As of now we have flattened device tree support on 2 PowerPC platforms = and 6 ARM-based systems already completed. Rafal From owner-freebsd-arch@FreeBSD.ORG Fri May 14 15:24:10 2010 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2D305106566B for ; Fri, 14 May 2010 15:24:10 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from mx0.hoeg.nl (mx0.hoeg.nl [IPv6:2001:4dd0:ff41::b23f:aa]) by mx1.freebsd.org (Postfix) with ESMTP id E0E268FC08 for ; Fri, 14 May 2010 15:24:08 +0000 (UTC) Received: by mx0.hoeg.nl (Postfix, from userid 1000) id 3BF342A28CB5; Fri, 14 May 2010 17:24:08 +0200 (CEST) Date: Fri, 14 May 2010 17:24:08 +0200 From: Ed Schouten To: FreeBSD Arch Message-ID: <20100514152408.GN56080@hoeg.nl> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="/nI5WQOYKpjxyPr9" Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) Cc: Subject: Request for review: build infrastructure for Clang X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 May 2010 15:24:10 -0000 --/nI5WQOYKpjxyPr9 Content-Type: multipart/mixed; boundary="bhWRZWkimNlt1+0z" Content-Disposition: inline --bhWRZWkimNlt1+0z Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello all, At BSDCan there has been a general agreement that in order to make Clang a viable replacement for GCC 4.2.1, it should be integrated into FreeBSD HEAD and installed by default as soon as possible. This does not mean that the system will be bootstrapped using Clang, nor does it mean that Ports are built using it. Clang is just installed as /usr/bin/clang and /usr/bin/clang++. It can be built and installed on any architecture, but it will only be enabled on amd64, i386 and pc98 for now. As requested by several people, I am hereby sending a patch which adds the build infrastructure for Clang. It includes all modifications that are present in the projects/clangbsd-import branch, except the LLVM/Clang source tree stored at contrib/llvm. Below are random remarks about the patch: - Clang depends on many LLVM libraries. The Makefiles for these libraries are stored in usr.bin/clang/lib. All binaries (clang and tblgen) have their Makefiles in usr.bin/clang/bin respectively. - Clang requires a bootstrapping tool called tblgen, which generates large portions of internal interfaces. Even though this tool is only needed when MK_CLANG is set, it is always built. Because the default value of MK_CLANG depends on the architecture used, we cannot reliably determine whether tblgen should be built during bootstrap when cross-compiling. Because tblgen doesn't blow up the build time significantly, it will always be built. - LLVM source code includes some generated header files. Not all these generated headers use .h extensions. This isn't a problem, except that it confuses . This is why all headers generated by tblgen have the .h extension and wrappers are in place in usr.bin/clang/include. If everything goes according to plan, this patch will be committed to HEAD in 2 weeks from now (May 28). Depending on whether interesting bugs are fixed upstream, a newer snapshot may be integrated than the one used right now. The entire source tree can be checked out as follows. Be sure to give it a try! svn co svn://svn.freebsd.org/base/projects/clangbsd-import/ In case you find problems, be sure to drop by #freebsd-clang on EFnet. Greetings from Ottawa, --=20 Ed Schouten WWW: http://80386.nl/ --bhWRZWkimNlt1+0z Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="clangbsd.txt" Content-Transfer-Encoding: quoted-printable Index: usr.bin/clang/clang.lib.mk =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/clang.lib.mk (.../head) (revision 0) +++ usr.bin/clang/clang.lib.mk (.../projects/clangbsd-import) (revision 208= 076) @@ -0,0 +1,7 @@ +# $FreeBSD$ + +.include "clang.build.mk" + +INTERNALLIB=3D + +.include Property changes on: usr.bin/clang/clang.lib.mk ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/clang.prog.mk =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/clang.prog.mk (.../head) (revision 0) +++ usr.bin/clang/clang.prog.mk (.../projects/clangbsd-import) (revision 20= 8076) @@ -0,0 +1,12 @@ +# $FreeBSD$ + +.include "clang.build.mk" + +.for lib in ${LIBDEPS} +DPADD+=3D ${.OBJDIR}/../../lib/lib${lib}/lib${lib}.a +LDADD+=3D ${.OBJDIR}/../../lib/lib${lib}/lib${lib}.a +.endfor + +BINDIR?=3D/usr/bin + +.include Property changes on: usr.bin/clang/clang.prog.mk ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/include/PPCGenInstrInfo.inc =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/include/PPCGenInstrInfo.inc (.../head) (revision 0) +++ usr.bin/clang/include/PPCGenInstrInfo.inc (.../projects/clangbsd-import= ) (revision 208076) @@ -0,0 +1,2 @@ +/* $FreeBSD$ */ +#include "PPCGenInstrInfo.inc.h" Property changes on: usr.bin/clang/include/PPCGenInstrInfo.inc ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/include/X86GenDAGISel.inc =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/include/X86GenDAGISel.inc (.../head) (revision 0) +++ usr.bin/clang/include/X86GenDAGISel.inc (.../projects/clangbsd-import) = (revision 208076) @@ -0,0 +1,2 @@ +/* $FreeBSD$ */ +#include "X86GenDAGISel.inc.h" Property changes on: usr.bin/clang/include/X86GenDAGISel.inc ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/include/X86GenFastISel.inc =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/include/X86GenFastISel.inc (.../head) (revision 0) +++ usr.bin/clang/include/X86GenFastISel.inc (.../projects/clangbsd-import)= (revision 208076) @@ -0,0 +1,2 @@ +/* $FreeBSD$ */ +#include "X86GenFastISel.inc.h" Property changes on: usr.bin/clang/include/X86GenFastISel.inc ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/include/clang/Basic/DiagnosticParseKinds.inc =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/include/clang/Basic/DiagnosticParseKinds.inc (.../head) (= revision 0) +++ usr.bin/clang/include/clang/Basic/DiagnosticParseKinds.inc (.../project= s/clangbsd-import) (revision 208076) @@ -0,0 +1,2 @@ +/* $FreeBSD$ */ +#include "DiagnosticParseKinds.inc.h" Property changes on: usr.bin/clang/include/clang/Basic/DiagnosticParseKinds= =2Einc ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/include/clang/Basic/DiagnosticDriverKinds.inc =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/include/clang/Basic/DiagnosticDriverKinds.inc (.../head) = (revision 0) +++ usr.bin/clang/include/clang/Basic/DiagnosticDriverKinds.inc (.../projec= ts/clangbsd-import) (revision 208076) @@ -0,0 +1,2 @@ +/* $FreeBSD$ */ +#include "DiagnosticDriverKinds.inc.h" Property changes on: usr.bin/clang/include/clang/Basic/DiagnosticDriverKind= s.inc ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/include/clang/Basic/DiagnosticFrontendKinds.inc =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/include/clang/Basic/DiagnosticFrontendKinds.inc (.../head= ) (revision 0) +++ usr.bin/clang/include/clang/Basic/DiagnosticFrontendKinds.inc (.../proj= ects/clangbsd-import) (revision 208076) @@ -0,0 +1,2 @@ +/* $FreeBSD$ */ +#include "DiagnosticFrontendKinds.inc.h" Property changes on: usr.bin/clang/include/clang/Basic/DiagnosticFrontendKi= nds.inc ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/include/clang/Basic/DiagnosticAnalysisKinds.inc =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/include/clang/Basic/DiagnosticAnalysisKinds.inc (.../head= ) (revision 0) +++ usr.bin/clang/include/clang/Basic/DiagnosticAnalysisKinds.inc (.../proj= ects/clangbsd-import) (revision 208076) @@ -0,0 +1,2 @@ +/* $FreeBSD$ */ +#include "DiagnosticAnalysisKinds.inc.h" Property changes on: usr.bin/clang/include/clang/Basic/DiagnosticAnalysisKi= nds.inc ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/include/clang/Basic/DiagnosticSemaKinds.inc =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/include/clang/Basic/DiagnosticSemaKinds.inc (.../head) (r= evision 0) +++ usr.bin/clang/include/clang/Basic/DiagnosticSemaKinds.inc (.../projects= /clangbsd-import) (revision 208076) @@ -0,0 +1,2 @@ +/* $FreeBSD$ */ +#include "DiagnosticSemaKinds.inc.h" Property changes on: usr.bin/clang/include/clang/Basic/DiagnosticSemaKinds.= inc ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/include/clang/Basic/DiagnosticGroups.inc =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/include/clang/Basic/DiagnosticGroups.inc (.../head) (revi= sion 0) +++ usr.bin/clang/include/clang/Basic/DiagnosticGroups.inc (.../projects/cl= angbsd-import) (revision 208076) @@ -0,0 +1,2 @@ +/* $FreeBSD$ */ +#include "DiagnosticGroups.inc.h" Property changes on: usr.bin/clang/include/clang/Basic/DiagnosticGroups.inc ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/include/clang/Basic/DiagnosticASTKinds.inc =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/include/clang/Basic/DiagnosticASTKinds.inc (.../head) (re= vision 0) +++ usr.bin/clang/include/clang/Basic/DiagnosticASTKinds.inc (.../projects/= clangbsd-import) (revision 208076) @@ -0,0 +1,2 @@ +/* $FreeBSD$ */ +#include "DiagnosticASTKinds.inc.h" Property changes on: usr.bin/clang/include/clang/Basic/DiagnosticASTKinds.i= nc ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/include/clang/Basic/DiagnosticCommonKinds.inc =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/include/clang/Basic/DiagnosticCommonKinds.inc (.../head) = (revision 0) +++ usr.bin/clang/include/clang/Basic/DiagnosticCommonKinds.inc (.../projec= ts/clangbsd-import) (revision 208076) @@ -0,0 +1,2 @@ +/* $FreeBSD$ */ +#include "DiagnosticCommonKinds.inc.h" Property changes on: usr.bin/clang/include/clang/Basic/DiagnosticCommonKind= s.inc ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/include/clang/Basic/DiagnosticLexKinds.inc =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/include/clang/Basic/DiagnosticLexKinds.inc (.../head) (re= vision 0) +++ usr.bin/clang/include/clang/Basic/DiagnosticLexKinds.inc (.../projects/= clangbsd-import) (revision 208076) @@ -0,0 +1,2 @@ +/* $FreeBSD$ */ +#include "DiagnosticLexKinds.inc.h" Property changes on: usr.bin/clang/include/clang/Basic/DiagnosticLexKinds.i= nc ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/include/clang/Driver/Options.inc =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/include/clang/Driver/Options.inc (.../head) (revision 0) +++ usr.bin/clang/include/clang/Driver/Options.inc (.../projects/clangbsd-i= mport) (revision 208076) @@ -0,0 +1,2 @@ +/* $FreeBSD$ */ +#include "Options.inc.h" Property changes on: usr.bin/clang/include/clang/Driver/Options.inc ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/include/clang/Driver/CC1Options.inc =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/include/clang/Driver/CC1Options.inc (.../head) (revision = 0) +++ usr.bin/clang/include/clang/Driver/CC1Options.inc (.../projects/clangbs= d-import) (revision 208076) @@ -0,0 +1,2 @@ +/* $FreeBSD$ */ +#include "CC1Options.inc.h" Property changes on: usr.bin/clang/include/clang/Driver/CC1Options.inc ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/include/ARMGenInstrNames.inc =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/include/ARMGenInstrNames.inc (.../head) (revision 0) +++ usr.bin/clang/include/ARMGenInstrNames.inc (.../projects/clangbsd-impor= t) (revision 208076) @@ -0,0 +1,2 @@ +/* $FreeBSD$ */ +#include "ARMGenInstrNames.inc.h" Property changes on: usr.bin/clang/include/ARMGenInstrNames.inc ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/include/X86GenAsmWriter.inc =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/include/X86GenAsmWriter.inc (.../head) (revision 0) +++ usr.bin/clang/include/X86GenAsmWriter.inc (.../projects/clangbsd-import= ) (revision 208076) @@ -0,0 +1,2 @@ +/* $FreeBSD$ */ +#include "X86GenAsmWriter.inc.h" Property changes on: usr.bin/clang/include/X86GenAsmWriter.inc ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/include/IA64GenRegisterInfo.inc =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/include/IA64GenRegisterInfo.inc (.../head) (revision 0) +++ usr.bin/clang/include/IA64GenRegisterInfo.inc (.../projects/clangbsd-im= port) (revision 208076) @@ -0,0 +1,2 @@ +/* $FreeBSD$ */ +#include "IA64GenRegisterInfo.inc.h" Property changes on: usr.bin/clang/include/IA64GenRegisterInfo.inc ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/include/MipsGenSubtarget.inc =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/include/MipsGenSubtarget.inc (.../head) (revision 0) +++ usr.bin/clang/include/MipsGenSubtarget.inc (.../projects/clangbsd-impor= t) (revision 208076) @@ -0,0 +1,2 @@ +/* $FreeBSD$ */ +#include "MipsGenSubtarget.inc.h" Property changes on: usr.bin/clang/include/MipsGenSubtarget.inc ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/include/MipsGenRegisterInfo.inc =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/include/MipsGenRegisterInfo.inc (.../head) (revision 0) +++ usr.bin/clang/include/MipsGenRegisterInfo.inc (.../projects/clangbsd-im= port) (revision 208076) @@ -0,0 +1,2 @@ +/* $FreeBSD$ */ +#include "MipsGenRegisterInfo.inc.h" Property changes on: usr.bin/clang/include/MipsGenRegisterInfo.inc ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/include/PPCGenRegisterInfo.h.inc =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/include/PPCGenRegisterInfo.h.inc (.../head) (revision 0) +++ usr.bin/clang/include/PPCGenRegisterInfo.h.inc (.../projects/clangbsd-i= mport) (revision 208076) @@ -0,0 +1,2 @@ +/* $FreeBSD$ */ +#include "PPCGenRegisterInfo.h.inc.h" Property changes on: usr.bin/clang/include/PPCGenRegisterInfo.h.inc ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/include/IA64GenDAGISel.inc =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/include/IA64GenDAGISel.inc (.../head) (revision 0) +++ usr.bin/clang/include/IA64GenDAGISel.inc (.../projects/clangbsd-import)= (revision 208076) @@ -0,0 +1,2 @@ +/* $FreeBSD$ */ +#include "IA64GenDAGISel.inc.h" Property changes on: usr.bin/clang/include/IA64GenDAGISel.inc ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/include/X86GenRegisterInfo.h.inc =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/include/X86GenRegisterInfo.h.inc (.../head) (revision 0) +++ usr.bin/clang/include/X86GenRegisterInfo.h.inc (.../projects/clangbsd-i= mport) (revision 208076) @@ -0,0 +1,2 @@ +/* $FreeBSD$ */ +#include "X86GenRegisterInfo.h.inc.h" Property changes on: usr.bin/clang/include/X86GenRegisterInfo.h.inc ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/include/ARMGenCallingConv.inc =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/include/ARMGenCallingConv.inc (.../head) (revision 0) +++ usr.bin/clang/include/ARMGenCallingConv.inc (.../projects/clangbsd-impo= rt) (revision 208076) @@ -0,0 +1,2 @@ +/* $FreeBSD$ */ +#include "ARMGenCallingConv.inc.h" Property changes on: usr.bin/clang/include/ARMGenCallingConv.inc ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/include/ARMGenRegisterInfo.inc =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/include/ARMGenRegisterInfo.inc (.../head) (revision 0) +++ usr.bin/clang/include/ARMGenRegisterInfo.inc (.../projects/clangbsd-imp= ort) (revision 208076) @@ -0,0 +1,2 @@ +/* $FreeBSD$ */ +#include "ARMGenRegisterInfo.inc.h" Property changes on: usr.bin/clang/include/ARMGenRegisterInfo.inc ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/include/MipsGenRegisterNames.inc =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/include/MipsGenRegisterNames.inc (.../head) (revision 0) +++ usr.bin/clang/include/MipsGenRegisterNames.inc (.../projects/clangbsd-i= mport) (revision 208076) @@ -0,0 +1,2 @@ +/* $FreeBSD$ */ +#include "MipsGenRegisterNames.inc.h" Property changes on: usr.bin/clang/include/MipsGenRegisterNames.inc ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/include/IA64GenAsmWriter.inc =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/include/IA64GenAsmWriter.inc (.../head) (revision 0) +++ usr.bin/clang/include/IA64GenAsmWriter.inc (.../projects/clangbsd-impor= t) (revision 208076) @@ -0,0 +1,2 @@ +/* $FreeBSD$ */ +#include "IA64GenAsmWriter.inc.h" Property changes on: usr.bin/clang/include/IA64GenAsmWriter.inc ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/include/PPCGenCallingConv.inc =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/include/PPCGenCallingConv.inc (.../head) (revision 0) +++ usr.bin/clang/include/PPCGenCallingConv.inc (.../projects/clangbsd-impo= rt) (revision 208076) @@ -0,0 +1,2 @@ +/* $FreeBSD$ */ +#include "PPCGenCallingConv.inc.h" Property changes on: usr.bin/clang/include/PPCGenCallingConv.inc ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/include/ARMGenCodeEmitter.inc =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/include/ARMGenCodeEmitter.inc (.../head) (revision 0) +++ usr.bin/clang/include/ARMGenCodeEmitter.inc (.../projects/clangbsd-impo= rt) (revision 208076) @@ -0,0 +1,2 @@ +/* $FreeBSD$ */ +#include "ARMGenCodeEmitter.inc.h" Property changes on: usr.bin/clang/include/ARMGenCodeEmitter.inc ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/include/MipsGenInstrInfo.inc =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/include/MipsGenInstrInfo.inc (.../head) (revision 0) +++ usr.bin/clang/include/MipsGenInstrInfo.inc (.../projects/clangbsd-impor= t) (revision 208076) @@ -0,0 +1,2 @@ +/* $FreeBSD$ */ +#include "MipsGenInstrInfo.inc.h" Property changes on: usr.bin/clang/include/MipsGenInstrInfo.inc ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/include/X86GenSubtarget.inc =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/include/X86GenSubtarget.inc (.../head) (revision 0) +++ usr.bin/clang/include/X86GenSubtarget.inc (.../projects/clangbsd-import= ) (revision 208076) @@ -0,0 +1,2 @@ +/* $FreeBSD$ */ +#include "X86GenSubtarget.inc.h" Property changes on: usr.bin/clang/include/X86GenSubtarget.inc ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/include/PPCGenCodeEmitter.inc =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/include/PPCGenCodeEmitter.inc (.../head) (revision 0) +++ usr.bin/clang/include/PPCGenCodeEmitter.inc (.../projects/clangbsd-impo= rt) (revision 208076) @@ -0,0 +1,2 @@ +/* $FreeBSD$ */ +#include "PPCGenCodeEmitter.inc.h" Property changes on: usr.bin/clang/include/PPCGenCodeEmitter.inc ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/include/ARMGenDAGISel.inc =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/include/ARMGenDAGISel.inc (.../head) (revision 0) +++ usr.bin/clang/include/ARMGenDAGISel.inc (.../projects/clangbsd-import) = (revision 208076) @@ -0,0 +1,2 @@ +/* $FreeBSD$ */ +#include "ARMGenDAGISel.inc.h" Property changes on: usr.bin/clang/include/ARMGenDAGISel.inc ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/include/IA64GenRegisterInfo.h.inc =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/include/IA64GenRegisterInfo.h.inc (.../head) (revision 0) +++ usr.bin/clang/include/IA64GenRegisterInfo.h.inc (.../projects/clangbsd-= import) (revision 208076) @@ -0,0 +1,2 @@ +/* $FreeBSD$ */ +#include "IA64GenRegisterInfo.h.inc.h" Property changes on: usr.bin/clang/include/IA64GenRegisterInfo.h.inc ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/include/Makefile =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/include/Makefile (.../head) (revision 0) +++ usr.bin/clang/include/Makefile (.../projects/clangbsd-import) (revision= 208076) @@ -0,0 +1,11 @@ +# $FreeBSD$ + +.PATH: ${.CURDIR}/../../../contrib/llvm/tools/clang/lib/Headers + +INCSDIR=3D${INCLUDEDIR}/clang/2.0 + +INCS=3D emmintrin.h mm_malloc.h mmintrin.h pmmintrin.h tmmintrin.h xmmintr= in.h + +.include +.include +.include Property changes on: usr.bin/clang/include/Makefile ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/include/PPCGenDAGISel.inc =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/include/PPCGenDAGISel.inc (.../head) (revision 0) +++ usr.bin/clang/include/PPCGenDAGISel.inc (.../projects/clangbsd-import) = (revision 208076) @@ -0,0 +1,2 @@ +/* $FreeBSD$ */ +#include "PPCGenDAGISel.inc.h" Property changes on: usr.bin/clang/include/PPCGenDAGISel.inc ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/include/ARMGenAsmWriter.inc =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/include/ARMGenAsmWriter.inc (.../head) (revision 0) +++ usr.bin/clang/include/ARMGenAsmWriter.inc (.../projects/clangbsd-import= ) (revision 208076) @@ -0,0 +1,2 @@ +/* $FreeBSD$ */ +#include "ARMGenAsmWriter.inc.h" Property changes on: usr.bin/clang/include/ARMGenAsmWriter.inc ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/include/X86GenRegisterNames.inc =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/include/X86GenRegisterNames.inc (.../head) (revision 0) +++ usr.bin/clang/include/X86GenRegisterNames.inc (.../projects/clangbsd-im= port) (revision 208076) @@ -0,0 +1,2 @@ +/* $FreeBSD$ */ +#include "X86GenRegisterNames.inc.h" Property changes on: usr.bin/clang/include/X86GenRegisterNames.inc ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/include/MipsGenRegisterInfo.h.inc =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/include/MipsGenRegisterInfo.h.inc (.../head) (revision 0) +++ usr.bin/clang/include/MipsGenRegisterInfo.h.inc (.../projects/clangbsd-= import) (revision 208076) @@ -0,0 +1,2 @@ +/* $FreeBSD$ */ +#include "MipsGenRegisterInfo.h.inc.h" Property changes on: usr.bin/clang/include/MipsGenRegisterInfo.h.inc ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/include/PPCGenAsmWriter.inc =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/include/PPCGenAsmWriter.inc (.../head) (revision 0) +++ usr.bin/clang/include/PPCGenAsmWriter.inc (.../projects/clangbsd-import= ) (revision 208076) @@ -0,0 +1,2 @@ +/* $FreeBSD$ */ +#include "PPCGenAsmWriter.inc.h" Property changes on: usr.bin/clang/include/PPCGenAsmWriter.inc ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/include/X86GenInstrInfo.inc =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/include/X86GenInstrInfo.inc (.../head) (revision 0) +++ usr.bin/clang/include/X86GenInstrInfo.inc (.../projects/clangbsd-import= ) (revision 208076) @@ -0,0 +1,2 @@ +/* $FreeBSD$ */ +#include "X86GenInstrInfo.inc.h" Property changes on: usr.bin/clang/include/X86GenInstrInfo.inc ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/include/PPCGenInstrNames.inc =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/include/PPCGenInstrNames.inc (.../head) (revision 0) +++ usr.bin/clang/include/PPCGenInstrNames.inc (.../projects/clangbsd-impor= t) (revision 208076) @@ -0,0 +1,2 @@ +/* $FreeBSD$ */ +#include "PPCGenInstrNames.inc.h" Property changes on: usr.bin/clang/include/PPCGenInstrNames.inc ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/include/ARMGenRegisterInfo.h.inc =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/include/ARMGenRegisterInfo.h.inc (.../head) (revision 0) +++ usr.bin/clang/include/ARMGenRegisterInfo.h.inc (.../projects/clangbsd-i= mport) (revision 208076) @@ -0,0 +1,2 @@ +/* $FreeBSD$ */ +#include "ARMGenRegisterInfo.h.inc.h" Property changes on: usr.bin/clang/include/ARMGenRegisterInfo.h.inc ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/include/MipsGenCallingConv.inc =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/include/MipsGenCallingConv.inc (.../head) (revision 0) +++ usr.bin/clang/include/MipsGenCallingConv.inc (.../projects/clangbsd-imp= ort) (revision 208076) @@ -0,0 +1,2 @@ +/* $FreeBSD$ */ +#include "MipsGenCallingConv.inc.h" Property changes on: usr.bin/clang/include/MipsGenCallingConv.inc ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/include/X86GenInstrNames.inc =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/include/X86GenInstrNames.inc (.../head) (revision 0) +++ usr.bin/clang/include/X86GenInstrNames.inc (.../projects/clangbsd-impor= t) (revision 208076) @@ -0,0 +1,2 @@ +/* $FreeBSD$ */ +#include "X86GenInstrNames.inc.h" Property changes on: usr.bin/clang/include/X86GenInstrNames.inc ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/include/X86GenAsmMatcher.inc =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/include/X86GenAsmMatcher.inc (.../head) (revision 0) +++ usr.bin/clang/include/X86GenAsmMatcher.inc (.../projects/clangbsd-impor= t) (revision 208076) @@ -0,0 +1,2 @@ +/* $FreeBSD$ */ +#include "X86GenAsmMatcher.inc.h" Property changes on: usr.bin/clang/include/X86GenAsmMatcher.inc ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/include/IA64GenRegisterNames.inc =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/include/IA64GenRegisterNames.inc (.../head) (revision 0) +++ usr.bin/clang/include/IA64GenRegisterNames.inc (.../projects/clangbsd-i= mport) (revision 208076) @@ -0,0 +1,2 @@ +/* $FreeBSD$ */ +#include "IA64GenRegisterNames.inc.h" Property changes on: usr.bin/clang/include/IA64GenRegisterNames.inc ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/include/IA64GenInstrInfo.inc =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/include/IA64GenInstrInfo.inc (.../head) (revision 0) +++ usr.bin/clang/include/IA64GenInstrInfo.inc (.../projects/clangbsd-impor= t) (revision 208076) @@ -0,0 +1,2 @@ +/* $FreeBSD$ */ +#include "IA64GenInstrInfo.inc.h" Property changes on: usr.bin/clang/include/IA64GenInstrInfo.inc ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/include/ARMGenSubtarget.inc =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/include/ARMGenSubtarget.inc (.../head) (revision 0) +++ usr.bin/clang/include/ARMGenSubtarget.inc (.../projects/clangbsd-import= ) (revision 208076) @@ -0,0 +1,2 @@ +/* $FreeBSD$ */ +#include "ARMGenSubtarget.inc.h" Property changes on: usr.bin/clang/include/ARMGenSubtarget.inc ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/include/MipsGenDAGISel.inc =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/include/MipsGenDAGISel.inc (.../head) (revision 0) +++ usr.bin/clang/include/MipsGenDAGISel.inc (.../projects/clangbsd-import)= (revision 208076) @@ -0,0 +1,2 @@ +/* $FreeBSD$ */ +#include "MipsGenDAGISel.inc.h" Property changes on: usr.bin/clang/include/MipsGenDAGISel.inc ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/include/PPCGenRegisterInfo.inc =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/include/PPCGenRegisterInfo.inc (.../head) (revision 0) +++ usr.bin/clang/include/PPCGenRegisterInfo.inc (.../projects/clangbsd-imp= ort) (revision 208076) @@ -0,0 +1,2 @@ +/* $FreeBSD$ */ +#include "PPCGenRegisterInfo.inc.h" Property changes on: usr.bin/clang/include/PPCGenRegisterInfo.inc ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/include/PPCGenSubtarget.inc =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/include/PPCGenSubtarget.inc (.../head) (revision 0) +++ usr.bin/clang/include/PPCGenSubtarget.inc (.../projects/clangbsd-import= ) (revision 208076) @@ -0,0 +1,2 @@ +/* $FreeBSD$ */ +#include "PPCGenSubtarget.inc.h" Property changes on: usr.bin/clang/include/PPCGenSubtarget.inc ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/include/X86GenAsmWriter1.inc =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/include/X86GenAsmWriter1.inc (.../head) (revision 0) +++ usr.bin/clang/include/X86GenAsmWriter1.inc (.../projects/clangbsd-impor= t) (revision 208076) @@ -0,0 +1,2 @@ +/* $FreeBSD$ */ +#include "X86GenAsmWriter1.inc.h" Property changes on: usr.bin/clang/include/X86GenAsmWriter1.inc ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/include/X86GenCallingConv.inc =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/include/X86GenCallingConv.inc (.../head) (revision 0) +++ usr.bin/clang/include/X86GenCallingConv.inc (.../projects/clangbsd-impo= rt) (revision 208076) @@ -0,0 +1,2 @@ +/* $FreeBSD$ */ +#include "X86GenCallingConv.inc.h" Property changes on: usr.bin/clang/include/X86GenCallingConv.inc ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/include/MipsGenAsmWriter.inc =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/include/MipsGenAsmWriter.inc (.../head) (revision 0) +++ usr.bin/clang/include/MipsGenAsmWriter.inc (.../projects/clangbsd-impor= t) (revision 208076) @@ -0,0 +1,2 @@ +/* $FreeBSD$ */ +#include "MipsGenAsmWriter.inc.h" Property changes on: usr.bin/clang/include/MipsGenAsmWriter.inc ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/include/X86GenRegisterInfo.inc =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/include/X86GenRegisterInfo.inc (.../head) (revision 0) +++ usr.bin/clang/include/X86GenRegisterInfo.inc (.../projects/clangbsd-imp= ort) (revision 208076) @@ -0,0 +1,2 @@ +/* $FreeBSD$ */ +#include "X86GenRegisterInfo.inc.h" Property changes on: usr.bin/clang/include/X86GenRegisterInfo.inc ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/include/IA64GenInstrNames.inc =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/include/IA64GenInstrNames.inc (.../head) (revision 0) +++ usr.bin/clang/include/IA64GenInstrNames.inc (.../projects/clangbsd-impo= rt) (revision 208076) @@ -0,0 +1,2 @@ +/* $FreeBSD$ */ +#include "IA64GenInstrNames.inc.h" Property changes on: usr.bin/clang/include/IA64GenInstrNames.inc ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/include/ARMGenRegisterNames.inc =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/include/ARMGenRegisterNames.inc (.../head) (revision 0) +++ usr.bin/clang/include/ARMGenRegisterNames.inc (.../projects/clangbsd-im= port) (revision 208076) @@ -0,0 +1,2 @@ +/* $FreeBSD$ */ +#include "ARMGenRegisterNames.inc.h" Property changes on: usr.bin/clang/include/ARMGenRegisterNames.inc ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/include/llvm/System/DataTypes.h =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/include/llvm/System/DataTypes.h (.../head) (revision 0) +++ usr.bin/clang/include/llvm/System/DataTypes.h (.../projects/clangbsd-im= port) (revision 208076) @@ -0,0 +1,113 @@ +/* $FreeBSD$ */ +/* include/llvm/System/DataTypes.h. Generated from DataTypes.h.in by conf= igure. */ +/*=3D=3D=3D-- include/System/DataTypes.h - Define fixed size types -----*-= C -*-=3D=3D=3D*\ +|* = *| +|* The LLVM Compiler Infrastructure = *| +|* = *| +|* This file is distributed under the University of Illinois Open Source = *| +|* License. See LICENSE.TXT for details. = *| +|* = *| +|*=3D=3D=3D---------------------------------------------------------------= -------=3D=3D=3D*| +|* = *| +|* This file contains definitions to figure out the size of _HOST_ data ty= pes.*| +|* This file is important because different host OS's define different mac= ros,*| +|* which makes portability tough. This file exports the following = *| +|* definitions: = *| +|* = *| +|* [u]int(32|64)_t : typedefs for signed and unsigned 32/64 bit system t= ypes*| +|* [U]INT(8|16|32|64)_(MIN|MAX) : Constants for the min and max values. = *| +|* = *| +|* No library is required when using these functinons. = *| +|* = *| +|*=3D=3D=3D---------------------------------------------------------------= -------=3D=3D=3D*/ + +/* Please leave this file C-compatible. */ + +#ifndef SUPPORT_DATATYPES_H +#define SUPPORT_DATATYPES_H + +#define HAVE_SYS_TYPES_H 1 +#define HAVE_INTTYPES_H 1 +#define HAVE_STDINT_H 1 +#define HAVE_UINT64_T 1 +/* #undef HAVE_U_INT64_T */ + +#ifdef __cplusplus +#include +#else +#include +#endif + +/* Note that this header's correct operation depends on __STDC_LIMIT_MACROS + being defined. We would define it here, but in order to prevent Bad Th= ings + happening when system headers or C++ STL headers include stdint.h befor= e we + define it here, we define it on the g++ command line (in Makefile.rules= ). */ +#if !defined(__STDC_LIMIT_MACROS) +# error "Must #define __STDC_LIMIT_MACROS before #including System/DataTyp= es.h" +#endif + +#if !defined(__STDC_CONSTANT_MACROS) +# error "Must #define __STDC_CONSTANT_MACROS before " \ + "#including System/DataTypes.h" +#endif + +/* Note that includes , if this is a C99 system. */ +#ifdef HAVE_SYS_TYPES_H +#include +#endif + +#ifdef HAVE_INTTYPES_H +#include +#endif + +#ifdef HAVE_STDINT_H +#include +#endif + +#ifdef _AIX +#include "llvm/System/AIXDataTypesFix.h" +#endif + +/* Handle incorrect definition of uint64_t as u_int64_t */ +#ifndef HAVE_UINT64_T +#ifdef HAVE_U_INT64_T +typedef u_int64_t uint64_t; +#else +# error "Don't have a definition for uint64_t on this platform" +#endif +#endif + +#ifdef _OpenBSD_ +#define INT8_MAX 127 +#define INT8_MIN -128 +#define UINT8_MAX 255 +#define INT16_MAX 32767 +#define INT16_MIN -32768 +#define UINT16_MAX 65535 +#define INT32_MAX 2147483647 +#define INT32_MIN -2147483648 +#define UINT32_MAX 4294967295U +#endif + +/* Set defaults for constants which we cannot find. */ +#if !defined(INT64_MAX) +# define INT64_MAX 9223372036854775807LL +#endif +#if !defined(INT64_MIN) +# define INT64_MIN ((-INT64_MAX)-1) +#endif +#if !defined(UINT64_MAX) +# define UINT64_MAX 0xffffffffffffffffULL +#endif + +#if __GNUC__ > 3 +#define END_WITH_NULL __attribute__((sentinel)) +#else +#define END_WITH_NULL +#endif + +#ifndef HUGE_VALF +#define HUGE_VALF (float)HUGE_VAL +#endif + +#endif /* SUPPORT_DATATYPES_H */ Property changes on: usr.bin/clang/include/llvm/System/DataTypes.h ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/include/llvm/Config/AsmPrinters.def =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/include/llvm/Config/AsmPrinters.def (.../head) (revision = 0) +++ usr.bin/clang/include/llvm/Config/AsmPrinters.def (.../projects/clangbs= d-import) (revision 208076) @@ -0,0 +1,30 @@ +/* $FreeBSD$ */ +//=3D=3D=3D- llvm/Config/AsmPrinters.def - LLVM Assembly Printers -----*- = C++ -*-=3D=3D=3D// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//=3D=3D=3D---------------------------------------------------------------= -------=3D=3D=3D// +// +// This file enumerates all of the assembly-language printers +// supported by this build of LLVM. Clients of this file should define +// the LLVM_ASM_PRINTER macro to be a function-like macro with a +// single parameter (the name of the target whose assembly can be +// generated); including this file will then enumerate all of the +// targets with assembly printers. +// +// The set of targets supported by LLVM is generated at configuration +// time, at which point this header is generated. Do not modify this +// header directly. +// +//=3D=3D=3D---------------------------------------------------------------= -------=3D=3D=3D// + +#ifndef LLVM_ASM_PRINTER +# error Please define the macro LLVM_ASM_PRINTER(TargetName) +#endif + +LLVM_ASM_PRINTER(Mips) LLVM_ASM_PRINTER(ARM) LLVM_ASM_PRINTER(PowerPC) LLV= M_ASM_PRINTER(X86)=20 + +#undef LLVM_ASM_PRINTER Property changes on: usr.bin/clang/include/llvm/Config/AsmPrinters.def ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/include/llvm/Config/Targets.def =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/include/llvm/Config/Targets.def (.../head) (revision 0) +++ usr.bin/clang/include/llvm/Config/Targets.def (.../projects/clangbsd-im= port) (revision 208076) @@ -0,0 +1,29 @@ +/* $FreeBSD$ */ +/*=3D=3D=3D- llvm/Config/Targets.def - LLVM Target Architectures ------*- = C++ -*-=3D=3D=3D*\ +|* = *| +|* The LLVM Compiler Infrastructure = *| +|* = *| +|* This file is distributed under the University of Illinois Open Source = *| +|* License. See LICENSE.TXT for details. = *| +|* = *| +|*=3D=3D=3D---------------------------------------------------------------= -------=3D=3D=3D*| +|* = *| +|* This file enumerates all of the target architectures supported by = *| +|* this build of LLVM. Clients of this file should define the = *| +|* LLVM_TARGET macro to be a function-like macro with a single = *| +|* parameter (the name of the target); including this file will then = *| +|* enumerate all of the targets. = *| +|* = *| +|* The set of targets supported by LLVM is generated at configuration = *| +|* time, at which point this header is generated. Do not modify this = *| +|* header directly. = *| +|* = *| +\*=3D=3D=3D---------------------------------------------------------------= -------=3D=3D=3D*/ + +#ifndef LLVM_TARGET +# error Please define the macro LLVM_TARGET(TargetName) +#endif + +LLVM_TARGET(Mips) LLVM_TARGET(ARM) LLVM_TARGET(PowerPC) LLVM_TARGET(X86)= =20 + +#undef LLVM_TARGET Property changes on: usr.bin/clang/include/llvm/Config/Targets.def ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/include/llvm/Config/config.h =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/include/llvm/Config/config.h (.../head) (revision 0) +++ usr.bin/clang/include/llvm/Config/config.h (.../projects/clangbsd-impor= t) (revision 208076) @@ -0,0 +1,569 @@ +/* $FreeBSD$ */ +/* include/llvm/Config/config.h. Generated from config.h.in by configure.= */ +/* include/llvm/Config/config.h.in. Generated from autoconf/configure.ac = by autoheader. */ + +/* 32 bit multilib directory. */ +#define CXX_INCLUDE_32BIT_DIR "" + +/* 64 bit multilib directory. */ +#define CXX_INCLUDE_64BIT_DIR "" + +/* Arch the libstdc++ headers. */ +#define CXX_INCLUDE_ARCH "" + +/* Directory with the libstdc++ headers. */ +#define CXX_INCLUDE_ROOT "" + +/* Directories clang will search for headers */ +#define C_INCLUDE_DIRS "" + +/* Define if CBE is enabled for printf %a output */ +#define ENABLE_CBE_PRINTF_A 1 + +/* Define if position independent code is enabled */ +#define ENABLE_PIC 1 + +/* Define if threads enabled */ +/* #undef ENABLE_THREADS */ + +/* Define if timestamp information (e.g., __DATE___) is allowed */ +#define ENABLE_TIMESTAMPS 1 + +/* Define to 1 if you have the `argz_append' function. */ +/* #undef HAVE_ARGZ_APPEND */ + +/* Define to 1 if you have the `argz_create_sep' function. */ +/* #undef HAVE_ARGZ_CREATE_SEP */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_ARGZ_H */ + +/* Define to 1 if you have the `argz_insert' function. */ +/* #undef HAVE_ARGZ_INSERT */ + +/* Define to 1 if you have the `argz_next' function. */ +/* #undef HAVE_ARGZ_NEXT */ + +/* Define to 1 if you have the `argz_stringify' function. */ +/* #undef HAVE_ARGZ_STRINGIFY */ + +/* Define to 1 if you have the header file. */ +#define HAVE_ASSERT_H 1 + +/* Define to 1 if you have the `backtrace' function. */ +/* #undef HAVE_BACKTRACE */ + +/* Define to 1 if you have the `bcopy' function. */ +/* #undef HAVE_BCOPY */ + +/* Define to 1 if you have the `ceilf' function. */ +#define HAVE_CEILF 1 + +/* Define if the neat program is available */ +/* #undef HAVE_CIRCO */ + +/* Define to 1 if you have the `closedir' function. */ +#define HAVE_CLOSEDIR 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_CTYPE_H 1 + +/* Define to 1 if you have the header file, and it defines `DIR= '. + */ +#define HAVE_DIRENT_H 1 + +/* Define if you have the GNU dld library. */ +/* #undef HAVE_DLD */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_DLD_H */ + +/* Define to 1 if you have the `dlerror' function. */ +#define HAVE_DLERROR 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* Define if dlopen() is available on this platform. */ +#define HAVE_DLOPEN 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_DL_H */ + +/* Define if the dot program is available */ +/* #undef HAVE_DOT */ + +/* Define if the dotty program is available */ +/* #undef HAVE_DOTTY */ + +/* Define if you have the _dyld_func_lookup function. */ +/* #undef HAVE_DYLD */ + +/* Define to 1 if you have the header file. */ +#define HAVE_ERRNO_H 1 + +/* Define to 1 if the system has the type `error_t'. */ +/* #undef HAVE_ERROR_T */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_EXECINFO_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_FCNTL_H 1 + +/* Define if the neat program is available */ +/* #undef HAVE_FDP */ + +/* Define if libffi is available on this platform. */ +/* #undef HAVE_FFI_CALL */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_FFI_FFI_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_FFI_H */ + +/* Set to 1 if the finite function is found in */ +/* #undef HAVE_FINITE_IN_IEEEFP_H */ + +/* Define to 1 if you have the `floorf' function. */ +#define HAVE_FLOORF 1 + +/* Define to 1 if you have the `fmodf' function. */ +#define HAVE_FMODF 1 + +/* Define to 1 if you have the `getcwd' function. */ +#define HAVE_GETCWD 1 + +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + +/* Define to 1 if you have the `getrlimit' function. */ +#define HAVE_GETRLIMIT 1 + +/* Define to 1 if you have the `getrusage' function. */ +#define HAVE_GETRUSAGE 1 + +/* Define to 1 if you have the `gettimeofday' function. */ +#define HAVE_GETTIMEOFDAY 1 + +/* Define if the Graphviz program is available */ +/* #undef HAVE_GRAPHVIZ */ + +/* Define if the gv program is available */ +/* #undef HAVE_GV */ + +/* Define to 1 if you have the `index' function. */ +/* #undef HAVE_INDEX */ + +/* Define to 1 if the system has the type `int64_t'. */ +#define HAVE_INT64_T 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define to 1 if you have the `isatty' function. */ +#define HAVE_ISATTY 1 + +/* Set to 1 if the isinf function is found in */ +#define HAVE_ISINF_IN_CMATH 1 + +/* Set to 1 if the isinf function is found in */ +#define HAVE_ISINF_IN_MATH_H 1 + +/* Set to 1 if the isnan function is found in */ +#define HAVE_ISNAN_IN_CMATH 1 + +/* Set to 1 if the isnan function is found in */ +#define HAVE_ISNAN_IN_MATH_H 1 + +/* Define if you have the libdl library or equivalent. */ +#define HAVE_LIBDL 1 + +/* Define to 1 if you have the `imagehlp' library (-limagehlp). */ +/* #undef HAVE_LIBIMAGEHLP */ + +/* Define to 1 if you have the `m' library (-lm). */ +#define HAVE_LIBM 1 + +/* Define to 1 if you have the `psapi' library (-lpsapi). */ +/* #undef HAVE_LIBPSAPI */ + +/* Define to 1 if you have the `pthread' library (-lpthread). */ +#define HAVE_LIBPTHREAD 1 + +/* Define to 1 if you have the `udis86' library (-ludis86). */ +/* #undef HAVE_LIBUDIS86 */ + +/* Define to 1 if you have the header file. */ +#define HAVE_LIMITS_H 1 + +/* Define if you can use -Wl,-export-dynamic. */ +#define HAVE_LINK_EXPORT_DYNAMIC 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_LINK_H 1 + +/* Define if you can use -Wl,-R. to pass -R. to the linker, in order to add + the current directory to the dynamic linker search path. */ +#define HAVE_LINK_R 1 + +/* Define to 1 if you have the `longjmp' function. */ +#define HAVE_LONGJMP 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_MACH_MACH_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_MACH_O_DYLD_H */ + +/* Define if mallinfo() is available on this platform. */ +/* #undef HAVE_MALLINFO */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_MALLOC_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_MALLOC_MALLOC_H */ + +/* Define to 1 if you have the `malloc_zone_statistics' function. */ +/* #undef HAVE_MALLOC_ZONE_STATISTICS */ + +/* Define to 1 if you have the `memcpy' function. */ +#define HAVE_MEMCPY 1 + +/* Define to 1 if you have the `memmove' function. */ +#define HAVE_MEMMOVE 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if you have the `mkdtemp' function. */ +#define HAVE_MKDTEMP 1 + +/* Define to 1 if you have the `mkstemp' function. */ +#define HAVE_MKSTEMP 1 + +/* Define to 1 if you have the `mktemp' function. */ +#define HAVE_MKTEMP 1 + +/* Define to 1 if you have a working `mmap' system call. */ +#define HAVE_MMAP 1 + +/* Define if mmap() uses MAP_ANONYMOUS to map anonymous pages, or undefine= if + it uses MAP_ANON */ +/* #undef HAVE_MMAP_ANONYMOUS */ + +/* Define if mmap() can map files into memory */ +#define HAVE_MMAP_FILE=20 + +/* Define to 1 if you have the header file, and it defines `DIR'.= */ +/* #undef HAVE_NDIR_H */ + +/* Define to 1 if you have the `nearbyintf' function. */ +#define HAVE_NEARBYINTF 1 + +/* Define if the neat program is available */ +/* #undef HAVE_NEATO */ + +/* Define to 1 if you have the `opendir' function. */ +#define HAVE_OPENDIR 1 + +/* Define to 1 if you have the `posix_spawn' function. */ +#define HAVE_POSIX_SPAWN 1 + +/* Define to 1 if you have the `powf' function. */ +#define HAVE_POWF 1 + +/* Define if libtool can extract symbol lists from object files. */ +#define HAVE_PRELOADED_SYMBOLS 1 + +/* Define to have the %a format string */ +#define HAVE_PRINTF_A 1 + +/* Have pthread_getspecific */ +#define HAVE_PTHREAD_GETSPECIFIC 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_PTHREAD_H 1 + +/* Have pthread_mutex_lock */ +#define HAVE_PTHREAD_MUTEX_LOCK 1 + +/* Have pthread_rwlock_init */ +#define HAVE_PTHREAD_RWLOCK_INIT 1 + +/* Define to 1 if srand48/lrand48/drand48 exist in */ +#define HAVE_RAND48 1 + +/* Define to 1 if you have the `readdir' function. */ +#define HAVE_READDIR 1 + +/* Define to 1 if you have the `realpath' function. */ +#define HAVE_REALPATH 1 + +/* Define to 1 if you have the `rindex' function. */ +/* #undef HAVE_RINDEX */ + +/* Define to 1 if you have the `rintf' function. */ +#define HAVE_RINTF 1 + +/* Define to 1 if you have the `round' function. */ +#define HAVE_ROUND 1 + +/* Define to 1 if you have the `roundf' function. */ +#define HAVE_ROUNDF 1 + +/* Define to 1 if you have the `sbrk' function. */ +#define HAVE_SBRK 1 + +/* Define to 1 if you have the `setenv' function. */ +#define HAVE_SETENV 1 + +/* Define to 1 if you have the `setjmp' function. */ +#define HAVE_SETJMP 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SETJMP_H 1 + +/* Define to 1 if you have the `setrlimit' function. */ +#define HAVE_SETRLIMIT 1 + +/* Define if you have the shl_load function. */ +/* #undef HAVE_SHL_LOAD */ + +/* Define to 1 if you have the `siglongjmp' function. */ +#define HAVE_SIGLONGJMP 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SIGNAL_H 1 + +/* Define to 1 if you have the `sigsetjmp' function. */ +#define HAVE_SIGSETJMP 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDIO_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Set to 1 if the std::isinf function is found in */ +/* #undef HAVE_STD_ISINF_IN_CMATH */ + +/* Set to 1 if the std::isnan function is found in */ +#define HAVE_STD_ISNAN_IN_CMATH 1 + +/* Define to 1 if you have the `strchr' function. */ +#define HAVE_STRCHR 1 + +/* Define to 1 if you have the `strcmp' function. */ +#define HAVE_STRCMP 1 + +/* Define to 1 if you have the `strdup' function. */ +#define HAVE_STRDUP 1 + +/* Define to 1 if you have the `strerror' function. */ +#define HAVE_STRERROR 1 + +/* Define to 1 if you have the `strerror_r' function. */ +#define HAVE_STRERROR_R 1 + +/* Define to 1 if you have the `strerror_s' function. */ +/* #undef HAVE_STRERROR_S */ + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the `strrchr' function. */ +#define HAVE_STRRCHR 1 + +/* Define to 1 if you have the `strtof' function. */ +#define HAVE_STRTOF 1 + +/* Define to 1 if you have the `strtoll' function. */ +#define HAVE_STRTOLL 1 + +/* Define to 1 if you have the `strtoq' function. */ +#define HAVE_STRTOQ 1 + +/* Define to 1 if you have the `sysconf' function. */ +#define HAVE_SYSCONF 1 + +/* Define to 1 if you have the header file, and it defines `DI= R'. + */ +/* #undef HAVE_SYS_DIR_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_DL_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_IOCTL_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_MMAN_H 1 + +/* Define to 1 if you have the header file, and it defines `D= IR'. + */ +/* #undef HAVE_SYS_NDIR_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_PARAM_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_RESOURCE_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TIME_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have that is POSIX.1 compatible. */ +#define HAVE_SYS_WAIT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_TERMIOS_H 1 + +/* Define if the neat program is available */ +/* #undef HAVE_TWOPI */ + +/* Define to 1 if the system has the type `uint64_t'. */ +#define HAVE_UINT64_T 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UTIME_H 1 + +/* Define to 1 if the system has the type `u_int64_t'. */ +/* #undef HAVE_U_INT64_T */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_VALGRIND_VALGRIND_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINDOWS_H */ + +/* Define to 1 if you have the `__dso_handle' function. */ +#define HAVE___DSO_HANDLE 1 + +/* Build multithreading support into LLVM */ +/* #undef LLVM_MULTITHREADED */ + +/* LLVM architecture name for the native architecture, if available */ +#define LLVM_NATIVE_ARCH X86Target + +/* Define if this is Unixish platform */ +#define LLVM_ON_UNIX 1 + +/* Define if this is Win32ish platform */ +/* #undef LLVM_ON_WIN32 */ + +/* Define to path to circo program if found or 'echo circo' otherwise */ +/* #undef LLVM_PATH_CIRCO */ + +/* Define to path to dot program if found or 'echo dot' otherwise */ +/* #undef LLVM_PATH_DOT */ + +/* Define to path to dotty program if found or 'echo dotty' otherwise */ +/* #undef LLVM_PATH_DOTTY */ + +/* Define to path to fdp program if found or 'echo fdp' otherwise */ +/* #undef LLVM_PATH_FDP */ + +/* Define to path to Graphviz program if found or 'echo Graphviz' otherwis= e */ +/* #undef LLVM_PATH_GRAPHVIZ */ + +/* Define to path to gv program if found or 'echo gv' otherwise */ +/* #undef LLVM_PATH_GV */ + +/* Define to path to neato program if found or 'echo neato' otherwise */ +/* #undef LLVM_PATH_NEATO */ + +/* Define to path to twopi program if found or 'echo twopi' otherwise */ +/* #undef LLVM_PATH_TWOPI */ + +/* Installation prefix directory */ +#define LLVM_PREFIX "/usr/local" + +/* Define if the OS needs help to load dependent libraries for dlopen(). */ +#define LTDL_DLOPEN_DEPLIBS 1 + +/* Define to the sub-directory in which libtool stores uninstalled librari= es. + */ +#define LTDL_OBJDIR ".libs/" + +/* Define to the name of the environment variable that determines the dyna= mic + library search path. */ +#define LTDL_SHLIBPATH_VAR "LD_LIBRARY_PATH" + +/* Define to the extension used for shared libraries, say, ".so". */ +#define LTDL_SHLIB_EXT ".so" + +/* Define to the system default library search path. */ +#define LTDL_SYSSEARCHPATH "/lib:/usr/lib" + +/* Define if /dev/zero should be used when mapping RWX memory, or undefine= if + its not necessary */ +/* #undef NEED_DEV_ZERO_FOR_MMAP */ + +/* Define if dlsym() requires a leading underscore in symbol names. */ +/* #undef NEED_USCORE */ + +/* Define to the address where bug reports for this package should be sent= =2E */ +#define PACKAGE_BUGREPORT "llvmbugs@cs.uiuc.edu" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "llvm" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "llvm 2.8svn" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "-llvm-" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "2.8svn" + +/* Define as the return type of signal handlers (`int' or `void'). */ +#define RETSIGTYPE void + +/* Define to 1 if the `S_IS*' macros in do not work properly.= */ +/* #undef STAT_MACROS_BROKEN */ + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Define to 1 if you can safely include both and . */ +#define TIME_WITH_SYS_TIME 1 + +/* Define to 1 if your declares `struct tm'. */ +/* #undef TM_IN_SYS_TIME */ + +/* Define if we have the oprofile JIT-support library */ +#define USE_OPROFILE 0 + +/* Define if use udis86 library */ +#define USE_UDIS86 0 + +/* Define to empty if `const' does not conform to ANSI C. */ +/* #undef const */ + +/* Define to a type to use for `error_t' if it is not otherwise available.= */ +#define error_t int + +/* Define to `int' if does not define. */ +/* #undef pid_t */ + +/* Define to `unsigned int' if does not define. */ +/* #undef size_t */ Property changes on: usr.bin/clang/include/llvm/Config/config.h ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/include/llvm/Config/AsmParsers.def =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/include/llvm/Config/AsmParsers.def (.../head) (revision 0) +++ usr.bin/clang/include/llvm/Config/AsmParsers.def (.../projects/clangbsd= -import) (revision 208076) @@ -0,0 +1,29 @@ +//=3D=3D=3D- llvm/Config/AsmParsers.def - LLVM Assembly Parsers -------*- = C++ -*-=3D=3D=3D// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//=3D=3D=3D---------------------------------------------------------------= -------=3D=3D=3D// +// +// This file enumerates all of the assembly-language parsers +// supported by this build of LLVM. Clients of this file should define +// the LLVM_ASM_PARSER macro to be a function-like macro with a +// single parameter (the name of the target whose assembly can be +// generated); including this file will then enumerate all of the +// targets with assembly parsers. +// +// The set of targets supported by LLVM is generated at configuration +// time, at which point this header is generated. Do not modify this +// header directly. +// +//=3D=3D=3D---------------------------------------------------------------= -------=3D=3D=3D// + +#ifndef LLVM_ASM_PARSER +# error Please define the macro LLVM_ASM_PARSER(TargetName) +#endif + +LLVM_ASM_PARSER(ARM) LLVM_ASM_PARSER(X86)=20 + +#undef LLVM_ASM_PARSER Property changes on: usr.bin/clang/include/llvm/Config/AsmParsers.def ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/include/llvm/Config/Disassemblers.def =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/include/llvm/Config/Disassemblers.def (.../head) (revisio= n 0) +++ usr.bin/clang/include/llvm/Config/Disassemblers.def (.../projects/clang= bsd-import) (revision 208076) @@ -0,0 +1,29 @@ +//=3D=3D=3D- llvm/Config/Disassemblers.def - LLVM Assembly Parsers ----*- = C++ -*-=3D=3D=3D// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//=3D=3D=3D---------------------------------------------------------------= -------=3D=3D=3D// +// +// This file enumerates all of the assembly-language parsers +// supported by this build of LLVM. Clients of this file should define +// the LLVM_ASM_PARSER macro to be a function-like macro with a +// single parameter (the name of the target whose assembly can be +// generated); including this file will then enumerate all of the +// targets with assembly parsers. +// +// The set of targets supported by LLVM is generated at configuration +// time, at which point this header is generated. Do not modify this +// header directly. +// +//=3D=3D=3D---------------------------------------------------------------= -------=3D=3D=3D// + +#ifndef LLVM_DISASSEMBLER +# error Please define the macro LLVM_DISASSEMBLER(TargetName) +#endif + +LLVM_DISASSEMBLER(X86)=20 + +#undef LLVM_DISASSEMBLER Property changes on: usr.bin/clang/include/llvm/Config/Disassemblers.def ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/include/llvm/ADT/iterator.h =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/include/llvm/ADT/iterator.h (.../head) (revision 0) +++ usr.bin/clang/include/llvm/ADT/iterator.h (.../projects/clangbsd-import= ) (revision 208076) @@ -0,0 +1,78 @@ +/* include/llvm/ADT/iterator.h. Generated from iterator.h.in by configure= =2E */ +//=3D=3D-- llvm/ADT/iterator.h - Portable wrapper around --*- C= ++ -*-=3D=3D// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//=3D=3D=3D---------------------------------------------------------------= -------=3D=3D=3D// +// +// This file provides a wrapper around the mysterious header fi= le. +// In GCC 2.95.3, the file defines a bidirectional_iterator class (and oth= er +// friends), instead of the standard iterator class. In GCC 3.1, the +// bidirectional_iterator class got moved out and the new, standards compl= iant, +// iterator<> class was added. Because there is nothing that we can do to= get +// correct behavior on both compilers, we have this header with #ifdef's. = Gross +// huh? +// +// By #includ'ing this file, you get the contents of plus the +// following classes in the global namespace: +// +// 1. bidirectional_iterator +// 2. forward_iterator +// +// The #if directives' expressions are filled in by Autoconf. +// +// $FreeBSD$ +//=3D=3D=3D---------------------------------------------------------------= -------=3D=3D=3D// + +#ifndef LLVM_ADT_ITERATOR_H +#define LLVM_ADT_ITERATOR_H + +#include + +#define HAVE_BI_ITERATOR 0 +#define HAVE_STD_ITERATOR 1 +#define HAVE_FWD_ITERATOR 0 + +#ifdef _MSC_VER +# define HAVE_BI_ITERATOR 0 +# define HAVE_STD_ITERATOR 1 +# define HAVE_FWD_ITERATOR 0 +#endif + +#if !HAVE_BI_ITERATOR +# if HAVE_STD_ITERATOR +/// If the bidirectional iterator is not defined, we attempt to define it = in +/// terms of the C++ standard iterator. Otherwise, we import it with a "us= ing" +/// statement. +/// +template +struct bidirectional_iterator + : public std::iterator { +}; +# else +# error "Need to have standard iterator to define bidirectional iterator!" +# endif +#else +using std::bidirectional_iterator; +#endif + +#if !HAVE_FWD_ITERATOR +# if HAVE_STD_ITERATOR +/// If the forward iterator is not defined, attempt to define it in terms = of +/// the C++ standard iterator. Otherwise, we import it with a "using" stat= ement. +/// +template +struct forward_iterator + : public std::iterator { +}; +# else +# error "Need to have standard iterator to define forward iterator!" +# endif +#else +using std::forward_iterator; +#endif + +#endif // LLVM_ADT_ITERATOR_H Property changes on: usr.bin/clang/include/llvm/ADT/iterator.h ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/include/llvm/Intrinsics.gen =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/include/llvm/Intrinsics.gen (.../head) (revision 0) +++ usr.bin/clang/include/llvm/Intrinsics.gen (.../projects/clangbsd-import= ) (revision 208076) @@ -0,0 +1,2 @@ +/* $FreeBSD$ */ +#include "Intrinsics.inc.h" Property changes on: usr.bin/clang/include/llvm/Intrinsics.gen ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/include/ARMGenInstrInfo.inc =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/include/ARMGenInstrInfo.inc (.../head) (revision 0) +++ usr.bin/clang/include/ARMGenInstrInfo.inc (.../projects/clangbsd-import= ) (revision 208076) @@ -0,0 +1,2 @@ +/* $FreeBSD$ */ +#include "ARMGenInstrInfo.inc.h" Property changes on: usr.bin/clang/include/ARMGenInstrInfo.inc ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/include/PPCGenRegisterNames.inc =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/include/PPCGenRegisterNames.inc (.../head) (revision 0) +++ usr.bin/clang/include/PPCGenRegisterNames.inc (.../projects/clangbsd-im= port) (revision 208076) @@ -0,0 +1,2 @@ +/* $FreeBSD$ */ +#include "PPCGenRegisterNames.inc.h" Property changes on: usr.bin/clang/include/PPCGenRegisterNames.inc ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/include/MipsGenInstrNames.inc =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/include/MipsGenInstrNames.inc (.../head) (revision 0) +++ usr.bin/clang/include/MipsGenInstrNames.inc (.../projects/clangbsd-impo= rt) (revision 208076) @@ -0,0 +1,2 @@ +/* $FreeBSD$ */ +#include "MipsGenInstrNames.inc.h" Property changes on: usr.bin/clang/include/MipsGenInstrNames.inc ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/lib/libllvmmipscodegen/Makefile =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/lib/libllvmmipscodegen/Makefile (.../head) (revision 0) +++ usr.bin/clang/lib/libllvmmipscodegen/Makefile (.../projects/clangbsd-im= port) (revision 208076) @@ -0,0 +1,15 @@ +# $FreeBSD$ + +LIB=3D llvmmipscodegen + +SRCDIR=3D lib/Target/Mips +SRCS=3D MipsDelaySlotFiller.cpp MipsISelDAGToDAG.cpp \ + MipsISelLowering.cpp MipsInstrInfo.cpp MipsMCAsmInfo.cpp \ + MipsRegisterInfo.cpp MipsSelectionDAGInfo.cpp MipsSubtarget.cpp \ + MipsTargetMachine.cpp MipsTargetObjectFile.cpp + +TGHDRS=3D Intrinsics MipsGenAsmWriter MipsGenCallingConv MipsGenDAGISel \ + MipsGenInstrInfo MipsGenInstrNames MipsGenRegisterInfo.h \ + MipsGenRegisterInfo MipsGenRegisterNames MipsGenSubtarget + +.include "../../clang.lib.mk" Property changes on: usr.bin/clang/lib/libllvmmipscodegen/Makefile ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/lib/libllvmmc/Makefile =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/lib/libllvmmc/Makefile (.../head) (revision 0) +++ usr.bin/clang/lib/libllvmmc/Makefile (.../projects/clangbsd-import) (re= vision 208076) @@ -0,0 +1,14 @@ +# $FreeBSD$ + +LIB=3D llvmmc + +SRCDIR=3D lib/MC +SRCS=3D MCAsmInfo.cpp MCAsmInfoCOFF.cpp MCAsmInfoDarwin.cpp \ + MCAsmStreamer.cpp MCAssembler.cpp MCCodeEmitter.cpp \ + MCContext.cpp MCDisassembler.cpp MCExpr.cpp MCInst.cpp \ + MCInstPrinter.cpp MCMachOStreamer.cpp MCNullStreamer.cpp \ + MCObjectWriter.cpp MCSection.cpp MCSectionELF.cpp \ + MCSectionMachO.cpp MCStreamer.cpp MCSymbol.cpp MCValue.cpp \ + MachObjectWriter.cpp TargetAsmBackend.cpp + +.include "../../clang.lib.mk" Property changes on: usr.bin/clang/lib/libllvmmc/Makefile ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/lib/libllvmselectiondag/Makefile =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/lib/libllvmselectiondag/Makefile (.../head) (revision 0) +++ usr.bin/clang/lib/libllvmselectiondag/Makefile (.../projects/clangbsd-i= mport) (revision 208076) @@ -0,0 +1,17 @@ +# $FreeBSD$ + +LIB=3D llvmselectiondag + +SRCDIR=3D lib/CodeGen/SelectionDAG +SRCS=3D CallingConvLower.cpp DAGCombiner.cpp FastISel.cpp \ + FunctionLoweringInfo.cpp InstrEmitter.cpp LegalizeDAG.cpp \ + LegalizeFloatTypes.cpp LegalizeIntegerTypes.cpp LegalizeTypes.cpp \ + LegalizeTypesGeneric.cpp LegalizeVectorOps.cpp LegalizeVectorTypes.cpp \ + ScheduleDAGFast.cpp ScheduleDAGList.cpp ScheduleDAGRRList.cpp \ + ScheduleDAGSDNodes.cpp SelectionDAG.cpp SelectionDAGBuilder.cpp \ + SelectionDAGISel.cpp SelectionDAGPrinter.cpp TargetLowering.cpp \ + TargetSelectionDAGInfo.cpp + +TGHDRS=3D Intrinsics + +.include "../../clang.lib.mk" Property changes on: usr.bin/clang/lib/libllvmselectiondag/Makefile ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/lib/libllvmx86info/Makefile =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/lib/libllvmx86info/Makefile (.../head) (revision 0) +++ usr.bin/clang/lib/libllvmx86info/Makefile (.../projects/clangbsd-import= ) (revision 208076) @@ -0,0 +1,11 @@ +# $FreeBSD$ + +LIB=3D llvmx86info + +SRCDIR=3D lib/Target/X86/TargetInfo/ +INCDIR=3D lib/Target/X86 +SRCS=3D X86TargetInfo.cpp + +TGHDRS=3D X86GenRegisterNames X86GenInstrNames + +.include "../../clang.lib.mk" Property changes on: usr.bin/clang/lib/libllvmx86info/Makefile ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/lib/libllvmx86asmparser/Makefile =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/lib/libllvmx86asmparser/Makefile (.../head) (revision 0) +++ usr.bin/clang/lib/libllvmx86asmparser/Makefile (.../projects/clangbsd-i= mport) (revision 208076) @@ -0,0 +1,11 @@ +# $FreeBSD$ + +LIB=3D llvmx86asmparser + +SRCDIR=3D lib/Target/X86/AsmParser +INCDIR=3D lib/Target/X86 +SRCS=3D X86AsmParser.cpp X86AsmLexer.cpp + +TGHDRS=3D X86GenRegisterNames X86GenInstrNames X86GenAsmMatcher + +.include "../../clang.lib.mk" Property changes on: usr.bin/clang/lib/libllvmx86asmparser/Makefile ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/lib/libllvmpowerpccodegen/Makefile =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/lib/libllvmpowerpccodegen/Makefile (.../head) (revision 0) +++ usr.bin/clang/lib/libllvmpowerpccodegen/Makefile (.../projects/clangbsd= -import) (revision 208076) @@ -0,0 +1,16 @@ +# $FreeBSD$ + +LIB=3D llvmpowerpccodegen + +SRCDIR=3D lib/Target/PowerPC +SRCS=3D PPCBranchSelector.cpp PPCCodeEmitter.cpp \ + PPCHazardRecognizers.cpp PPCISelDAGToDAG.cpp \ + PPCISelLowering.cpp PPCInstrInfo.cpp PPCJITInfo.cpp \ + PPCMCAsmInfo.cpp PPCPredicates.cpp PPCRegisterInfo.cpp \ + PPCSelectionDAGInfo.cpp PPCSubtarget.cpp PPCTargetMachine.cpp + +TGHDRS=3D Intrinsics PPCGenCallingConv PPCGenCodeEmitter PPCGenDAGISel \ + PPCGenInstrInfo PPCGenInstrNames PPCGenRegisterInfo.h \ + PPCGenRegisterInfo PPCGenRegisterNames PPCGenSubtarget + +.include "../../clang.lib.mk" Property changes on: usr.bin/clang/lib/libllvmpowerpccodegen/Makefile ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/lib/libllvmcodegen/Makefile =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/lib/libllvmcodegen/Makefile (.../head) (revision 0) +++ usr.bin/clang/lib/libllvmcodegen/Makefile (.../projects/clangbsd-import= ) (revision 208076) @@ -0,0 +1,40 @@ +# $FreeBSD$ + +LIB=3D llvmcodegen + +SRCDIR=3D lib/CodeGen +SRCS=3D AggressiveAntiDepBreaker.cpp Analysis.cpp BranchFolding.cpp \ + CalcSpillWeights.cpp CodePlacementOpt.cpp \ + CriticalAntiDepBreaker.cpp DeadMachineInstructionElim.cpp \ + DwarfEHPrepare.cpp ELFCodeEmitter.cpp ELFWriter.cpp \ + ExactHazardRecognizer.cpp GCMetadata.cpp GCMetadataPrinter.cpp \ + GCStrategy.cpp IfConversion.cpp IntrinsicLowering.cpp \ + LLVMTargetMachine.cpp LatencyPriorityQueue.cpp \ + LiveInterval.cpp LiveIntervalAnalysis.cpp \ + LiveStackAnalysis.cpp LiveVariables.cpp LowerSubregs.cpp \ + MachineBasicBlock.cpp MachineCSE.cpp MachineDominators.cpp \ + MachineFunction.cpp MachineFunctionAnalysis.cpp \ + MachineFunctionPass.cpp MachineFunctionPrinterPass.cpp \ + MachineInstr.cpp MachineLICM.cpp MachineLoopInfo.cpp \ + MachineModuleInfo.cpp MachineModuleInfoImpls.cpp \ + MachinePassRegistry.cpp MachineRegisterInfo.cpp \ + MachineSSAUpdater.cpp MachineSink.cpp MachineVerifier.cpp \ + ObjectCodeEmitter.cpp OcamlGC.cpp OptimizeExts.cpp \ + OptimizePHIs.cpp PHIElimination.cpp Passes.cpp \ + PostRASchedulerList.cpp PreAllocSplitting.cpp \ + ProcessImplicitDefs.cpp PrologEpilogInserter.cpp \ + PseudoSourceValue.cpp RegAllocFast.cpp RegAllocLinearScan.cpp \ + RegAllocLocal.cpp RegAllocPBQP.cpp RegisterCoalescer.cpp \ + RegisterScavenging.cpp ScheduleDAG.cpp ScheduleDAGEmit.cpp \ + ScheduleDAGInstrs.cpp ScheduleDAGPrinter.cpp ShadowStackGC.cpp \ + ShrinkWrapping.cpp SimpleRegisterCoalescing.cpp \ + SjLjEHPrepare.cpp SlotIndexes.cpp Spiller.cpp \ + StackProtector.cpp StackSlotColoring.cpp \ + StrongPHIElimination.cpp TailDuplication.cpp \ + TargetInstrInfoImpl.cpp TargetLoweringObjectFileImpl.cpp \ + TwoAddressInstructionPass.cpp UnreachableBlockElim.cpp \ + VirtRegMap.cpp VirtRegRewriter.cpp + +TGHDRS=3D Intrinsics + +.include "../../clang.lib.mk" Property changes on: usr.bin/clang/lib/libllvmcodegen/Makefile ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/lib/libllvmarmcodegen/Makefile =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/lib/libllvmarmcodegen/Makefile (.../head) (revision 0) +++ usr.bin/clang/lib/libllvmarmcodegen/Makefile (.../projects/clangbsd-imp= ort) (revision 208076) @@ -0,0 +1,23 @@ +# $FreeBSD$ + +LIB=3D llvmarmcodegen + +SRCDIR=3D lib/Target/ARM +SRCS=3D ARMBaseInstrInfo.cpp ARMBaseRegisterInfo.cpp \ + ARMCodeEmitter.cpp ARMConstantIslandPass.cpp \ + ARMConstantPoolValue.cpp ARMExpandPseudoInsts.cpp \ + ARMISelDAGToDAG.cpp ARMISelLowering.cpp ARMInstrInfo.cpp \ + ARMJITInfo.cpp ARMLoadStoreOptimizer.cpp \ + ARMLoadStoreOptimizer.cpp ARMMCAsmInfo.cpp ARMRegisterInfo.cpp \ + ARMSelectionDAGInfo.cpp ARMSubtarget.cpp ARMTargetMachine.cpp \ + ARMTargetObjectFile.cpp NEONMoveFix.cpp NEONPreAllocPass.cpp \ + Thumb1InstrInfo.cpp Thumb1RegisterInfo.cpp \ + Thumb2ITBlockPass.cpp Thumb2InstrInfo.cpp \ + Thumb2RegisterInfo.cpp Thumb2SizeReduction.cpp + +TGHDRS=3D ARMGenCallingConv ARMGenCodeEmitter ARMGenDAGISel \ + ARMGenInstrInfo ARMGenInstrNames ARMGenRegisterInfo.h \ + ARMGenRegisterInfo ARMGenRegisterNames ARMGenSubtarget \ + Intrinsics + +.include "../../clang.lib.mk" Property changes on: usr.bin/clang/lib/libllvmarmcodegen/Makefile ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/lib/libclangdriver/Makefile =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/lib/libclangdriver/Makefile (.../head) (revision 0) +++ usr.bin/clang/lib/libclangdriver/Makefile (.../projects/clangbsd-import= ) (revision 208076) @@ -0,0 +1,13 @@ +# $FreeBSD$ + +LIB=3D clangdriver + +SRCDIR=3D tools/clang/lib/Driver +SRCS=3D Action.cpp Arg.cpp ArgList.cpp CC1Options.cpp Compilation.cpp \ + Driver.cpp DriverOptions.cpp HostInfo.cpp Job.cpp OptTable.cpp \ + Option.cpp Phases.cpp Tool.cpp ToolChain.cpp ToolChains.cpp \ + Tools.cpp Types.cpp + +TGHDRS=3D DiagnosticCommonKinds DiagnosticDriverKinds Options CC1Options + +.include "../../clang.lib.mk" Property changes on: usr.bin/clang/lib/libclangdriver/Makefile ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/lib/libllvmipa/Makefile =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/lib/libllvmipa/Makefile (.../head) (revision 0) +++ usr.bin/clang/lib/libllvmipa/Makefile (.../projects/clangbsd-import) (r= evision 208076) @@ -0,0 +1,11 @@ +# $FreeBSD$ + +LIB=3D llvmipa + +SRCDIR=3D lib/Analysis/IPA +SRCS=3D CallGraph.cpp CallGraphSCCPass.cpp FindUsedTypes.cpp \ + GlobalsModRef.cpp + +TGHDRS=3D Intrinsics + +.include "../../clang.lib.mk" Property changes on: usr.bin/clang/lib/libllvmipa/Makefile ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/lib/libllvminstcombine/Makefile =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/lib/libllvminstcombine/Makefile (.../head) (revision 0) +++ usr.bin/clang/lib/libllvminstcombine/Makefile (.../projects/clangbsd-im= port) (revision 208076) @@ -0,0 +1,16 @@ +# $FreeBSD$ + +LIB=3D llvminstcombine + +SRCDIR=3D lib/Transforms/InstCombine +SRCS=3D InstCombineAddSub.cpp InstCombineAndOrXor.cpp \ + InstCombineCalls.cpp InstCombineCasts.cpp \ + InstCombineCompares.cpp InstCombineLoadStoreAlloca.cpp \ + InstCombineMulDivRem.cpp InstCombinePHI.cpp \ + InstCombineSelect.cpp InstCombineShifts.cpp \ + InstCombineSimplifyDemanded.cpp InstCombineVectorOps.cpp \ + InstructionCombining.cpp + +TGHDRS=3D Intrinsics + +.include "../../clang.lib.mk" Property changes on: usr.bin/clang/lib/libllvminstcombine/Makefile ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/lib/libllvmscalaropts/Makefile =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/lib/libllvmscalaropts/Makefile (.../head) (revision 0) +++ usr.bin/clang/lib/libllvmscalaropts/Makefile (.../projects/clangbsd-imp= ort) (revision 208076) @@ -0,0 +1,18 @@ +# $FreeBSD$ + +LIB=3D llvmscalaropts + +SRCDIR=3D lib/Transforms/Scalar +SRCS=3D ADCE.cpp BasicBlockPlacement.cpp CodeGenPrepare.cpp \ + ConstantProp.cpp DCE.cpp DeadStoreElimination.cpp \ + GEPSplitter.cpp GVN.cpp IndVarSimplify.cpp JumpThreading.cpp \ + LICM.cpp LoopDeletion.cpp LoopIndexSplit.cpp LoopRotation.cpp \ + LoopStrengthReduce.cpp LoopUnrollPass.cpp LoopUnswitch.cpp \ + MemCpyOptimizer.cpp Reassociate.cpp Reg2Mem.cpp SCCP.cpp \ + Scalar.cpp ScalarReplAggregates.cpp SimplifyCFGPass.cpp \ + SimplifyHalfPowrLibCalls.cpp SimplifyLibCalls.cpp \ + TailDuplication.cpp TailRecursionElimination.cpp + +TGHDRS=3D Intrinsics + +.include "../../clang.lib.mk" Property changes on: usr.bin/clang/lib/libllvmscalaropts/Makefile ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/lib/libllvmsupport/Makefile =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/lib/libllvmsupport/Makefile (.../head) (revision 0) +++ usr.bin/clang/lib/libllvmsupport/Makefile (.../projects/clangbsd-import= ) (revision 208076) @@ -0,0 +1,19 @@ +# $FreeBSD$ + +LIB=3D llvmsupport + +SRCDIR=3D lib/Support +SRCS=3D APFloat.cpp APInt.cpp APSInt.cpp Allocator.cpp CommandLine.cpp \ + ConstantRange.cpp Debug.cpp DeltaAlgorithm.cpp Dwarf.cpp \ + ErrorHandling.cpp FileUtilities.cpp FoldingSet.cpp \ + FormattedStream.cpp GraphWriter.cpp IsInf.cpp IsNAN.cpp \ + ManagedStatic.cpp MemoryBuffer.cpp MemoryObject.cpp \ + PluginLoader.cpp PrettyStackTrace.cpp Regex.cpp \ + SlowOperationInformer.cpp SmallPtrSet.cpp SmallVector.cpp \ + SourceMgr.cpp Statistic.cpp StringExtras.cpp StringMap.cpp \ + StringPool.cpp StringRef.cpp SystemUtils.cpp \ + TargetRegistry.cpp Timer.cpp Triple.cpp Twine.cpp \ + circular_raw_ostream.cpp raw_os_ostream.cpp raw_ostream.cpp \ + regcomp.c regerror.c regexec.c regfree.c regstrlcpy.c + +.include "../../clang.lib.mk" Property changes on: usr.bin/clang/lib/libllvmsupport/Makefile ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/lib/libllvmmipsasmprinter/Makefile =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/lib/libllvmmipsasmprinter/Makefile (.../head) (revision 0) +++ usr.bin/clang/lib/libllvmmipsasmprinter/Makefile (.../projects/clangbsd= -import) (revision 208076) @@ -0,0 +1,12 @@ +# $FreeBSD$ + +LIB=3D llvmmipsasmprinter + +SRCDIR=3D lib/Target/Mips/AsmPrinter +INCDIR=3D lib/Target/Mips +SRCS=3D MipsAsmPrinter.cpp + +TGHDRS=3D MipsGenAsmWriter MipsGenInstrNames MipsGenRegisterInfo.h \ + MipsGenRegisterNames + +.include "../../clang.lib.mk" Property changes on: usr.bin/clang/lib/libllvmmipsasmprinter/Makefile ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/lib/libclangchecker/Makefile =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/lib/libclangchecker/Makefile (.../head) (revision 0) +++ usr.bin/clang/lib/libclangchecker/Makefile (.../projects/clangbsd-impor= t) (revision 208076) @@ -0,0 +1,38 @@ +# $FreeBSD$ + +LIB=3D clangchecker + +SRCDIR=3D tools/clang/lib/Checker +SRCS=3D AdjustedReturnValueChecker.cpp AggExprVisitor.cpp \ + ArrayBoundChecker.cpp AttrNonNullChecker.cpp \ + BasicConstraintManager.cpp BasicObjCFoundationChecks.cpp \ + BasicStore.cpp BasicValueFactory.cpp BugReporter.cpp \ + BugReporterVisitors.cpp BuiltinFunctionChecker.cpp \ + CFRefCount.cpp CallAndMessageChecker.cpp CallInliner.cpp \ + CastToStructChecker.cpp CheckDeadStores.cpp \ + CheckObjCDealloc.cpp CheckObjCInstMethSignature.cpp \ + CheckSecuritySyntaxOnly.cpp CheckSizeofPointer.cpp Checker.cpp \ + CocoaConventions.cpp DereferenceChecker.cpp DivZeroChecker.cpp \ + Environment.cpp ExplodedGraph.cpp FixedAddressChecker.cpp \ + FlatStore.cpp GRBlockCounter.cpp GRCXXExprEngine.cpp \ + GRCoreEngine.cpp GRExprEngine.cpp \ + GRExprEngineExperimentalChecks.cpp GRState.cpp \ + LLVMConventionsChecker.cpp MacOSXAPIChecker.cpp \ + MallocChecker.cpp ManagerRegistry.cpp MemRegion.cpp \ + NSAutoreleasePoolChecker.cpp NSErrorChecker.cpp \ + NoReturnFunctionChecker.cpp OSAtomicChecker.cpp \ + ObjCUnusedIVarsChecker.cpp PathDiagnostic.cpp \ + PointerArithChecker.cpp PointerSubChecker.cpp \ + PthreadLockChecker.cpp RangeConstraintManager.cpp \ + RegionStore.cpp ReturnPointerRangeChecker.cpp \ + ReturnStackAddressChecker.cpp ReturnUndefChecker.cpp SVals.cpp \ + SValuator.cpp SimpleConstraintManager.cpp SimpleSValuator.cpp \ + Store.cpp SymbolManager.cpp UndefBranchChecker.cpp \ + UndefCapturedBlockVarChecker.cpp UndefResultChecker.cpp \ + UndefinedArraySubscriptChecker.cpp \ + UndefinedAssignmentChecker.cpp UnixAPIChecker.cpp \ + VLASizeChecker.cpp ValueManager.cpp + +TGHDRS=3D DiagnosticAnalysisKinds DiagnosticCommonKinds + +.include "../../clang.lib.mk" Property changes on: usr.bin/clang/lib/libclangchecker/Makefile ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/lib/libllvmsystem/Makefile =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/lib/libllvmsystem/Makefile (.../head) (revision 0) +++ usr.bin/clang/lib/libllvmsystem/Makefile (.../projects/clangbsd-import)= (revision 208076) @@ -0,0 +1,12 @@ +# $FreeBSD$ + +LIB=3D llvmsystem + +SRCDIR=3D lib/System +SRCS=3D Alarm.cpp Atomic.cpp Disassembler.cpp DynamicLibrary.cpp \ + Errno.cpp Host.cpp IncludeFile.cpp Memory.cpp Mutex.cpp \ + Path.cpp Process.cpp Program.cpp RWMutex.cpp \ + SearchForAddressOfSpecialSymbol.cpp Signals.cpp \ + ThreadLocal.cpp Threading.cpp TimeValue.cpp Valgrind.cpp + +.include "../../clang.lib.mk" Property changes on: usr.bin/clang/lib/libllvmsystem/Makefile ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/lib/libclangparse/Makefile =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/lib/libclangparse/Makefile (.../head) (revision 0) +++ usr.bin/clang/lib/libclangparse/Makefile (.../projects/clangbsd-import)= (revision 208076) @@ -0,0 +1,14 @@ +# $FreeBSD$ + +LIB=3D clangparse + +SRCDIR=3D tools/clang/lib/Parse +SRCS=3D AttributeList.cpp DeclSpec.cpp MinimalAction.cpp \ + ParseCXXInlineMethods.cpp ParseDecl.cpp ParseDeclCXX.cpp \ + ParseExpr.cpp ParseExprCXX.cpp ParseInit.cpp ParseObjc.cpp \ + ParsePragma.cpp ParseStmt.cpp ParseTemplate.cpp \ + ParseTentative.cpp Parser.cpp + +TGHDRS=3D DiagnosticCommonKinds DiagnosticParseKinds + +.include "../../clang.lib.mk" Property changes on: usr.bin/clang/lib/libclangparse/Makefile ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/lib/libllvmipo/Makefile =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/lib/libllvmipo/Makefile (.../head) (revision 0) +++ usr.bin/clang/lib/libllvmipo/Makefile (.../projects/clangbsd-import) (r= evision 208076) @@ -0,0 +1,17 @@ +# $FreeBSD$ + +LIB=3D llvmipo + +SRCDIR=3D lib/Transforms/IPO +SRCS=3D ArgumentPromotion.cpp ConstantMerge.cpp \ + DeadArgumentElimination.cpp DeadTypeElimination.cpp \ + ExtractGV.cpp FunctionAttrs.cpp GlobalDCE.cpp GlobalOpt.cpp \ + IPConstantPropagation.cpp IPO.cpp InlineAlways.cpp \ + InlineSimple.cpp Inliner.cpp Internalize.cpp LoopExtractor.cpp \ + LowerSetJmp.cpp MergeFunctions.cpp PartialSpecialization.cpp \ + PruneEH.cpp StripDeadPrototypes.cpp StripSymbols.cpp \ + StructRetPromotion.cpp + +TGHDRS=3D Intrinsics + +.include "../../clang.lib.mk" Property changes on: usr.bin/clang/lib/libllvmipo/Makefile ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/lib/libllvmcore/Makefile =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/lib/libllvmcore/Makefile (.../head) (revision 0) +++ usr.bin/clang/lib/libllvmcore/Makefile (.../projects/clangbsd-import) (= revision 208076) @@ -0,0 +1,18 @@ +# $FreeBSD$ + +LIB=3D llvmcore + +SRCDIR=3D lib/VMCore +SRCS=3D AsmWriter.cpp Attributes.cpp AutoUpgrade.cpp BasicBlock.cpp \ + ConstantFold.cpp Constants.cpp Core.cpp DebugLoc.cpp \ + Dominators.cpp Function.cpp GVMaterializer.cpp Globals.cpp \ + IRBuilder.cpp InlineAsm.cpp Instruction.cpp Instructions.cpp \ + IntrinsicInst.cpp LLVMContext.cpp LLVMContextImpl.cpp \ + LeakDetector.cpp Metadata.cpp Module.cpp Pass.cpp \ + PassManager.cpp PrintModulePass.cpp Type.cpp \ + TypeSymbolTable.cpp Use.cpp Value.cpp ValueSymbolTable.cpp \ + ValueTypes.cpp Verifier.cpp + +TGHDRS=3D Intrinsics + +.include "../../clang.lib.mk" Property changes on: usr.bin/clang/lib/libllvmcore/Makefile ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/lib/libllvmx86asmprinter/Makefile =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/lib/libllvmx86asmprinter/Makefile (.../head) (revision 0) +++ usr.bin/clang/lib/libllvmx86asmprinter/Makefile (.../projects/clangbsd-= import) (revision 208076) @@ -0,0 +1,13 @@ +# $FreeBSD$ + +LIB=3D llvmx86asmprinter + +SRCDIR=3D lib/Target/X86/AsmPrinter +INCDIR=3D lib/Target/X86 +SRCS=3D X86ATTInstPrinter.cpp X86AsmPrinter.cpp \ + X86IntelInstPrinter.cpp X86MCInstLower.cpp + +TGHDRS=3D X86GenAsmWriter1 X86GenAsmWriter X86GenInstrInfo \ + X86GenInstrNames X86GenRegisterInfo.h X86GenRegisterNames + +.include "../../clang.lib.mk" Property changes on: usr.bin/clang/lib/libllvmx86asmprinter/Makefile ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/lib/libllvmpowerpcinfo/Makefile =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/lib/libllvmpowerpcinfo/Makefile (.../head) (revision 0) +++ usr.bin/clang/lib/libllvmpowerpcinfo/Makefile (.../projects/clangbsd-im= port) (revision 208076) @@ -0,0 +1,11 @@ +# $FreeBSD$ + +LIB=3D llvmpowerpcinfo + +SRCDIR=3D lib/Target/PowerPC/TargetInfo/ +INCDIR=3D lib/Target/PowerPC +SRCS=3D PowerPCTargetInfo.cpp + +TGHDRS=3D PPCGenRegisterNames PPCGenInstrNames + +.include "../../clang.lib.mk" Property changes on: usr.bin/clang/lib/libllvmpowerpcinfo/Makefile ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/lib/libclangrewrite/Makefile =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/lib/libclangrewrite/Makefile (.../head) (revision 0) +++ usr.bin/clang/lib/libclangrewrite/Makefile (.../projects/clangbsd-impor= t) (revision 208076) @@ -0,0 +1,11 @@ +# $FreeBSD$ + +LIB=3D clangrewrite + +SRCDIR=3D tools/clang/lib/Rewrite +SRCS=3D DeltaTree.cpp HTMLRewrite.cpp RewriteRope.cpp Rewriter.cpp \ + TokenRewriter.cpp + +TGHDRS=3D DiagnosticCommonKinds + +.include "../../clang.lib.mk" Property changes on: usr.bin/clang/lib/libclangrewrite/Makefile ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/lib/Makefile =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/lib/Makefile (.../head) (revision 0) +++ usr.bin/clang/lib/Makefile (.../projects/clangbsd-import) (revision 208= 076) @@ -0,0 +1,48 @@ +# $FreeBSD$ + +SUBDIR=3D libclanganalysis \ + libclangast \ + libclangbasic \ + libclangchecker \ + libclangcodegen \ + libclangdriver \ + libclangfrontend \ + libclanglex \ + libclangparse \ + libclangrewrite \ + libclangsema \ + \ + libllvmanalysis \ + libllvmasmprinter \ + libllvmbitreader \ + libllvmbitwriter \ + libllvmcodegen \ + libllvminstcombine \ + libllvmcore \ + libllvmipa \ + libllvmipo \ + libllvmmc \ + libllvmmcparser \ + libllvmscalaropts \ + libllvmselectiondag \ + libllvmsupport \ + libllvmsystem \ + libllvmtarget \ + libllvmtransformutils \ + \ + libllvmarmasmparser \ + libllvmarmasmprinter \ + libllvmarmcodegen \ + libllvmarminfo \ + libllvmmipsasmprinter \ + libllvmmipscodegen \ + libllvmmipsinfo \ + libllvmpowerpcasmprinter \ + libllvmpowerpccodegen \ + libllvmpowerpcinfo \ + libllvmx86asmparser \ + libllvmx86asmprinter \ + libllvmx86codegen \ + libllvmx86info + +.include Property changes on: usr.bin/clang/lib/Makefile ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/lib/libllvmarminfo/Makefile =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/lib/libllvmarminfo/Makefile (.../head) (revision 0) +++ usr.bin/clang/lib/libllvmarminfo/Makefile (.../projects/clangbsd-import= ) (revision 208076) @@ -0,0 +1,11 @@ +# $FreeBSD$ + +LIB=3D llvmarminfo + +SRCDIR=3D lib/Target/ARM/TargetInfo/ +INCDIR=3D lib/Target/ARM +SRCS=3D ARMTargetInfo.cpp + +TGHDRS=3D ARMGenRegisterNames ARMGenInstrNames + +.include "../../clang.lib.mk" Property changes on: usr.bin/clang/lib/libllvmarminfo/Makefile ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/lib/libllvmtransformutils/Makefile =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/lib/libllvmtransformutils/Makefile (.../head) (revision 0) +++ usr.bin/clang/lib/libllvmtransformutils/Makefile (.../projects/clangbsd= -import) (revision 208076) @@ -0,0 +1,17 @@ +# $FreeBSD$ + +LIB=3D llvmtransformutils + +SRCDIR=3D lib/Transforms/Utils +SRCS=3D AddrModeMatcher.cpp BasicBlockUtils.cpp BasicInliner.cpp \ + BreakCriticalEdges.cpp BuildLibCalls.cpp CloneFunction.cpp \ + CloneLoop.cpp CloneModule.cpp CodeExtractor.cpp \ + DemoteRegToStack.cpp InlineFunction.cpp InstructionNamer.cpp \ + LCSSA.cpp Local.cpp LoopSimplify.cpp LoopUnroll.cpp \ + LowerInvoke.cpp LowerSwitch.cpp Mem2Reg.cpp \ + PromoteMemoryToRegister.cpp SSAUpdater.cpp SSI.cpp \ + SimplifyCFG.cpp UnifyFunctionExitNodes.cpp ValueMapper.cpp + +TGHDRS=3D Intrinsics + +.include "../../clang.lib.mk" Property changes on: usr.bin/clang/lib/libllvmtransformutils/Makefile ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/lib/libllvmarmasmparser/Makefile =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/lib/libllvmarmasmparser/Makefile (.../head) (revision 0) +++ usr.bin/clang/lib/libllvmarmasmparser/Makefile (.../projects/clangbsd-i= mport) (revision 208076) @@ -0,0 +1,11 @@ +# $FreeBSD$ + +LIB=3D llvmarmasmparser + +SRCDIR=3D lib/Target/ARM/AsmParser +INCDIR=3D lib/Target/ARM +SRCS=3D ARMAsmParser.cpp ARMAsmLexer.cpp + +TGHDRS=3D ARMGenRegisterInfo.h ARMGenRegisterNames ARMGenInstrNames + +.include "../../clang.lib.mk" Property changes on: usr.bin/clang/lib/libllvmarmasmparser/Makefile ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/lib/libclanganalysis/Makefile =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/lib/libclanganalysis/Makefile (.../head) (revision 0) +++ usr.bin/clang/lib/libclanganalysis/Makefile (.../projects/clangbsd-impo= rt) (revision 208076) @@ -0,0 +1,12 @@ +# $FreeBSD$ + +LIB=3D clanganalysis + +SRCDIR=3D tools/clang/lib/Analysis +SRCS=3D AnalysisContext.cpp CFG.cpp LiveVariables.cpp \ + PrintfFormatString.cpp ReachableCode.cpp \ + UninitializedValues.cpp + +TGHDRS=3D DiagnosticAnalysisKinds DiagnosticCommonKinds + +.include "../../clang.lib.mk" Property changes on: usr.bin/clang/lib/libclanganalysis/Makefile ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/lib/libclangsema/Makefile =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/lib/libclangsema/Makefile (.../head) (revision 0) +++ usr.bin/clang/lib/libclangsema/Makefile (.../projects/clangbsd-import) = (revision 208076) @@ -0,0 +1,22 @@ +# $FreeBSD$ + +LIB=3D clangsema + +SRCDIR=3D tools/clang/lib/Sema +SRCS=3D AnalysisBasedWarnings.cpp CodeCompleteConsumer.cpp \ + IdentifierResolver.cpp IdentifierResolver.cpp \ + JumpDiagnostics.cpp ParseAST.cpp Sema.cpp SemaAccess.cpp \ + SemaAttr.cpp SemaCXXCast.cpp SemaCXXScopeSpec.cpp \ + SemaChecking.cpp SemaCodeComplete.cpp SemaDecl.cpp \ + SemaDeclAttr.cpp SemaDeclCXX.cpp SemaDeclObjC.cpp \ + SemaExceptionSpec.cpp SemaExpr.cpp SemaExprCXX.cpp \ + SemaExprObjC.cpp SemaInit.cpp SemaLookup.cpp \ + SemaObjCProperty.cpp SemaOverload.cpp SemaStmt.cpp \ + SemaTemplate.cpp SemaTemplateDeduction.cpp \ + SemaTemplateInstantiate.cpp SemaTemplateInstantiate.cpp \ + SemaTemplateInstantiateDecl.cpp SemaType.cpp \ + TargetAttributesSema.cpp + +TGHDRS=3D DiagnosticASTKinds DiagnosticCommonKinds DiagnosticSemaKinds Dia= gnosticParseKinds + +.include "../../clang.lib.mk" Property changes on: usr.bin/clang/lib/libclangsema/Makefile ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/lib/libclangast/Makefile =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/lib/libclangast/Makefile (.../head) (revision 0) +++ usr.bin/clang/lib/libclangast/Makefile (.../projects/clangbsd-import) (= revision 208076) @@ -0,0 +1,19 @@ +# $FreeBSD$ + +LIB=3D clangast + +SRCDIR=3D tools/clang/lib/AST +SRCS=3D APValue.cpp ASTConsumer.cpp ASTContext.cpp ASTDiagnostic.cpp \ + ASTImporter.cpp AttrImpl.cpp CXXInheritance.cpp Decl.cpp \ + DeclBase.cpp DeclCXX.cpp DeclFriend.cpp DeclGroup.cpp \ + DeclObjC.cpp DeclPrinter.cpp DeclTemplate.cpp \ + DeclarationName.cpp Expr.cpp ExprCXX.cpp ExprConstant.cpp \ + FullExpr.cpp InheritViz.cpp NestedNameSpecifier.cpp \ + ParentMap.cpp RecordLayout.cpp RecordLayoutBuilder.cpp \ + Stmt.cpp StmtDumper.cpp StmtIterator.cpp StmtPrinter.cpp \ + StmtProfile.cpp StmtViz.cpp TemplateBase.cpp TemplateName.cpp \ + Type.cpp TypeLoc.cpp TypePrinter.cpp + +TGHDRS=3D DiagnosticASTKinds DiagnosticCommonKinds + +.include "../../clang.lib.mk" Property changes on: usr.bin/clang/lib/libclangast/Makefile ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/lib/libllvmbitreader/Makefile =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/lib/libllvmbitreader/Makefile (.../head) (revision 0) +++ usr.bin/clang/lib/libllvmbitreader/Makefile (.../projects/clangbsd-impo= rt) (revision 208076) @@ -0,0 +1,10 @@ +# $FreeBSD$ + +LIB=3D llvmbitreader + +SRCDIR=3D lib/Bitcode/Reader +SRCS=3D BitReader.cpp BitcodeReader.cpp + +TGHDRS=3D Intrinsics + +.include "../../clang.lib.mk" Property changes on: usr.bin/clang/lib/libllvmbitreader/Makefile ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/lib/libclanglex/Makefile =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/lib/libclanglex/Makefile (.../head) (revision 0) +++ usr.bin/clang/lib/libclanglex/Makefile (.../projects/clangbsd-import) (= revision 208076) @@ -0,0 +1,15 @@ +# $FreeBSD$ + +LIB=3D clanglex + +SRCDIR=3D tools/clang/lib/Lex +SRCS=3D HeaderMap.cpp HeaderSearch.cpp Lexer.cpp LiteralSupport.cpp \ + MacroArgs.cpp MacroInfo.cpp PPCaching.cpp PPDirectives.cpp \ + PPExpressions.cpp PPLexerChange.cpp PPMacroExpansion.cpp \ + PTHLexer.cpp Pragma.cpp PreprocessingRecord.cpp \ + Preprocessor.cpp PreprocessorLexer.cpp ScratchBuffer.cpp \ + TokenConcatenation.cpp TokenLexer.cpp + +TGHDRS=3D DiagnosticCommonKinds DiagnosticLexKinds + +.include "../../clang.lib.mk" Property changes on: usr.bin/clang/lib/libclanglex/Makefile ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/lib/libllvmx86codegen/Makefile =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/lib/libllvmx86codegen/Makefile (.../head) (revision 0) +++ usr.bin/clang/lib/libllvmx86codegen/Makefile (.../projects/clangbsd-imp= ort) (revision 208076) @@ -0,0 +1,19 @@ +# $FreeBSD$ + +LIB=3D llvmx86codegen + +SRCDIR=3D lib/Target/X86 +SRCS=3D SSEDomainFix.cpp X86AsmBackend.cpp \ + X86COFFMachineModuleInfo.cpp X86CodeEmitter.cpp \ + X86ELFWriterInfo.cpp X86FastISel.cpp X86FloatingPoint.cpp \ + X86FloatingPointRegKill.cpp X86ISelDAGToDAG.cpp \ + X86ISelLowering.cpp X86InstrInfo.cpp X86JITInfo.cpp \ + X86MCAsmInfo.cpp X86MCCodeEmitter.cpp X86RegisterInfo.cpp \ + X86SelectionDAGInfo.cpp X86Subtarget.cpp X86TargetMachine.cpp \ + X86TargetObjectFile.cpp + +TGHDRS=3D Intrinsics X86GenCallingConv X86GenDAGISel X86GenFastISel \ + X86GenInstrInfo X86GenInstrNames X86GenRegisterInfo.h \ + X86GenRegisterInfo X86GenRegisterNames X86GenSubtarget + +.include "../../clang.lib.mk" Property changes on: usr.bin/clang/lib/libllvmx86codegen/Makefile ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/lib/libllvmbitwriter/Makefile =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/lib/libllvmbitwriter/Makefile (.../head) (revision 0) +++ usr.bin/clang/lib/libllvmbitwriter/Makefile (.../projects/clangbsd-impo= rt) (revision 208076) @@ -0,0 +1,9 @@ +# $FreeBSD$ + +LIB=3D llvmbitwriter + +SRCDIR=3D lib/Bitcode/Writer +SRCS=3D BitWriter.cpp BitcodeWriter.cpp BitcodeWriterPass.cpp \ + ValueEnumerator.cpp + +.include "../../clang.lib.mk" Property changes on: usr.bin/clang/lib/libllvmbitwriter/Makefile ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/lib/libllvmmcparser/Makefile =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/lib/libllvmmcparser/Makefile (.../head) (revision 0) +++ usr.bin/clang/lib/libllvmmcparser/Makefile (.../projects/clangbsd-impor= t) (revision 208076) @@ -0,0 +1,9 @@ +# $FreeBSD$ + +LIB=3D llvmmcparser + +SRCDIR=3D lib/MC/MCParser +SRCS=3D AsmLexer.cpp AsmParser.cpp MCAsmLexer.cpp MCAsmParser.cpp \ + TargetAsmParser.cpp + +.include "../../clang.lib.mk" Property changes on: usr.bin/clang/lib/libllvmmcparser/Makefile ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/lib/libclangcodegen/Makefile =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/lib/libclangcodegen/Makefile (.../head) (revision 0) +++ usr.bin/clang/lib/libclangcodegen/Makefile (.../projects/clangbsd-impor= t) (revision 208076) @@ -0,0 +1,17 @@ +# $FreeBSD$ + +LIB=3D clangcodegen + +SRCDIR=3D tools/clang/lib/CodeGen +SRCS=3D CGBlocks.cpp CGBuiltin.cpp CGCXX.cpp CGCall.cpp CGClass.cpp \ + CGDebugInfo.cpp CGDecl.cpp CGDeclCXX.cpp CGException.cpp \ + CGExpr.cpp CGExprAgg.cpp CGExprCXX.cpp CGExprComplex.cpp \ + CGExprConstant.cpp CGExprScalar.cpp CGObjC.cpp CGObjCGNU.cpp \ + CGObjCMac.cpp CGRTTI.cpp CGRecordLayoutBuilder.cpp CGStmt.cpp \ + CGTemporaries.cpp CGVTT.cpp CGVTables.cpp CodeGenFunction.cpp \ + CodeGenModule.cpp CodeGenTypes.cpp Mangle.cpp \ + ModuleBuilder.cpp TargetInfo.cpp + +TGHDRS=3D DiagnosticCommonKinds Intrinsics + +.include "../../clang.lib.mk" Property changes on: usr.bin/clang/lib/libclangcodegen/Makefile ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/lib/libllvmanalysis/Makefile =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/lib/libllvmanalysis/Makefile (.../head) (revision 0) +++ usr.bin/clang/lib/libllvmanalysis/Makefile (.../projects/clangbsd-impor= t) (revision 208076) @@ -0,0 +1,25 @@ +# $FreeBSD$ + +LIB=3D llvmanalysis + +SRCDIR=3D lib/Analysis +SRCS=3D AliasAnalysis.cpp AliasAnalysisCounter.cpp \ + AliasAnalysisEvaluator.cpp AliasDebugger.cpp \ + AliasSetTracker.cpp Analysis.cpp BasicAliasAnalysis.cpp \ + CFGPrinter.cpp CaptureTracking.cpp ConstantFolding.cpp \ + DbgInfoPrinter.cpp DebugInfo.cpp IVUsers.cpp InlineCost.cpp \ + InstCount.cpp InstructionSimplify.cpp Interval.cpp \ + IntervalPartition.cpp LazyValueInfo.cpp \ + LibCallAliasAnalysis.cpp LibCallSemantics.cpp Lint.cpp \ + LiveValues.cpp LoopDependenceAnalysis.cpp LoopInfo.cpp \ + LoopPass.cpp MemoryBuiltins.cpp MemoryDependenceAnalysis.cpp \ + PHITransAddr.cpp PointerTracking.cpp PostDominators.cpp \ + ProfileEstimatorPass.cpp ProfileInfo.cpp ProfileInfoLoader.cpp \ + ProfileInfoLoaderPass.cpp ProfileVerifierPass.cpp \ + ScalarEvolution.cpp ScalarEvolutionAliasAnalysis.cpp \ + ScalarEvolutionExpander.cpp ScalarEvolutionNormalization.cpp \ + SparsePropagation.cpp Trace.cpp ValueTracking.cpp + +TGHDRS=3D Intrinsics + +.include "../../clang.lib.mk" Property changes on: usr.bin/clang/lib/libllvmanalysis/Makefile ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/lib/libllvmpowerpcasmprinter/Makefile =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/lib/libllvmpowerpcasmprinter/Makefile (.../head) (revisio= n 0) +++ usr.bin/clang/lib/libllvmpowerpcasmprinter/Makefile (.../projects/clang= bsd-import) (revision 208076) @@ -0,0 +1,12 @@ +# $FreeBSD$ + +LIB=3D llvmpowerpcasmprinter + +SRCDIR=3D lib/Target/PowerPC/AsmPrinter +INCDIR=3D lib/Target/PowerPC +SRCS=3D PPCAsmPrinter.cpp + +TGHDRS=3D PPCGenAsmWriter PPCGenInstrNames PPCGenRegisterInfo.h \ + PPCGenRegisterNames + +.include "../../clang.lib.mk" Property changes on: usr.bin/clang/lib/libllvmpowerpcasmprinter/Makefile ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/lib/libllvmmipsinfo/Makefile =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/lib/libllvmmipsinfo/Makefile (.../head) (revision 0) +++ usr.bin/clang/lib/libllvmmipsinfo/Makefile (.../projects/clangbsd-impor= t) (revision 208076) @@ -0,0 +1,11 @@ +# $FreeBSD$ + +LIB=3D llvmmipsinfo + +SRCDIR=3D lib/Target/Mips/TargetInfo/ +INCDIR=3D lib/Target/Mips +SRCS=3D MipsTargetInfo.cpp + +TGHDRS=3D MipsGenRegisterNames MipsGenInstrNames + +.include "../../clang.lib.mk" Property changes on: usr.bin/clang/lib/libllvmmipsinfo/Makefile ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/lib/libllvmasmprinter/Makefile =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/lib/libllvmasmprinter/Makefile (.../head) (revision 0) +++ usr.bin/clang/lib/libllvmasmprinter/Makefile (.../projects/clangbsd-imp= ort) (revision 208076) @@ -0,0 +1,9 @@ +# $FreeBSD$ + +LIB=3D llvmasmprinter + +SRCDIR=3D lib/CodeGen/AsmPrinter +SRCS=3D AsmPrinter.cpp AsmPrinterDwarf.cpp AsmPrinterInlineAsm.cpp \ + DIE.cpp DwarfDebug.cpp DwarfException.cpp OcamlGCPrinter.cpp + +.include "../../clang.lib.mk" Property changes on: usr.bin/clang/lib/libllvmasmprinter/Makefile ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/lib/libllvmarmasmprinter/Makefile =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/lib/libllvmarmasmprinter/Makefile (.../head) (revision 0) +++ usr.bin/clang/lib/libllvmarmasmprinter/Makefile (.../projects/clangbsd-= import) (revision 208076) @@ -0,0 +1,12 @@ +# $FreeBSD$ + +LIB=3D llvmarmasmprinter + +SRCDIR=3D lib/Target/ARM/AsmPrinter +INCDIR=3D lib/Target/ARM +SRCS=3D ARMAsmPrinter.cpp ARMInstPrinter.cpp ARMMCInstLower.cpp + +TGHDRS=3D ARMGenAsmWriter ARMGenInstrNames ARMGenRegisterInfo.h \ + ARMGenRegisterNames + +.include "../../clang.lib.mk" Property changes on: usr.bin/clang/lib/libllvmarmasmprinter/Makefile ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/lib/libllvmtarget/Makefile =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/lib/libllvmtarget/Makefile (.../head) (revision 0) +++ usr.bin/clang/lib/libllvmtarget/Makefile (.../projects/clangbsd-import)= (revision 208076) @@ -0,0 +1,12 @@ +# $FreeBSD$ + +LIB=3D llvmtarget + +SRCDIR=3D lib/Target +SRCS=3D Mangler.cpp SubtargetFeature.cpp Target.cpp TargetAsmLexer.cpp \ + TargetData.cpp TargetELFWriterInfo.cpp TargetFrameInfo.cpp \ + TargetInstrInfo.cpp TargetIntrinsicInfo.cpp \ + TargetLoweringObjectFile.cpp TargetMachine.cpp \ + TargetRegisterInfo.cpp TargetSubtarget.cpp + +.include "../../clang.lib.mk" Property changes on: usr.bin/clang/lib/libllvmtarget/Makefile ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/lib/libclangfrontend/Makefile =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/lib/libclangfrontend/Makefile (.../head) (revision 0) +++ usr.bin/clang/lib/libclangfrontend/Makefile (.../projects/clangbsd-impo= rt) (revision 208076) @@ -0,0 +1,25 @@ +# $FreeBSD$ + +LIB=3D clangfrontend + +SRCDIR=3D tools/clang/lib/Frontend +SRCS=3D ASTConsumers.cpp ASTMerge.cpp ASTUnit.cpp AnalysisConsumer.cpp \ + CacheTokens.cpp CodeGenAction.cpp CompilerInstance.cpp \ + CompilerInvocation.cpp DeclXML.cpp DependencyFile.cpp \ + DiagChecker.cpp DocumentXML.cpp FixItRewriter.cpp \ + FrontendAction.cpp FrontendActions.cpp FrontendOptions.cpp \ + GeneratePCH.cpp HTMLDiagnostics.cpp HTMLPrint.cpp \ + InitHeaderSearch.cpp InitPreprocessor.cpp LangStandards.cpp \ + PCHReader.cpp PCHReaderDecl.cpp PCHReaderStmt.cpp \ + PCHWriter.cpp PCHWriterDecl.cpp PCHWriterStmt.cpp \ + PlistDiagnostics.cpp PrintParserCallbacks.cpp \ + PrintPreprocessedOutput.cpp RewriteMacros.cpp RewriteObjC.cpp \ + RewriteTest.cpp StmtXML.cpp TextDiagnosticBuffer.cpp \ + TextDiagnosticPrinter.cpp TypeXML.cpp \ + VerifyDiagnosticsClient.cpp Warnings.cpp + +TGHDRS=3D DiagnosticASTKinds DiagnosticCommonKinds DiagnosticDriverKinds \ + DiagnosticFrontendKinds DiagnosticLexKinds DiagnosticSemaKinds \ + CC1Options + +.include "../../clang.lib.mk" Property changes on: usr.bin/clang/lib/libclangfrontend/Makefile ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/lib/libclangbasic/Makefile =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/lib/libclangbasic/Makefile (.../head) (revision 0) +++ usr.bin/clang/lib/libclangbasic/Makefile (.../projects/clangbsd-import)= (revision 208076) @@ -0,0 +1,15 @@ +# $FreeBSD$ + +LIB=3D clangbasic + +SRCDIR=3D tools/clang/lib/Basic +SRCS=3D Builtins.cpp ConvertUTF.c Diagnostic.cpp FileManager.cpp \ + IdentifierTable.cpp SourceLocation.cpp SourceManager.cpp \ + TargetInfo.cpp Targets.cpp TokenKinds.cpp Version.cpp + +TGHDRS=3D DiagnosticASTKinds DiagnosticAnalysisKinds \ + DiagnosticCommonKinds DiagnosticDriverKinds \ + DiagnosticFrontendKinds DiagnosticGroups DiagnosticLexKinds \ + DiagnosticParseKinds DiagnosticSemaKinds + +.include "../../clang.lib.mk" Property changes on: usr.bin/clang/lib/libclangbasic/Makefile ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/bin/clang/Makefile =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/bin/clang/Makefile (.../head) (revision 0) +++ usr.bin/clang/bin/clang/Makefile (.../projects/clangbsd-import) (revisi= on 208076) @@ -0,0 +1,29 @@ +# $FreeBSD$ + +.include + +PROG_CXX=3Dclang + +SRCDIR=3D tools/clang/tools/driver +SRCS=3D cc1_main.cpp driver.cpp +MAN=3D + +LINKS=3D ${BINDIR}/clang ${BINDIR}/clang++ + +TGHDRS=3D DiagnosticCommonKinds DiagnosticDriverKinds \ + DiagnosticFrontendKinds \ + DiagnosticLexKinds DiagnosticSemaKinds CC1Options +LIBDEPS=3Dclangfrontend clangdriver clangcodegen clangsema clangchecker \ + clanganalysis clangrewrite clangast clangparse clanglex clangbasic \ + \ + llvminstcombine \ + llvmipo llvmbitwriter llvmbitreader llvmpowerpccodegen \ + llvmpowerpcasmprinter llvmpowerpcinfo llvmx86asmparser \ + llvmx86asmprinter llvmx86codegen llvmx86info llvmmipsasmprinter \ + llvmmipscodegen llvmmipsinfo llvmarmasmparser llvmarmasmprinter \ + llvmarmcodegen llvmselectiondag llvmasmprinter llvmcodegen \ + llvmscalaropts llvmtransformutils llvmmc llvmmcparser llvmipa \ + llvmanalysis llvmtarget \ + llvmmc llvmcore llvmarminfo llvmsupport llvmsystem + +.include "../../clang.prog.mk" Property changes on: usr.bin/clang/bin/clang/Makefile ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/bin/tblgen/Makefile =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/bin/tblgen/Makefile (.../head) (revision 0) +++ usr.bin/clang/bin/tblgen/Makefile (.../projects/clangbsd-import) (revis= ion 208076) @@ -0,0 +1,23 @@ +# $FreeBSD$ + +PROG_CXX=3Dtblgen + +SRCDIR=3D utils/TableGen +SRCS=3D ARMDecoderEmitter.cpp AsmMatcherEmitter.cpp \ + AsmWriterEmitter.cpp AsmWriterInst.cpp CallingConvEmitter.cpp \ + ClangDiagnosticsEmitter.cpp CodeEmitterGen.cpp \ + CodeGenDAGPatterns.cpp CodeGenInstruction.cpp \ + CodeGenTarget.cpp DAGISelEmitter.cpp DAGISelMatcher.cpp \ + DAGISelMatcherEmitter.cpp DAGISelMatcherGen.cpp \ + DAGISelMatcherOpt.cpp DisassemblerEmitter.cpp EDEmitter.cpp \ + FastISelEmitter.cpp InstrEnumEmitter.cpp InstrInfoEmitter.cpp \ + IntrinsicEmitter.cpp LLVMCConfigurationEmitter.cpp \ + OptParserEmitter.cpp Record.cpp RegisterInfoEmitter.cpp \ + SubtargetEmitter.cpp TGLexer.cpp TGParser.cpp TGValueTypes.cpp \ + TableGen.cpp TableGenBackend.cpp X86DisassemblerTables.cpp \ + X86RecognizableInstr.cpp +MAN=3D + +LIBDEPS=3Dllvmsupport llvmsystem + +.include "../../clang.prog.mk" Property changes on: usr.bin/clang/bin/tblgen/Makefile ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/bin/Makefile =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/bin/Makefile (.../head) (revision 0) +++ usr.bin/clang/bin/Makefile (.../projects/clangbsd-import) (revision 208= 076) @@ -0,0 +1,5 @@ +# $FreeBSD$ + +SUBDIR=3D clang + +.include Property changes on: usr.bin/clang/bin/Makefile ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/clang.build.mk =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/clang.build.mk (.../head) (revision 0) +++ usr.bin/clang/clang.build.mk (.../projects/clangbsd-import) (revision 2= 08076) @@ -0,0 +1,66 @@ +# $FreeBSD$ + +LLVM_SRCS=3D${.CURDIR}/../../../../contrib/llvm +CLANG_SRCS=3D${LLVM_SRCS}/tools/clang + +CFLAGS+=3D-I${LLVM_SRCS}/include -I${CLANG_SRCS}/include \ + -I${LLVM_SRCS}/${SRCDIR} ${INCDIR:C/^/-I${LLVM_SRCS}\//} -I. \ + -I${.CURDIR}/../../include \ + -DLLVM_ON_UNIX -DLLVM_ON_FREEBSD \ + -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS #-DNDEBUG + +TARGET_ARCH?=3D ${MACHINE_ARCH} +# XXX: 8.0, to keep __FreeBSD_cc_version happy +CFLAGS+=3D-DLLVM_HOSTTRIPLE=3D\"${TARGET_ARCH}-undermydesk-freebsd9.0\" + +.PATH: ${LLVM_SRCS}/${SRCDIR} + +TBLGEN=3Dtblgen ${CFLAGS:M-I*} + +Intrinsics.inc.h: ${LLVM_SRCS}/include/llvm/Intrinsics.td + ${TBLGEN} -gen-intrinsic \ + ${LLVM_SRCS}/include/llvm/Intrinsics.td > ${.TARGET} +.for arch in \ + ARM/ARM Mips/Mips PowerPC/PPC X86/X86 +. for hdr in \ + AsmMatcher/-gen-asm-matcher \ + AsmWriter1/-gen-asm-writer,-asmwriternum=3D1 \ + AsmWriter/-gen-asm-writer \ + CallingConv/-gen-callingconv \ + CodeEmitter/-gen-emitter \ + DAGISel/-gen-dag-isel \ + FastISel/-gen-fast-isel \ + InstrInfo/-gen-instr-desc \ + InstrNames/-gen-instr-enums \ + RegisterInfo.h/-gen-register-desc-header \ + RegisterInfo/-gen-register-desc \ + RegisterNames/-gen-register-enums \ + Subtarget/-gen-subtarget +${arch:T}Gen${hdr:H:C/$/.inc.h/}: ${LLVM_SRCS}/lib/Target/${arch:H}/${arch= :T}.td + ${TBLGEN} ${hdr:T:C/,/ /g} \ + ${LLVM_SRCS}/lib/Target/${arch:H}/${arch:T}.td > ${.TARGET} +. endfor +.endfor +DiagnosticGroups.inc.h: ${CLANG_SRCS}/include/clang/Basic/Diagnostic.td + ${TBLGEN} -I${CLANG_SRCS}/include/clang/Basic \ + -gen-clang-diag-groups \ + ${CLANG_SRCS}/include/clang/Basic/Diagnostic.td > ${.TARGET} +.for hdr in AST Analysis Common Driver Frontend Lex Parse Sema +Diagnostic${hdr}Kinds.inc.h: ${CLANG_SRCS}/include/clang/Basic/Diagnostic.= td + ${TBLGEN} -I${CLANG_SRCS}/include/clang/Basic \ + -gen-clang-diags-defs -clang-component=3D${hdr} \ + ${CLANG_SRCS}/include/clang/Basic/Diagnostic.td > ${.TARGET} +.endfor +Options.inc.h: ${CLANG_SRCS}/include/clang/Driver/Options.td + ${TBLGEN} -I${CLANG_SRCS}/include/clang/Driver \ + -gen-opt-parser-defs \ + ${CLANG_SRCS}/include/clang/Driver/Options.td > ${.TARGET} + +CC1Options.inc.h: ${CLANG_SRCS}/include/clang/Driver/CC1Options.td + ${TBLGEN} -I${CLANG_SRCS}/include/clang/Driver \ + -gen-opt-parser-defs \ + ${CLANG_SRCS}/include/clang/Driver/CC1Options.td > ${.TARGET} + +SRCS+=3D ${TGHDRS:C/$/.inc.h/} +DPADD+=3D ${TGHDRS:C/$/.inc.h/} +CLEANFILES+=3D ${TGHDRS:C/$/.inc.h/} Property changes on: usr.bin/clang/clang.build.mk ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/clang/Makefile =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/clang/Makefile (.../head) (revision 0) +++ usr.bin/clang/Makefile (.../projects/clangbsd-import) (revision 208076) @@ -0,0 +1,7 @@ +# $FreeBSD$ + +SUBDIR=3D lib \ + bin \ + include + +.include Property changes on: usr.bin/clang/Makefile ___________________________________________________________________ Added: svn:keywords + FreeBSD=3D%H Index: usr.bin/Makefile =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/Makefile (.../head) (revision 208000) +++ usr.bin/Makefile (.../projects/clangbsd-import) (revision 208076) @@ -35,6 +35,7 @@ ${_chkey} \ chpass \ cksum \ + ${_clang} \ cmp \ col \ ${_colcrt} \ @@ -279,6 +280,10 @@ _calendar=3D calendar .endif =20 +.if ${MK_CLANG} !=3D "no" +_clang=3D clang +.endif + .if ${MK_HESIOD} !=3D "no" _hesinfo=3D hesinfo .endif Index: share/mk/bsd.own.mk =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- share/mk/bsd.own.mk (.../head) (revision 208000) +++ share/mk/bsd.own.mk (.../projects/clangbsd-import) (revision 208076) @@ -279,6 +279,17 @@ .endif =20 # +# Default behaviour of MK_CLANG depends on the architecture. +# +.if ${MACHINE_ARCH} =3D=3D "amd64" || ${MACHINE_ARCH} =3D=3D "i386" +_clang_yes=3DCLANG +_clang_no=3D +.else +_clang_yes=3D +_clang_no=3DCLANG +.endif + +# # MK_* options which default to "yes". # .for var in \ @@ -305,6 +316,7 @@ BZIP2 \ CALENDAR \ CDDL \ + ${_clang_yes} \ CPP \ CRYPT \ CTM \ @@ -407,6 +419,7 @@ BIND_LIBS \ BIND_SIGCHASE \ BIND_XML \ + ${_clang_no} \ HESIOD \ IDEA .if defined(WITH_${var}) && defined(WITHOUT_${var}) @@ -486,6 +499,7 @@ .endif =20 .if ${MK_TOOLCHAIN} =3D=3D "no" +MK_CLANG:=3D no MK_GDB:=3D no .endif =20 Index: Makefile.inc1 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- Makefile.inc1 (.../head) (revision 208000) +++ Makefile.inc1 (.../projects/clangbsd-import) (revision 208076) @@ -956,6 +956,13 @@ _crunchgen=3D usr.sbin/crunch/crunchgen .endif =20 +# XXX: There is no way to specify bootstrap tools depending on MK-flags +# with different per-architecture default values. Always build tblgen. +_clang_tblgen=3D \ + usr.bin/clang/lib/libllvmsupport \ + usr.bin/clang/lib/libllvmsystem \ + usr.bin/clang/bin/tblgen + .if ${MK_CDDL} !=3D "no" _dtrace_tools=3D cddl/usr.bin/sgsmsg cddl/lib/libctf lib/libelf \ lib/libdwarf cddl/usr.bin/ctfconvert cddl/usr.bin/ctfmerge @@ -963,6 +970,7 @@ =20 bootstrap-tools: .for _tool in \ + ${_clang_tblgen} \ ${_dtrace_tools} \ ${_strfile} \ ${_gperf} \ Index: etc/mtree/BSD.include.dist =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- etc/mtree/BSD.include.dist (.../head) (revision 208000) +++ etc/mtree/BSD.include.dist (.../projects/clangbsd-import) (revision 208= 076) @@ -83,6 +83,10 @@ scsi .. .. + clang + 2.0 + .. + .. crypto .. dev --bhWRZWkimNlt1+0z-- --/nI5WQOYKpjxyPr9 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAkvtaxgACgkQ52SDGA2eCwU9nQCfVN1LQUyRArUXVB2uwRRT00oL yowAn0724Pr7EycWwL6fDDh/4q0Qg/Vu =lR4o -----END PGP SIGNATURE----- --/nI5WQOYKpjxyPr9-- From owner-freebsd-arch@FreeBSD.ORG Fri May 14 17:50:29 2010 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A6E62106568A for ; Fri, 14 May 2010 17:50:29 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from mx0.hoeg.nl (mx0.hoeg.nl [IPv6:2001:4dd0:ff41::b23f:aa]) by mx1.freebsd.org (Postfix) with ESMTP id 6A9808FC14 for ; Fri, 14 May 2010 17:50:29 +0000 (UTC) Received: by mx0.hoeg.nl (Postfix, from userid 1000) id C41C42A28CB5; Fri, 14 May 2010 19:50:28 +0200 (CEST) Date: Fri, 14 May 2010 19:50:28 +0200 From: Ed Schouten To: FreeBSD Arch Message-ID: <20100514175028.GQ56080@hoeg.nl> References: <20100514152408.GN56080@hoeg.nl> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="gqv2CREQkBUQQDmZ" Content-Disposition: inline In-Reply-To: <20100514152408.GN56080@hoeg.nl> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: Subject: Re: Request for review: build infrastructure for Clang X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 May 2010 17:50:29 -0000 --gqv2CREQkBUQQDmZ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Ed Schouten wrote: > In case you find problems, be sure to drop by #freebsd-clang on EFnet. Looks like I need to check things twice more often. #freebsd-clang is on OFTC. Not EFnet. --=20 Ed Schouten WWW: http://80386.nl/ --gqv2CREQkBUQQDmZ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEUEARECAAYFAkvtjWQACgkQ52SDGA2eCwV3tACYtwA0cBEr8jsKFQ1ggwPJNG5S +ACfVGS5/r0xtjH3lqvMZNmRG6kgArg= =l2Pa -----END PGP SIGNATURE----- --gqv2CREQkBUQQDmZ-- From owner-freebsd-arch@FreeBSD.ORG Fri May 14 20:17:29 2010 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E73411065675 for ; Fri, 14 May 2010 20:17:29 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 626D18FC1B for ; Fri, 14 May 2010 20:17:28 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id o4EKHYIK012179 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 14 May 2010 23:17:34 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4) with ESMTP id o4EKHKa4029160; Fri, 14 May 2010 23:17:20 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id o4EKHK2f029159; Fri, 14 May 2010 23:17:20 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 14 May 2010 23:17:20 +0300 From: Kostik Belousov To: Ed Schouten Message-ID: <20100514201720.GR83316@deviant.kiev.zoral.com.ua> References: <20100514152408.GN56080@hoeg.nl> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="utew04vv9FCWZJ01" Content-Disposition: inline In-Reply-To: <20100514152408.GN56080@hoeg.nl> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_40, DNS_FROM_OPENWHOIS autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: FreeBSD Arch Subject: Re: Request for review: build infrastructure for Clang X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 May 2010 20:17:30 -0000 --utew04vv9FCWZJ01 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, May 14, 2010 at 05:24:08PM +0200, Ed Schouten wrote: > Hello all, >=20 > At BSDCan there has been a general agreement that in order to make Clang > a viable replacement for GCC 4.2.1, it should be integrated into FreeBSD > HEAD and installed by default as soon as possible. Could you, please, educate us lurkers not so lucky to attend the BSDCan, what is the reasoning that leads to such conclusion ? --utew04vv9FCWZJ01 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAkvtr9AACgkQC3+MBN1Mb4jbCgCghRQhyDoD7QqKOVaGUHpesyKq sFsAn2G0AJ6+KiQ3Q+HLwcLX85OVs3r2 =9AqW -----END PGP SIGNATURE----- --utew04vv9FCWZJ01-- From owner-freebsd-arch@FreeBSD.ORG Fri May 14 20:38:13 2010 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 718DF106564A for ; Fri, 14 May 2010 20:38:13 +0000 (UTC) (envelope-from florent.thoumie@gmail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id 005AA8FC08 for ; Fri, 14 May 2010 20:38:12 +0000 (UTC) Received: by fxm17 with SMTP id 17so2153929fxm.13 for ; Fri, 14 May 2010 13:38:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:sender:received :in-reply-to:references:from:date:x-google-sender-auth:message-id :subject:to:cc:content-type:content-transfer-encoding; bh=TUVcFV1TmZWJQJTyYxpzT3WcFI8PkSqKXlrk/99UMag=; b=XNjxuGH/LNNbExiKst9KwHL2Ap7kqS7dQ35i4ahbY3uUSrnzpwUeLzRTQr/vyJhbnb clY3LCrB7PR2T20Uw8ljhhBuF4Miw+j7yDXuaHBzWETQVlWy0QrdGzvgjfH/V+y9mUAG U8nk+ZDcwTxtSfipg2GrBQBXOSAFA4Qz59I00= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding; b=bZYfzSZrc+TrL4jT+ooXAIuSukVi1ZGI+tyv/RZA1PVE9QH2SWJgtsEzAtwz0Vd8WE yqcrXTk463A0zNt04IWUCMKHWw/uvnrVTVSTiG5olDHRP0IUHg86dqGh8+tsU9A9c5TG bamIdRnHhOM1cfRK6iSFpiTBemwPyh4Lu+kjw= Received: by 10.239.135.82 with SMTP id c18mr183293hbc.30.1273867912134; Fri, 14 May 2010 13:11:52 -0700 (PDT) MIME-Version: 1.0 Sender: florent.thoumie@gmail.com Received: by 10.239.165.131 with HTTP; Fri, 14 May 2010 13:11:32 -0700 (PDT) In-Reply-To: References: From: Florent Thoumie Date: Fri, 14 May 2010 21:11:32 +0100 X-Google-Sender-Auth: BJsshbJ_GYSE7orQ4TMFFM-CMk4 Message-ID: To: Garrett Cooper Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: arch@freebsd.org, portmgr@freebsd.org Subject: Re: [RFC] Deprecate @srcdir in pkg_install manifests X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 May 2010 20:38:13 -0000 On Sun, May 9, 2010 at 5:11 AM, Garrett Cooper wrote: > On Sat, May 8, 2010 at 8:44 PM, Garrett Cooper wrote= : >> On Sat, May 8, 2010 at 8:25 PM, Garrett Cooper wrot= e: >>> Hi Arch and Portmgr, >>> =A0 =A0Found another item that I'm proposing for removal -- @srcdir. No= w, >>> first off, here's what it does (from pkg_create): >>> >>> =A0 =A0 @srcdir directory >>> =A0 =A0 =A0 =A0 =A0 =A0 Set the internal directory pointer for _creatio= n only_ to >>> =A0 =A0 =A0 =A0 =A0 =A0 directory. =A0That is to say that it overrides = @cwd for package >>> =A0 =A0 =A0 =A0 =A0 =A0 creation but not extraction. >>> >>> This construct: >>> >>> 1. Isn't used anywhere in /usr/ports's pkg_plist* files. >>> 2. Isn't used in /usr/src . >>> 3. Is semi-broken in pkg_create as it's treated as a really awkward >>> special case, like so: >>> >>> =A0 =A0 =A0 =A0else if (p->type =3D=3D PLIST_CWD || p->type =3D=3D PLIS= T_SRC) >>> =A0 =A0 =A0 =A0 =A0 =A0fprintf(totar, "-C\n%s\n", p->name); >>> >>> =A0 =A0So if I specify @srcdir multiple times, pkg_create will fall in = on itself. >>> 4. It over-complicates things, as the -p option basically already sort >> >> Correction -- -s and -S handle this functionality: >> >> =A0 =A0 -s srcdir >> =A0 =A0 =A0 =A0 =A0 =A0 srcdir will override the value of @cwd during pa= ckage creation. >> >> =A0 =A0 -S basedir >> =A0 =A0 =A0 =A0 =A0 =A0 basedir will be prefixed to all @cwd during pack= age creation. > > Grr... this isn't nearly as simple as I hoped. -s is the controlling > factor for @srcdir: > > =A0 =A0/* If a SrcDir override is set, add it now */ > =A0 =A0if (SrcDir) { > =A0 =A0 =A0 =A0if (Verbose && !PlistOnly) > =A0 =A0 =A0 =A0 =A0 =A0printf("Using SrcDir value of %s\n", SrcDir); > =A0 =A0 =A0 =A0add_plist(&plist, PLIST_SRC, SrcDir); > =A0 =A0} > > I'll talk this over with flz, but it's definitely obfuscated design. > >>> of provides this level of functionality; the only pro for doing this >>> that I can think of is if someone had tainted vs untainted files that >>> they wanted to install, then using @srcdir with a custom manifest and >>> directory would simplify things. I argue that if they're doing that, >>> they should be using a chroot or a jail anyhow because package >>> maintainers would potentially unnecessarily taint the system with >>> their environment and the packages wouldn't be necessarily as safe to >>> redistribute. >>> =A0 =A0Another item I'll be talking about with flz and other folks at >>> BSDCan, but I wanted to see if anyone had any concerns that they >>> needed to air here before a final decision was made by portmgr. As discussed the other day, I don't see any good reason to use -s (aka @srcdir). The -S option is a different story, even though I'm not sure anybody actually uses it... --=20 Florent Thoumie flz@FreeBSD.org FreeBSD Committer From owner-freebsd-arch@FreeBSD.ORG Fri May 14 20:57:35 2010 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 42755106566B for ; Fri, 14 May 2010 20:57:35 +0000 (UTC) (envelope-from brooks@lor.one-eyed-alien.net) Received: from lor.one-eyed-alien.net (lor.one-eyed-alien.net [69.66.77.232]) by mx1.freebsd.org (Postfix) with ESMTP id D9C2F8FC14 for ; Fri, 14 May 2010 20:57:34 +0000 (UTC) Received: from lor.one-eyed-alien.net (localhost [127.0.0.1]) by lor.one-eyed-alien.net (8.14.3/8.14.3) with ESMTP id o4EKdFFD004969; Fri, 14 May 2010 15:39:20 -0500 (CDT) (envelope-from brooks@lor.one-eyed-alien.net) Received: (from brooks@localhost) by lor.one-eyed-alien.net (8.14.3/8.14.3/Submit) id o4EKdFY0004968; Fri, 14 May 2010 15:39:15 -0500 (CDT) (envelope-from brooks) Date: Fri, 14 May 2010 15:39:15 -0500 From: Brooks Davis To: Kostik Belousov Message-ID: <20100514203915.GC4256@lor.one-eyed-alien.net> References: <20100514152408.GN56080@hoeg.nl> <20100514201720.GR83316@deviant.kiev.zoral.com.ua> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="uXxzq0nDebZQVNAZ" Content-Disposition: inline In-Reply-To: <20100514201720.GR83316@deviant.kiev.zoral.com.ua> User-Agent: Mutt/1.5.17 (2007-11-01) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-3.0 (lor.one-eyed-alien.net [127.0.0.1]); Fri, 14 May 2010 15:39:21 -0500 (CDT) Cc: Ed Schouten , FreeBSD Arch Subject: Re: Request for review: build infrastructure for Clang X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 May 2010 20:57:35 -0000 --uXxzq0nDebZQVNAZ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, May 14, 2010 at 11:17:20PM +0300, Kostik Belousov wrote: > On Fri, May 14, 2010 at 05:24:08PM +0200, Ed Schouten wrote: > > Hello all, > >=20 > > At BSDCan there has been a general agreement that in order to make Clang > > a viable replacement for GCC 4.2.1, it should be integrated into FreeBSD > > HEAD and installed by default as soon as possible. > Could you, please, educate us lurkers not so lucky to attend the > BSDCan, what is the reasoning that leads to such conclusion ? I'll put out a full summary of the summit by early next week, but=20 the short version is that by adding clang to the base system we get two benefits: 1) Testing becomes trivial for people using current. (We'll follow adding it to the base with making bootstrap option.) 2) We send a strong signal about our direction. If this is going to work we need a lot of people to work on and making it clear to our corporate partners and their vendors is important. -- Brooks P.S. Related to this, Warner is engaged in a parallel effort to add external toolchain support. No matter how things turnout, this is a critical effort to allow better support of cutting edge hardware. --uXxzq0nDebZQVNAZ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iD8DBQFL7bTzXY6L6fI4GtQRAmSZAJ9fmwKFhg7KPihPYtICcu51Anz3VACdHSog zRJkGM2rjIwPpaarMfPJnC8= =6Gbn -----END PGP SIGNATURE----- --uXxzq0nDebZQVNAZ-- From owner-freebsd-arch@FreeBSD.ORG Sat May 15 12:19:32 2010 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 56F64106567D for ; Sat, 15 May 2010 12:19:32 +0000 (UTC) (envelope-from marius@alchemy.franken.de) Received: from alchemy.franken.de (alchemy.franken.de [194.94.249.214]) by mx1.freebsd.org (Postfix) with ESMTP id DA5378FC24 for ; Sat, 15 May 2010 12:19:31 +0000 (UTC) Received: from alchemy.franken.de (localhost [127.0.0.1]) by alchemy.franken.de (8.14.3/8.14.3/ALCHEMY.FRANKEN.DE) with ESMTP id o4FC7HvT007775; Sat, 15 May 2010 14:07:17 +0200 (CEST) (envelope-from marius@alchemy.franken.de) Received: (from marius@localhost) by alchemy.franken.de (8.14.3/8.14.3/Submit) id o4FC7Hu0007774; Sat, 15 May 2010 14:07:17 +0200 (CEST) (envelope-from marius) Date: Sat, 15 May 2010 14:07:17 +0200 From: Marius Strobl To: Ed Schouten Message-ID: <20100515120717.GA7405@alchemy.franken.de> References: <20100514152408.GN56080@hoeg.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100514152408.GN56080@hoeg.nl> User-Agent: Mutt/1.4.2.3i Cc: FreeBSD Arch Subject: Re: Request for review: build infrastructure for Clang X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 May 2010 12:19:32 -0000 On Fri, May 14, 2010 at 05:24:08PM +0200, Ed Schouten wrote: > Hello all, > > At BSDCan there has been a general agreement that in order to make Clang > a viable replacement for GCC 4.2.1, it should be integrated into FreeBSD > HEAD and installed by default as soon as possible. This does not mean > that the system will be bootstrapped using Clang, nor does it mean that > Ports are built using it. Clang is just installed as /usr/bin/clang and > /usr/bin/clang++. It can be built and installed on any architecture, but > it will only be enabled on amd64, i386 and pc98 for now. > > As requested by several people, I am hereby sending a patch which adds > the build infrastructure for Clang. It includes all modifications that > are present in the projects/clangbsd-import branch, except the > LLVM/Clang source tree stored at contrib/llvm. That patch appears to be missing the sparc64 bits. Marius From owner-freebsd-arch@FreeBSD.ORG Sat May 15 13:31:28 2010 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DDB761065673 for ; Sat, 15 May 2010 13:31:28 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from mx0.hoeg.nl (mx0.hoeg.nl [IPv6:2001:4dd0:ff41::b23f:aa]) by mx1.freebsd.org (Postfix) with ESMTP id 9FF178FC13 for ; Sat, 15 May 2010 13:31:28 +0000 (UTC) Received: by mx0.hoeg.nl (Postfix, from userid 1000) id 69DAA2A28CB5; Sat, 15 May 2010 15:31:27 +0200 (CEST) Date: Sat, 15 May 2010 15:31:27 +0200 From: Ed Schouten To: Marius Strobl Message-ID: <20100515133127.GT56080@hoeg.nl> References: <20100514152408.GN56080@hoeg.nl> <20100515120717.GA7405@alchemy.franken.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Giar8Gekte2S5Alg" Content-Disposition: inline In-Reply-To: <20100515120717.GA7405@alchemy.franken.de> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: FreeBSD Arch Subject: Re: Request for review: build infrastructure for Clang X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 May 2010 13:31:28 -0000 --Giar8Gekte2S5Alg Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Marius Strobl wrote: > That patch appears to be missing the sparc64 bits. As far as I know there is no sparc64 support, right? It's just sparc32. --=20 Ed Schouten WWW: http://80386.nl/ --Giar8Gekte2S5Alg Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAkvuoi8ACgkQ52SDGA2eCwU61ACfRKsB4fE0zEcnulPycaMpZKBf xFUAnAlf7Qnfd6Vt+1Q3e0oDoS8q+kwI =cfhW -----END PGP SIGNATURE----- --Giar8Gekte2S5Alg-- From owner-freebsd-arch@FreeBSD.ORG Sat May 15 14:06:21 2010 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 01AC71065672 for ; Sat, 15 May 2010 14:06:21 +0000 (UTC) (envelope-from marius@alchemy.franken.de) Received: from alchemy.franken.de (alchemy.franken.de [194.94.249.214]) by mx1.freebsd.org (Postfix) with ESMTP id 6B41D8FC17 for ; Sat, 15 May 2010 14:06:19 +0000 (UTC) Received: from alchemy.franken.de (localhost [127.0.0.1]) by alchemy.franken.de (8.14.3/8.14.3/ALCHEMY.FRANKEN.DE) with ESMTP id o4FE6Ilo008460; Sat, 15 May 2010 16:06:18 +0200 (CEST) (envelope-from marius@alchemy.franken.de) Received: (from marius@localhost) by alchemy.franken.de (8.14.3/8.14.3/Submit) id o4FE6Iwc008459; Sat, 15 May 2010 16:06:18 +0200 (CEST) (envelope-from marius) Date: Sat, 15 May 2010 16:06:18 +0200 From: Marius Strobl To: Ed Schouten Message-ID: <20100515140618.GM43981@alchemy.franken.de> References: <20100514152408.GN56080@hoeg.nl> <20100515120717.GA7405@alchemy.franken.de> <20100515133127.GT56080@hoeg.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100515133127.GT56080@hoeg.nl> User-Agent: Mutt/1.4.2.3i Cc: FreeBSD Arch Subject: Re: Request for review: build infrastructure for Clang X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 May 2010 14:06:21 -0000 On Sat, May 15, 2010 at 03:31:27PM +0200, Ed Schouten wrote: > * Marius Strobl wrote: > > That patch appears to be missing the sparc64 bits. > > As far as I know there is no sparc64 support, right? It's just sparc32. > Rdivacky@ said that Sun has contributed 64-bit V9 support. Marius From owner-freebsd-arch@FreeBSD.ORG Sat May 15 14:09:02 2010 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 697051065673 for ; Sat, 15 May 2010 14:09:02 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from mx0.hoeg.nl (mx0.hoeg.nl [IPv6:2001:4dd0:ff41::b23f:aa]) by mx1.freebsd.org (Postfix) with ESMTP id 2A9088FC28 for ; Sat, 15 May 2010 14:09:02 +0000 (UTC) Received: by mx0.hoeg.nl (Postfix, from userid 1000) id 83FD52A28CB5; Sat, 15 May 2010 16:09:01 +0200 (CEST) Date: Sat, 15 May 2010 16:09:01 +0200 From: Ed Schouten To: Marius Strobl Message-ID: <20100515140901.GU56080@hoeg.nl> References: <20100514152408.GN56080@hoeg.nl> <20100515120717.GA7405@alchemy.franken.de> <20100515133127.GT56080@hoeg.nl> <20100515140618.GM43981@alchemy.franken.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="hDl4S+7NSo1UGeDS" Content-Disposition: inline In-Reply-To: <20100515140618.GM43981@alchemy.franken.de> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: FreeBSD Arch Subject: Re: Request for review: build infrastructure for Clang X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 May 2010 14:09:02 -0000 --hDl4S+7NSo1UGeDS Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Marius Strobl wrote: > On Sat, May 15, 2010 at 03:31:27PM +0200, Ed Schouten wrote: > > * Marius Strobl wrote: > > > That patch appears to be missing the sparc64 bits. > >=20 > > As far as I know there is no sparc64 support, right? It's just sparc32. > >=20 >=20 > Rdivacky@ said that Sun has contributed 64-bit V9 support. Yes, but as far as I know it is far from complete. I think I may look into sparc64 after I've committed this part. --=20 Ed Schouten WWW: http://80386.nl/ --hDl4S+7NSo1UGeDS Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAkvuqv0ACgkQ52SDGA2eCwWabgCdFi4r3FhI4rTCkbr2m60Q69jc Y7UAniEsAJVz3zR0wMZWA6CTZtlFqeau =Tr2p -----END PGP SIGNATURE----- --hDl4S+7NSo1UGeDS-- From owner-freebsd-arch@FreeBSD.ORG Sat May 15 18:32:12 2010 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 188B01065674 for ; Sat, 15 May 2010 18:32:12 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx22.fluidhosting.com [204.14.89.5]) by mx1.freebsd.org (Postfix) with ESMTP id 9F3C58FC17 for ; Sat, 15 May 2010 18:32:11 +0000 (UTC) Received: (qmail 20142 invoked by uid 399); 15 May 2010 18:32:10 -0000 Received: from localhost (HELO foreign.dougb.net) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 15 May 2010 18:32:10 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <4BEEE8A9.7020303@FreeBSD.org> Date: Sat, 15 May 2010 11:32:09 -0700 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.9.1.9) Gecko/20100330 Thunderbird/3.0.4 MIME-Version: 1.0 To: Ed Schouten References: <20100514152408.GN56080@hoeg.nl> In-Reply-To: <20100514152408.GN56080@hoeg.nl> X-Enigmail-Version: 1.0.1 OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: FreeBSD Arch Subject: Re: Request for review: build infrastructure for Clang X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 May 2010 18:32:12 -0000 On 05/14/10 08:24, Ed Schouten wrote: > > - Clang depends on many LLVM libraries. The Makefiles for these > libraries are stored in usr.bin/clang/lib. I was hoping someone else would bring this up, but no one has so here goes. There seems to be a whole little sub-hierarchy under usr.bin/clang, including the lib stuff you mentioned above. Is this necessary for some reason, or could the bmake bits be placed in their normal locations in the tree before the project is imported? Doug -- ... and that's just a little bit of history repeating. -- Propellerheads Improve the effectiveness of your Internet presence with a domain name makeover! http://SupersetSolutions.com/