Commit Graph

224 Commits

Author SHA1 Message Date
Simon J. Gerraty
98e0ffaefb Merge sync of head 2015-05-27 01:19:58 +00:00
Dimitry Andric
ef6fa9e26d Upgrade our copy of clang and llvm to 3.6.1 release.
This release contains the following cherry-picked revisions from
upstream trunk:

  226124 226151 226164 226165 226166 226407 226408 226409 226652
  226905 226983 227084 227087 227089 227208 227209 227210 227211
  227212 227213 227214 227269 227430 227482 227503 227519 227574
  227822 227986 227987 227988 227989 227990 228037 228038 228039
  228040 228188 228189 228190 228273 228372 228373 228374 228403
  228765 228848 228918 229223 229225 229226 229227 229228 229230
  229234 229235 229236 229238 229239 229413 229507 229680 229750
  229751 229752 229911 230146 230147 230235 230253 230255 230469
  230500 230564 230603 230657 230742 230748 230956 231219 231237
  231245 231259 231280 231451 231563 231601 231658 231659 231662
  231984 231986 232046 232085 232142 232176 232179 232189 232382
  232386 232389 232425 232438 232443 232675 232786 232797 232943
  232957 233075 233080 233351 233353 233409 233410 233508 233584
  233819 233904 234629 234636 234891 234975 234977 235524 235641
  235662 235931 236099 236306 236307

Please note that from 3.5.0 onwards, clang and llvm require C++11
support to build; see UPDATING for more information.
2015-05-25 13:43:03 +00:00
Dimitry Andric
4104449570 Update generated include/llvm/Support/DataTypes.h. 2015-02-28 00:31:01 +00:00
Dimitry Andric
09de9530e4 Minor updates to llvm's pregenerated config headers. 2015-02-26 22:46:01 +00:00
Dimitry Andric
cef93a3d52 Merge llvm 3.6.0 final from ^/vendor/llvm/dist, merge clang 3.6.0 final
from ^/vendor/clang/dist, and resolve conflicts.
2015-02-25 18:50:24 +00:00
Dimitry Andric
b09980d164 Merge llvm 3.6.0rc4 from ^/vendor/llvm/dist, merge clang 3.6.0rc4 from
^/vendor/clang/dist, resolve conflicts, and update patches.
2015-02-19 22:20:19 +00:00
Dimitry Andric
44f7b0dcc5 Merge llvm 3.6.0rc3 from ^/vendor/llvm/dist, merge clang 3.6.0rc3 from
^/vendor/clang/dist, resolve conflicts, and update patches README.
2015-02-14 14:13:00 +00:00
Ed Maste
9d984acfb7 Update FreeBSD LLDB build for 3.6 update
Sponsored by:	DARPA, AFRL
2015-02-08 17:26:41 +00:00
Dimitry Andric
bd9cc051b3 Merging ^/head r278224 through r278297. 2015-02-05 22:34:29 +00:00
Dimitry Andric
5ecbbe6415 Followup to r278223, by only using -stdlib=libc++ when the compiler is
clang; not even recent versions of gcc support the -stdlib flag.

Noticed by:	ngie
2015-02-04 21:48:50 +00:00
Dimitry Andric
a403ab7f64 Merge ^/head r278110 through r278223. 2015-02-04 21:08:28 +00:00
Dimitry Andric
35a08a4403 For now, add -stdlib=libc++ to the flags for building clang, since that
makes it easier to build head on stable/9, where libstdc++ is still the
default.  We can revisit this when somebody will try to build base with
gcc 4.8.1 or higher, and its included libstdc++.

Reported by:	rpaulo
2015-02-04 21:00:29 +00:00
Dimitry Andric
0f0f2bfa77 Pull in r227752 from upstream llvm trunk (by Michael Kuperstein):
[X86] Convert esp-relative movs of function arguments to pushes, step 2

  This moves the transformation introduced in r223757 into a separate MI pass.
  This allows it to cover many more cases (not only cases where there must be a
  reserved call frame), and perform rudimentary call folding. It still doesn't
  have a heuristic, so it is enabled only for optsize/minsize, with stack
  alignment <= 8, where it ought to be a fairly clear win.

  (Re-commit of r227728)

  Differential Revision: http://reviews.llvm.org/D6789

This helps to get sys/boot/i386/boot2 below the required size again,
when optimizing with -Oz.
2015-02-02 20:34:40 +00:00
Dimitry Andric
3de688eb16 Merge llvm 3.6.0rc2 from ^/vendor/llvm/dist, merge clang 3.6.0rc2 from
^/vendor/clang/dist, resolve conflicts, and cleanup patches.
2015-01-31 21:57:38 +00:00
Dimitry Andric
2c1a63f2b1 Instead of hardcoding /usr/lib, as in r277803, use ${LIBDIR} for the
private header location, since this Makefile (and everything under
lib/clang) is not processed for the 32-bit compat stages anyway.

Noticed by:	bjk
2015-01-27 19:58:02 +00:00
Dimitry Andric
0616204eb2 Change the path to clang's private headers. Upstream has always stored
these in $LIBDIR/clang/$VERSION/include, instead of our previous custom
location in /usr/include/clang/$VERSION.  This allows us to drop yet
another FreeBSD-specific patch.
2015-01-27 19:25:39 +00:00
Dimitry Andric
47125b4272 Add new internal clang headers, relating to AVX2 and ADX intrinsics. 2015-01-26 19:37:02 +00:00
Dimitry Andric
1ae6788e51 Update llvm and clang library and binary Makefiles for 3.6.0 rc1. 2015-01-26 18:48:27 +00:00
Dimitry Andric
9cac79b378 Upgrade our copy of clang and llvm to 3.5.1 release. This is a bugfix
only release, no new features have been added.

Please note that this version requires C++11 support to build; see
UPDATING for more information.

Release notes for llvm and clang can be found here:
<http://llvm.org/releases/3.5.1/docs/ReleaseNotes.html>
<http://llvm.org/releases/3.5.1/tools/clang/docs/ReleaseNotes.html>

MFC after:	1 month
X-MFC-With:	276479
2015-01-18 14:14:47 +00:00
Ed Maste
2d4f9ccd88 Remove extraneous period
Reported by:	rodrigc
2015-01-09 01:57:11 +00:00
Ed Maste
a1b50624be Fix WITH_LLDB build
A build with WITH_LLDB and not WITH_CLANG_EXTRAS failed after r276783.

Reported by:	rodrigc
2015-01-08 14:26:49 +00:00
Dimitry Andric
47a80b9264 Add the AArch64 llvm backend to the build to allow for early testing and
to ease any rework of how clang is built to take arm64 in to account.

Submitted by:	andrew
Reviewed by:	andrew, emaste
Differential Revision: https://reviews.freebsd.org/D1446
2015-01-07 19:06:27 +00:00
Ed Maste
1a559761c7 Update build for LLDB snapshot at upstream rev 216948
Sponsored by:	DARPA, AFRL
2014-11-26 17:40:03 +00:00
Dimitry Andric
12692fdcc7 Disable the ObjC rewriter modules, since according to rdivacky these are
only used by Xcode.  This shaves off some compilation time.
2014-11-24 20:54:48 +00:00
Dimitry Andric
281cb6ece0 Update llvm and clang library Makefiles. 2014-11-24 19:46:35 +00:00
Dimitry Andric
268335d002 Update llvm and clang include files. 2014-11-24 19:37:11 +00:00
Simon J. Gerraty
9268022b74 Merge from head@274682 2014-11-19 01:07:58 +00:00
Andrew Turner
3dde11c478 Fix the TARGET_ABI value clang uses. It shpuld be gnueabi on all ARM
soft-float architectures, and gnueabihf for hard-float.
2014-10-01 12:47:25 +00:00
Andrew Turner
6d4766c1b8 Remove MK_ARM_EABI, the armeb issues have been fixed. The code to support
the oabi is still in the tree, but it is expected this will be removed
as developers work on surrounding code.

With this commit the ARM EABI is the only supported supported ABI by
FreeBSD on ARMa 32-bit processors.

X-MFC after:	never
Relnotes:	yes
Differential Revision: https://reviews.freebsd.org/D876
2014-10-01 08:26:51 +00:00
Simon J. Gerraty
ee7b0571c2 Merge head from 7/28 2014-08-19 06:50:54 +00:00
Enji Cooper
50671e8b4f Replace DPADD with DPSRCS to fix "make checkdpadd"
Phabric: D625
Approved by: jmmv (mentor)
Reviewed by: dim
PR: 192734
MFC after: 2 weeks
2014-08-18 17:38:50 +00:00
Dimitry Andric
e60e641729 Stop telling people to directly report llvm or clang bugs upstream,
point them to the FreeBSD bug tracker instead, since we use our own
patches.

MFC after:	3 days
2014-08-13 21:38:29 +00:00
Marcel Moolenaar
e7d939bda2 Remove ia64.
This includes:
o   All directories named *ia64*
o   All files named *ia64*
o   All ia64-specific code guarded by __ia64__
o   All ia64-specific makefile logic
o   Mention of ia64 in comments and documentation

This excludes:
o   Everything under contrib/
o   Everything under crypto/
o   sys/xen/interface
o   sys/sys/elf_common.h

Discussed at: BSDcan
2014-07-07 00:27:09 +00:00
Dimitry Andric
6fd4061119 In some scenarios, when generating llvm/clang .inc.h files, multiple
source files could be passed to tblgen or clang-tblgen, leading to a
"Too many positional arguments specified" error message.  Fix this by
replacing the too-generic ${.ALLSRC} sources with explicit paths.

Reported by:	rysto32@gmail.com, rodrigc
MFC after:	3 days
2014-06-10 17:54:24 +00:00
Simon J. Gerraty
c9e3031a0b New dependencies 2014-05-17 03:03:17 +00:00
Simon J. Gerraty
dc8c6c5c08 Ensure clang-tblgen in TOOLSDIR 2014-05-16 17:57:14 +00:00
Simon J. Gerraty
f44c355924 Handle bootstrapping for host 2014-05-16 15:01:39 +00:00
Simon J. Gerraty
e2b820a948 Avoid circular dependency 2014-05-16 14:54:29 +00:00
Simon J. Gerraty
fae50821ae Updated dependencies 2014-05-16 14:09:51 +00:00
Dimitry Andric
a9069ffab4 Use the new -d option that was added to tblgen between llvm/clang 3.3
and 3.4 to generate dependency files for the '.inc.h' files generated
from .td files, and .sinclude those dependency files in clang.build.mk.

This will make future incremental builds of lib/clang and usr.bin/clang
work correctly, whenever any of the .td files get modified.

Note that this will not fix any problems with incremental builds from
*before* this revision, since there will not yet be any generated
dependency files.  A quick workaround is to run the following:

  find /usr/obj -type f -name '*.inc.h' | xargs rm

and then a regular incremental buildworld (e.g. with -DNO_CLEAN).

MFC after:	3 days
2014-05-14 17:11:57 +00:00
Dimitry Andric
85d60e68ac Upgrade our copy of llvm/clang to 3.4.1 release. This release contains
mostly fixes, for the following upstream bugs:

http://llvm.org/PR16365 http://llvm.org/PR17473 http://llvm.org/PR18000
http://llvm.org/PR18068 http://llvm.org/PR18102 http://llvm.org/PR18165
http://llvm.org/PR18260 http://llvm.org/PR18290 http://llvm.org/PR18316
http://llvm.org/PR18460 http://llvm.org/PR18473 http://llvm.org/PR18515
http://llvm.org/PR18526 http://llvm.org/PR18600 http://llvm.org/PR18762
http://llvm.org/PR18773 http://llvm.org/PR18860 http://llvm.org/PR18994
http://llvm.org/PR19007 http://llvm.org/PR19010 http://llvm.org/PR19033
http://llvm.org/PR19059 http://llvm.org/PR19144 http://llvm.org/PR19326

MFC after:	2 weeks
2014-05-12 18:45:56 +00:00
Warner Losh
7273339dc4 Eliminate EARLY_BUILD flag. It is redundant and means MK_CLANG_FULL=no
and MK_LLDB=no, so set those explicitly (now that we can do
that). Simplify tests for these variables as well, since we know they
will always be defined regardless of the phase of the build.
2014-05-10 16:38:03 +00:00
Simon J. Gerraty
cc3f4b9965 Merge from head 2014-05-08 23:54:15 +00:00
Warner Losh
c6063d0da8 Use src.opts.mk in preference to bsd.own.mk except where we need stuff
from the latter.
2014-05-06 04:22:01 +00:00
Simon J. Gerraty
3b8f084595 Merge head 2014-04-28 07:50:45 +00:00
Dimitry Andric
54ff5d7323 Add a SUBDIR_PARALLEL option to bsd.subdir.mk, to allow make to process
all the SUBDIR entries in parallel, instead of serially.  Apply this
option to a selected number of Makefiles, which can greatly speed up the
build on multi-core machines, when using make -j.

This can be extended to more Makefiles later on, whenever they are
verified to work correctly with parallel building.

I tested this on a 24-core machine, with make -j48 buildworld (N = 6):

                before    stddev       after    stddev
                =======   ======       =======  ======
real time        1741.1     16.5         959.8     2.7
user time       12468.7     16.4       14393.0    16.8
sys  time        1825.0     54.8        2110.6    22.8

(user+sys)/real     8.2                   17.1

E.g. the build was approximately 45% faster in real time.  On machines
with less cores, or with lower -j settings, the speedup will not be as
impressive.  But at least you can now almost max out a machine with
buildworld!

Submitted by:	jilles
MFC after:	2 weeks
2014-03-26 22:30:38 +00:00
Andrew Turner
73279d4113 Add a new ARM TARGET_ARCH, armv6hf. This is considered experimental.
This targets the existing ARMv6 and ARMv7 SoCs that contain a VFP unit.
This is an optional coprocessors may not be present in all devices, however
it appears to be in all current SoCs we support.

armv6hf targets the VFP variant of the ARM EABI and our copy of gcc is too
old to support this. Because of this there are a number of WITH/WITHOUT
options that are unsupported and must be left as the default value. The
options and their required value are:
 * WITH_ARM_EABI
 * WITHOUT_GCC
 * WITHOUT_GNUCXX

In addition, without an external toolchain, the following need to be left
as their default:
 * WITH_CLANG
 * WITH_CLANG_IS_CC

As there is a different method of passing float and double values to
functions the ABI is incompatible with existing armv6 binaries. To use
this a full rebuild of world is required. Because no floating point values
are passed into the kernel an armv6 kernel with VFP enabled will work with
an armv6hf userland and vice versa.
2014-03-23 12:49:25 +00:00
Dimitry Andric
bdc74e2bc0 Merge from head up to r262536. 2014-02-26 22:26:40 +00:00
Dimitry Andric
137470fbfb Add Makefile glue to build the Sparc backend libraries and link them
into the clang executable.
2014-02-20 22:22:39 +00:00
Ed Maste
895c202ef7 Update LLDB bmake build for r262187
Sponsored by:	DARPA, AFRL
2014-02-18 19:58:01 +00:00
Dimitry Andric
f785676f2a Upgrade our copy of llvm/clang to 3.4 release. This version supports
all of the features in the current working draft of the upcoming C++
standard, provisionally named C++1y.

The code generator's performance is greatly increased, and the loop
auto-vectorizer is now enabled at -Os and -O2 in addition to -O3.  The
PowerPC backend has made several major improvements to code generation
quality and compile time, and the X86, SPARC, ARM32, Aarch64 and SystemZ
backends have all seen major feature work.

Release notes for llvm and clang can be found here:
<http://llvm.org/releases/3.4/docs/ReleaseNotes.html>
<http://llvm.org/releases/3.4/tools/clang/docs/ReleaseNotes.html>

MFC after:	1 month
2014-02-16 19:44:07 +00:00
Dimitry Andric
840f097103 Enable llvm's integrated assembler for PowerPC, since it should now be
good enough for typical usage.

Requested by:	rdivacky
MFC after:	1 week
2013-12-16 18:45:21 +00:00
Ed Maste
04c171520d lldb: Threaded inferior support for FreeBSD
This is in the process of being submitted to the upstream LLDB
repository.  The thread list functionality is modelled in part on
GDBRemoteCommunicationClient.

LLDB bug pr16696 and code review D2267

Sponsored by:	DARPA, AFRL
2013-12-03 21:29:45 +00:00
Ed Maste
b952cd584f Update LLDB to upstream r196259 snapshot
Sponsored by:	DARPA, AFRL
2013-12-03 19:23:54 +00:00
Ed Maste
3561791104 Update LLDB to upstream r194122 snapshot
ludes minor changes relative to upstream, for compatibility with
FreeBSD's in-tree LLVM 3.3:

- Reverted LLDB r191806, restoring use of previous API.
- Reverted part of LLDB r189317, restoring previous enum names.
- Work around missing LLVM r192504, using previous registerEHFrames API
  (limited functionality).
- Removed PlatformWindows header include and init/terminate calls.

Sponsored by:	DARPA, AFRL
2013-11-12 17:25:33 +00:00
Simon J. Gerraty
f0247a242f Use the tblgen etc we built for host. 2013-10-17 20:04:44 +00:00
Simon J. Gerraty
446fca52f0 Merge head@256308 2013-10-14 15:52:45 +00:00
Simon J. Gerraty
3caf0790a8 Merge head@256284 2013-10-13 02:35:19 +00:00
Simon J. Gerraty
34b33809b7 Updated dependencies 2013-10-13 00:24:00 +00:00
Simon J. Gerraty
4fd0d10e0f New dependencies 2013-10-13 00:22:44 +00:00
Simon J. Gerraty
e97689cb24 Make sure we trigger generation of headers 2013-10-12 23:32:48 +00:00
Dimitry Andric
c60c0372b0 Bump OS versions in the toolchain triples to 11.0, and bump the
__FreeBSD_cc_version predefined macros in clang and gcc.

Approved by:	re (gjb)
2013-10-10 20:47:11 +00:00
Ed Maste
e8f1392d95 Add LLDB bmake infrastructure
This connects LLDB to the build, but it is disabled by default.  Add
WITH_LLDB= to src.conf to build it.

Note that LLDB requires a C++11 compiler so is disabled on platforms
using GCC.

Approved by:	re (gjb)
Sponsored by:	DARPA, AFRL
2013-09-20 01:52:02 +00:00
Simon J. Gerraty
d1d0158641 Merge from head 2013-09-05 20:18:59 +00:00
Dimitry Andric
284c197886 Upgrade our copy of llvm/clang to 3.3 release.
Release notes are still in the works, these will follow soon.

MFC after:	1 month
2013-06-12 18:48:53 +00:00
Dimitry Andric
a420df3c8a Use an ugly hack to get around bootstrapping problems when building
clang on head between r239347 and r245428.

The former revision introduced CLOCK_PROCESS_CPUTIME_ID as a clock id
for the clock_gettime() function and friends, but it was only added in
<sys/time.h>, not in <time.h>.  Any program including <time.h> would
therefore not be able to use CLOCK_PROCESS_CPUTIME_ID, even though the
value of _POSIX_CPUTIME indicates its existence.  The latter revision
synchronized the defines again.

Work around this problem by defining the id on the command line for the
particular .cpp file that needs it.  If the id ever changes value, this
hack will need to be updated.
2013-05-13 20:14:58 +00:00
Dimitry Andric
4b6b67b08e Allow building clang on older FreeBSD releases, where log2() does not
exist yet.  With this change, I have verified that building head on
8.1-RELEASE works.

Noticed by:	Ryan Stone <rysto32@gmail.com>
2013-05-03 16:29:51 +00:00
Simon J. Gerraty
69e6d7b75e sync from head 2013-04-12 20:48:55 +00:00
Dimitry Andric
139f7f9bf5 Upgrade our copy of llvm/clang to trunk r178860, in preparation of the
upcoming 3.3 release (branching and freezing expected in a few weeks).

Preliminary release notes can be found at the usual location:
<http://llvm.org/docs/ReleaseNotes.html>

An MFC is planned once the actual 3.3 release is finished.
2013-04-12 17:57:40 +00:00
Simon J. Gerraty
c2365cc4cc Updated dependencies 2013-03-17 01:54:35 +00:00
Andrew Turner
8a166cafe0 Allow us to build clang for ARM EABI. Clang and llvm use the
arm-gnueabi-freebsd10.0 triple for EABI. Use this when we are on arm or
armv6 and are building for EABI.

Reviewed by:	dim
2013-02-12 05:56:00 +00:00
David E. O'Brien
d9a447559b Sync with HEAD. 2013-02-08 16:10:16 +00:00
Dimitry Andric
df5d2454a3 Pull in r170135 from upstream clang trunk:
Dont use/link ARCMT, StaticAnalyzer and Rewriter to clang when the user
  specifies not to. Dont build ASTMatchers with Rewriter disabled and
  StaticAnalyzer when it's disabled.

  Without all those three, the clang binary shrinks (x86_64) from ~36MB
  to ~32MB (unstripped).

To disable these clang components, and get a smaller clang binary built
and installed, set WITHOUT_CLANG_FULL in src.conf(5).  During the
initial stages of buildworld, those extra components are already
disabled automatically, to save some build time.

MFC after:	1 week
2013-02-02 22:28:29 +00:00
Dimitry Andric
c80e6c4bec Upgrade our copy of llvm/clang to 3.2 release.
Release notes for llvm:
http://llvm.org/releases/3.2/docs/ReleaseNotes.html

Release notes for clang:
http://llvm.org/releases/3.2/tools/clang/docs/ReleaseNotes.html

MFC after:	2 weeks
2012-12-23 13:04:00 +00:00
Dimitry Andric
a36ffd6955 Cleanup a few duplicate llvm libs that snuck in with the recent update.
Noticed by:	rdivacky
2012-12-11 20:08:57 +00:00
Dimitry Andric
3861d79fd7 Upgrade our copy of llvm/clang to r168974, from upstream's release_32
branch.  This is effectively llvm/clang 3.2 RC2; the 3.2 release is
coming soon.
2012-12-03 19:24:08 +00:00
Simon J. Gerraty
7cd2dcf076 Updated/new Makefile.depend 2012-11-08 21:24:17 +00:00
Simon J. Gerraty
23090366f7 Sync from head 2012-11-04 02:52:03 +00:00
Marcel Moolenaar
0815243c39 Add support for bmake. This includes:
1.  Don't do upgrade_checks when using bmake. As long as we have WITH_BMAKE,
    there's a bootstrap complication in ths respect. Avoid it. Make the
    necessary changes to have upgrade_checks work wth bmake anyway.
2.  Remove the use of -E. It's not needed in our build because we use ?= for
    the respective variables, which means that we'll take the environment
    value (if any) anyway.
3.  Properly declare phony targets as phony as bmake is a lot smarter (and
    thus agressive) about build avoidance.
4.  Make sure CLEANFILES is complete and use it on .NOPATH. bmake is a lot
    smarter about build avoidance and should not find files we generate in
    the source tree. We should not have files in the repository we want to
    generate, but this is an easier way to cross this hurdle.
5.  Have behavior under bmake the same as it is under make with respect to
    halting when sub-commands fail. Add "set -e" to compound commands so
    that bmake is informed when sub-commands fail.
6.  Make sure crunchgen uses the same make as the rest of the build. This
    is important when the make utility isn't called make (but bmake for
    example).
7.  While here, add support for using MAKEOBJDIR to set the object tree
    location. It's the second alternative bmake looks for when determining
    the actual object directory (= .OBJDIR).

Submitted by:	Simon Gerraty <sjg@juniper.net>
Submitted by:	John Van Horne <jvanhorne@juniper.net>
2012-10-06 20:01:05 +00:00
Jung-uk Kim
430849e1b9 Do not install incomplete unwind.h from clang. This header file was meant
to be a wrapper for the canonical system header file.  Unfortunately, we do
not have one (yet) and some times it is causing weird failures when clang
is used for building ports.  More complete and correct file will come from
libcxxrt in the future.

Discussed with:	dim, kib, theraven
MFC after:	1 week
2012-10-05 00:35:13 +00:00
Dimitry Andric
5ea2b3b5db Sprinkle a bit of style.Makefile(5) across various clang Makefiles. No
functional changes.

MFC after:	3 days
2012-08-23 17:08:07 +00:00
Marcel Moolenaar
7750ad47a9 Sync FreeBSD's bmake branch with Juniper's internal bmake branch.
Requested by: Simon Gerraty <sjg@juniper.net>
2012-08-22 19:25:57 +00:00
Dimitry Andric
d4271816c7 Add three additional clang intrinsics headers, which I missed in the
previous import.
2012-08-20 20:56:40 +00:00
Dimitry Andric
7ae0e2c9f0 Upgrade our copy of llvm/clang to trunk r162107. With thanks to
Benjamin Kramer and Joerg Sonnenberger for their input and fixes.
2012-08-20 18:33:03 +00:00
Dimitry Andric
64cc5073b2 Upgrade our copy of llvm/clang to 3.1 release. Release notes can be
found at: http://llvm.org/releases/3.1/docs/ReleaseNotes.html

MFC after:	3 days
2012-05-23 21:48:49 +00:00
Dimitry Andric
acf4e8ef71 Make sure a few new internal clang headers get installed, I missed these
in the last import.  They are sometimes needed when you want to use
advanced instructions.

Also, add clang's internal stdalign.h header to ObsoleteFiles.inc, since
it is redundant: we already have a stdalign.h header in /usr/include.

Pointy hat to:	dim
PR:		kern/167574
Submitted by:	jkim
Reported by:	Oliver Hartmann <ohartman@zedat.fu-berlin.de>
MFC after:	2 weeks
2012-05-05 15:35:22 +00:00
Dimitry Andric
cb4dff8563 Upgrade our copy of llvm/clang to r155985, from upstream's release_31
branch.  This brings us very close to the 3.1 release, which is planned
for May 14th.

MFC after:	2 weeks
2012-05-03 20:41:21 +00:00
Dimitry Andric
db3212b375 Revert r234356 for now, as it leads to run-time problems on 32-bit
PowerPC.  Note this will break world.

Reported by:	andreast
Pointy hat to:	dim
2012-04-23 06:33:27 +00:00
Dimitry Andric
4f78aa4725 Work around an issue on 32-bit PowerPC, where clang executable can get
too big, causing 'relocation truncated to fit' errors at link time.

Reviewed by:	nwhitehorn
2012-04-16 21:36:55 +00:00
Dimitry Andric
dff0c46c97 Upgrade our copy of llvm/clang to trunk r154661, in preparation of the
upcoming 3.1 release (expected in a few weeks).  Preliminary release
notes can be found at: <http://llvm.org/docs/ReleaseNotes.html>

MFC after:	2 weeks
2012-04-16 21:23:25 +00:00
Dimitry Andric
6bb1cadd56 Add a WITH_CLANG_EXTRAS option for src.conf(5), disabled by default,
that builds the following additional llvm/clang tools:

- bugpoint
- llc
- lli
- llvm-ar
- llvm-as
- llvm-bcanalyzer
- llvm-diff
- llvm-dis
- llvm-extract
- llvm-ld
- llvm-link
- llvm-mc
- llvm-nm
- llvm-objdump
- llvm-prof
- llvm-ranlib
- llvm-rtdyld
- llvm-stub
- macho-dump
- opt

These tools are mainly useful for people that want to manipulate llvm
bitcode (.bc) and llvm assembly language (.ll) files, or want to tinker
with llvm and clang themselves.

MFC after:	2 weeks
2012-02-05 23:56:22 +00:00
Dimitry Andric
f8f33f6ab6 In several llvm library Makefiles, remove extraneous slashes at the end
of SRCDIR definitions.

MFC after:	3 days
2012-01-01 18:36:42 +00:00
Nathan Whitehorn
3f922e14a3 Instead of forcing -O1 on PowerPC for LLVM and clang, fix the actual
problem by adding -fno-strict-aliasing to CFLAGS. Since this is a global
issue that just happened to manifest on PowerPC, add this to CFLAGS
unconditionally.

MFC after:	1 week
2012-01-01 15:56:15 +00:00
Dimitry Andric
214ca32f1f Use the correct upstream revision number for llvm/clang 3.0 release.
The r145546 revision is from branches/release_30, the r145349 revision
is from tags/RELEASE_30/final.

MFC after:	1 week
2011-12-10 01:01:44 +00:00
Dimitry Andric
f8254f43c5 Upgrade our copy of llvm/clang to 3.0 release. Release notes can be
found at: http://llvm.org/releases/3.0/docs/ReleaseNotes.html

MFC after:	1 week
2011-12-09 22:23:45 +00:00
Nathan Whitehorn
ebcc5e9a0d Connect LLVM/clang to the build on powerpc64. After the binutils 2.17.50
import, it works without issue.
2011-11-21 00:49:46 +00:00
Dimitry Andric
fd75cb79ce Revert r227538, since it doesn't compile with clang at all (it doesn't
allow the built-in operations to be redefined, at least not without
excessive force).

Instead, just disable LLVM's support for atomic operations for now.
Nothing in either clang or the tablegen tools currently depends on it.

This still allows users of head built before r198344 to upgrade to
top-of-head seamlessly.
2011-11-17 21:06:53 +00:00
Dimitry Andric
130515293b When one attempts to compile the tree with -march=i386, which also used
to be gcc's default before r198344, calls to atomic builtins will not be
expanded inline.  Instead, they will be generated as calls to external
functions (e.g. __sync_fetch_and_add_N), leading to linking errors later
on.

Put in a seatbelt that disables use of atomic builtins in libstdc++ and
llvm, when tuning specifically for the real i386 CPU.  This does not
protect against all possible issues, but it is better than nothing.
2011-11-06 14:07:23 +00:00
Dimitry Andric
6122f3e60d Upgrade our copy of llvm/clang to r142614, from upstream's release_30
branch.  This brings us very close to the 3.0 release, which is expected
in a week or two.

MFC after:	1 week
2011-10-22 14:08:43 +00:00
Dimitry Andric
db53c95fc8 Update llvm/clang's target triple (confusingly named LLVM_HOSTTRIPLE) to
$arch-unknown-freebsd10.0.
2011-10-17 18:30:18 +00:00
Dimitry Andric
17a519f92f Upgrade our copy of llvm/clang to r135360, from upstream's trunk. 2011-07-17 19:51:40 +00:00
Dimitry Andric
bd5abe1968 Upgrade our copy of llvm/clang to r132879, from upstream's trunk. 2011-06-12 18:01:31 +00:00
Dimitry Andric
02003216e8 On amd64, change clang's default triple to 'x86_64-unknown-freebsd9.0',
similar to what we do for binutils.  When clang's default triple starts
with 'amd64-', it does not pass a proper -target-cpu option to its
first stage.

This can lead to problems, for example when structs are memcpy'd, and
clang erroneously assumes they are 16-byte aligned.  It will then use
the 'movaps' SSE instruction to implement the copy, which results in a
bus error if the struct is really 8-byte aligned.

I encountered this issue when gcc's /usr/libexec/cc1 started crashing
with SIGBUS, after rebuilding world with clang ToT, but it also affects
the version of clang that we have in the tree.  We were just lucky until
now, apparently. :)
2011-05-22 16:32:44 +00:00
Dimitry Andric
3b0f406639 Upgrade our copy of llvm/clang to r130700, from upstream's trunk. 2011-05-02 21:04:37 +00:00
Dimitry Andric
dd6029ff3a Update llvm/clang to trunk r126547.
There are several bugfixes in this update, but the most important one is
to ensure __start_ and __stop_ symbols for linker sets and kernel module
metadata are always emitted in object files:

  http://llvm.org/bugs/show_bug.cgi?id=9292

Before this fix, if you compiled kernel modules with clang, they would
not be properly processed by kldxref, and if they had any dependencies,
the kernel would fail to load those.  Another problem occurred when
attempting to mount a tmpfs filesystem, which would result in 'operation
not supported by device'.
2011-02-27 01:32:10 +00:00
Dimitry Andric
86b360ada3 Instead of defining LLVM_MULTITHREADED as 0 or 1, define or undefine it,
and test appropriately.  Otherwise it might erroneously pick up some
pthread primitives, and fail to link.
2011-02-27 00:02:48 +00:00
Dimitry Andric
45cc80a79c Update llvm's config.h files to match more closely what is generated by
a regular autoconf-based build.  More cosmetic than functional changes.
2011-02-26 23:12:36 +00:00
Dimitry Andric
2754fe609d Upgrade our copy of llvm/clang to r126079, from upstream's trunk.
This contains many improvements, primarily better C++ support, an
integrated assembler for x86 and support for -pg.
2011-02-20 19:33:47 +00:00
Dimitry Andric
d283dd6e81 Don't use -fno-exceptions or -fno-rtti for .c files, when building
llvm/clang.
2010-11-14 22:17:12 +00:00
Rui Paulo
e5e203a468 When the make target is 'install', don't descend into the clang
libraries subdirectories since there's nothing to do there. This saves
us quite a few seconds off installworld, esp. if the disk I/O is slow.
2010-10-30 16:53:42 +00:00
Dimitry Andric
14837164d2 Upgrade Clang and LLVM to the 2.8 release. See here for release notes:
http://llvm.org/releases/2.8/docs/ReleaseNotes.html

Approved by:	rpaulo (mentor)
2010-10-07 20:31:07 +00:00
Dimitry Andric
e580952d8a Upgrade our Clang in base to r114020, from upstream's release_28 branch.
Approved-by:	rpaulo (mentor)
2010-09-20 16:43:17 +00:00
Dimitry Andric
3fe0686746 In all Makefiles under lib/clang, consistently use tabs instead of
spaces after the '=' sign in macro assignments.

Approved-by:	rpaulo (mentor)
2010-09-19 10:54:58 +00:00
Rui Paulo
2aedda247b Modify clang so that when TOOLS_PREFIX is defined we register the
CLANG_PREFIX macro. This changes the default header search path when we
are building clang as part of cross-tools.

Submitted by:	Dimitry Andric <dimitry at andric.com>
Reviewed by:	freebsd-current
2010-08-21 15:46:33 +00:00
Rui Paulo
582a734e13 Build clang libraries by default with -fno-exceptions and with
-fno-rtti. The clang libaries that really use exceptions and virtual
functions can enable LLVM_REQUIRES_EH and LLVM_REQUIRES_RTTI
respectively. This saves space on the resulting binaries and follows
what's being done upstream.

Submitted by:	Dimitry Andric <dimitry at andric.com>
2010-07-22 19:09:34 +00:00
Ed Schouten
ffd1746d03 Upgrade our Clang in base to r108428.
This commit merges the latest LLVM sources from the vendor space. It
also updates the build glue to match the new sources. Clang's version
number is changed to match LLVM's, which means /usr/include/clang/2.0
has been renamed to /usr/include/clang/2.8.

Obtained from:	projects/clangbsd
2010-07-20 17:16:57 +00:00
Ed Schouten
d5f03e1f81 Remove even two more unneeded files from libllvmsupport. 2010-06-15 17:28:16 +00:00
Ed Schouten
9987dff003 Remove unneeded files from the build.
I used the following command to determine which source files were
unneeded:

| for i in `find lib/clang -name '*.o'`
| do
| 	MATCHES="`(nm -g --defined-only $i; nm -g --defined-only \
| 		usr.bin/clang/clang/clang) | sed -e 's/.* //' | \
| 		sort | uniq -d | wc -l`"
| 	[ $MATCHES -eq 0 ] && echo "$i: unneeded"
| done

This should slightly improve the build times.
2010-06-15 17:08:03 +00:00
Ed Schouten
486d3623ba Unbreak Clang on PowerPC.
It seems GCC 4.2.1 on PowerPC miscompiles Clang, causing it to crash
when building even simple Hello World applications. Switch back to -O1
for this architecture.

Submitted by:	nwhitehorn
2010-06-14 06:23:47 +00:00
Ed Schouten
2a008fddd8 Disable usage of posix_spawn() inside LLVM.
Even though it's nice to use posix_spawn() instead of manually using
fork()/exec(), it's better to disable this. FreeBSD 7 doesn't support
this interface. When enabled, we can't build tblgen, which prevents us
from building FreeBSD 9 on 7.

Tested by:	raj
2010-06-13 12:39:22 +00:00
Ed Schouten
c1fe4c5343 Do the branding right this time.
I've looked at other places in the source tree where CLANG_VENDOR is
used and I suspect it might not be safe to use newlines here.
CLANG_VENDOR should just be defined to "FreeBSD ", just like the latest
Clang preview in OS X uses "Apple ". Properly use SVN_REVISION to define
it to the imported revision of Clang. I do want to have a date in there,
so slightly modify the code to support CLANG_VENDOR_SUFFIX.
2010-06-12 15:13:36 +00:00
Ed Schouten
3e241e2e08 Disable usage of __DATE__.
This ensures that the Clang binary doesn't change checksums every time
it's built.
2010-06-10 12:15:09 +00:00
Ed Schouten
8089dccd09 Brand our Clang binary.
That way it's easier for the Clang folks to keep track of what we're
doing.
2010-06-10 12:06:35 +00:00
Roman Divacky
47c832c3dd Import the build makefiles for clang/LLVM.
Approved by:	ed (mentor)
2010-06-09 19:32:20 +00:00