Commit Graph

230 Commits

Author SHA1 Message Date
Dimitry Andric
0f5676f432 Merge llvm, clang, lld, lldb, compiler-rt and libc++ r302418, and update
build glue.
2017-05-08 19:20:55 +00:00
Dimitry Andric
7d9e99b671 Regenerate llvm's config.h file. 2017-05-05 20:45:55 +00:00
Dimitry Andric
f37b6182a5 Merge llvm, clang, lld, lldb, compiler-rt and libc++ r302069, and update
build glue (preliminary, not all option combinations work yet).
2017-05-03 21:54:55 +00:00
Dimitry Andric
51690af2a4 Merge llvm, clang, lld, lldb, compiler-rt and libc++ r301441, and update
build glue.
2017-04-26 22:33:09 +00:00
Dimitry Andric
6bc11b1414 Merge llvm, clang, lld and lldb trunk r300890, and update build glue. 2017-04-20 21:48:54 +00:00
Dimitry Andric
28ae63f991 For lldb, delete the custom Xcode-only Host/Config.h, and provide a
pre-generated version in lib/clang/include/lldb/Host instead, similar to
what we do for clang, llvm and lld.
2017-04-18 20:31:02 +00:00
Dimitry Andric
5897d2f01b Initial update of clang/llvm build glue, for building just a minimal
clang executable.
2017-04-17 11:21:42 +00:00
Dimitry Andric
817a00731b Update clang, llvm, lld, lldb, compiler-rt and libc++ to 4.0.0 release.
We were already very close to the last release candidate, so this is a
pretty minor update.

Relnotes:	yes
MFC after:	1 month
X-MFC-With:	r314564
2017-03-10 19:02:41 +00:00
Dimitry Andric
2e477b5e5e Merge llvm, clang, compiler-rt, libc++, lld and lldb release_40 branch
r296509, and update build glue.
2017-02-28 21:18:23 +00:00
Dimitry Andric
bc93f188f6 Merge llvm, clang, compiler-rt, libc++, lld and lldb release_40 branch
r296202, and update build glue.
2017-02-25 15:00:57 +00:00
Dimitry Andric
5d19388204 Merge llvm, clang, compiler-rt, libc++, lld and lldb release_40 branch
r296002, and update build glue.
2017-02-23 19:25:29 +00:00
Dimitry Andric
2bcad0d8d6 Merge llvm, clang, compiler-rt, libc++, lld and lldb release_40 branch
r295380, and update build glue.
2017-02-17 20:07:35 +00:00
Dimitry Andric
5ca5951e31 Merge llvm, clang, compiler-rt, libc++, lld and lldb release_40 branch
r294803, and update build glue.
2017-02-11 13:58:05 +00:00
Dimitry Andric
899ca3d65f Merge llvm, clang, compiler-rt, libc++, lld and lldb release_40 branch
r294123, and update build glue.
2017-02-05 19:57:41 +00:00
Dimitry Andric
077e1117dc Merge llvm, clang, compiler-rt, libc++, lld and lldb release_40 branch
r293807, and update build glue.
2017-02-01 21:57:07 +00:00
Dimitry Andric
98221d2e7e Merge llvm, clang, compiler-rt, libc++, lld and lldb release_40 branch
r293443, and update build glue.
2017-01-29 21:56:47 +00:00
Dimitry Andric
f8496407cb Merge llvm, clang, compiler-rt, libc++, lld and lldb release_40 branch
r292951, and update build glue.
2017-01-24 19:56:22 +00:00
Dimitry Andric
94c53d4054 Merge llvm, clang, lld and lldb release_40 branch 292732, and update
build glue.
2017-01-22 18:02:44 +00:00
Dimitry Andric
f1a29dd344 Merge llvm, clang, lld and lldb release_40 branch r292009. Also update
build glue.
2017-01-14 22:12:13 +00:00
Dimitry Andric
24e2fe98d0 Merge llvm, clang, lld and lldb trunk r291476. 2017-01-09 22:32:19 +00:00
Dimitry Andric
d413188a99 Update clang and lld Version.inc files. 2017-01-06 20:25:08 +00:00
Dimitry Andric
5bd5e06ad1 Update clang and lld Version.inc files. 2017-01-04 22:32:17 +00:00
Dimitry Andric
0fc5d23818 Update lld Version.inc and libllvm/Makefile to match. 2017-01-04 18:54:20 +00:00
Dimitry Andric
09bfd04318 Initial updates to llvm/clang build glue. 2017-01-03 20:28:09 +00:00
Dimitry Andric
d246bac328 Merge llvm, clang, lld, lldb, compiler-rt and libc++ 3.9.1 release
r289601.
2016-12-16 18:30:53 +00:00
Dimitry Andric
7a83c005f5 Update llvm, clang, lld, lldb, compiler-rt and libc++ to release_39
branch r288847.
2016-12-10 15:30:39 +00:00
Dimitry Andric
5042637be1 Update build glue for clang 3.9.1 r288513. 2016-12-02 19:40:00 +00:00
Dimitry Andric
5b41a5b675 Update build glue for llvm/clang 3.9.1. 2016-11-26 01:13:53 +00:00
Dimitry Andric
d1c8d4428b Update clang to the final 3.9.0 release. There were no more code changes
since the last release candidate.
2016-09-02 19:20:27 +00:00
Bryan Drewery
dc3af96dec Use a proper comment.
Submitted by:	emaste
2016-09-01 21:02:02 +00:00
Ed Maste
901be6ecd7 Add Version.inc to set lld's version information
We might want to generate this file at build time, but for now just
provide a static copy as done with other version files.

Sponsored by:	The FreeBSD Foundation
2016-08-30 21:06:19 +00:00
Dimitry Andric
68629f0dce Update llvm to release_39 branch r279689. 2016-08-27 11:51:08 +00:00
Dimitry Andric
986e05bc2a Completely revamp the way llvm, clang and lldb are built.
* Bootstrap llvm-tblgen and clang-tblgen with a minimal llvm static
  library, that has no other dependencies.
* Roll up all separate llvm libraries into one big static libllvm.
* Similar for all separate clang and lldb static libraries.
* For all these libraries, generate their .inc files only once.
* Link all llvm tools (including extra) against the big libllvm.
* Link clang and clang-format against the big libllvm and libclang.
* Link lldb against the big libllvm, libclang and liblldb.

N.B.: This is work in progress, some details may still be missing.

It also heavily depends on bsd.*.mk's support for SRCS and DPSRCS with
relative pathnames, which apparently does not always work as expected.
For building llvm, clang and lldb though, it seems to work just fine.

The main idea behind this restructuring is maintainability and build
peformance.  The previous large number of very small libraries, each
with their own generated files and dependencies was slow to traverse
and hard to understand.

Possible future improvements:
* Only build certain targets, e.g. for most regular users having just
  one target will be fine.  This will shave off some build time.
* Building the big llvm, clang and lldb libraries as shared (private)
  libraries.
* Adding other components from the LLVM project, such as lld.
2016-08-26 22:44:22 +00:00
Dimitry Andric
a579b914e4 Update clang version information for r279477. 2016-08-24 17:45:11 +00:00
Dimitry Andric
fe73cb29ea Update generated llvm DataTypes.h header. 2016-08-23 19:57:37 +00:00
Dimitry Andric
d6c3ea5ef1 Add new intrinsics headers for 3.9.0. 2016-08-20 19:33:07 +00:00
Dimitry Andric
7fff4413af Update build glue for clang and the llvm/clang extras. 2016-08-19 17:55:34 +00:00
Dimitry Andric
c371433e4a For clang, move the definition of FREEBSD_CC_VERSION into its own header
file, lib/clang/freebsd_cc_version.h, instead of reusing Version.inc.
The header is only included from one .cpp file in the clang tree.

This minimizes the number of .cpp files that need to be rebuilt if the
version is bumped.

Discussed with:	bdrewery
2016-06-03 16:17:36 +00:00
Dimitry Andric
b5e99283f4 Pull in r271548 from upstream llvm trunk (by me):
Only attempt to detect AVG if SSE2 is available

  Summary:
  In PR29973 Sanjay Patel reported an assertion failure when a certain
  loop was optimized, for a target without SSE2 support.  It turned out
  this was because of the AVG pattern detection introduced in rL253952.

  Prevent the assertion failure by bailing out early in
  `detectAVGPattern()`, if the target does not support SSE2.

  Also add a minimized test case.

  Reviewers: congh, eli.friedman, spatel

  Subscribers: emaste, llvm-commits

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

This should fix assertion failures ("Requires at least SSE2!") when
building the games/0ad port with CPUTYPE=pentium3.

Reported by:	madpilot
2016-06-02 19:54:38 +00:00
Dimitry Andric
22dfc4860f Bump __FreeBSD_cc_version after r300974. 2016-05-30 06:44:10 +00:00
Bryan Drewery
06a6cbdf5f Add FREEBSD_CC_VERSION which will be used to define __FreeBSD_cc_version.
The WITH_SYSTEM_COMPILER build option will rely on this value to determine what
__FreeBSD_cc_version the source tree will produce.  This value will be compared
against the /usr/bin/cc value to determine if a new compiler is needed.

Start with 1100002 which is 1 more than than the value we've had since
3.8.0 to ensure that all changes since then are present.

Reviewed by:	dim
Sponsored by:	EMC / Isilon Storage Division
2016-05-21 01:32:20 +00:00
Dimitry Andric
1b9b7a135c Update llvm and clang to 3.8.0 release. 2016-03-03 22:50:52 +00:00
Dimitry Andric
09a17a1e45 Update llvm and clang to release_38 branch r261684. 2016-02-24 22:07:56 +00:00
Dimitry Andric
ce479d84f4 Update llvm and clang to release_38 branch r261369. 2016-02-21 16:23:44 +00:00
Dimitry Andric
a8bcc4d878 Update llvm, clang and lldb to release_38 branch r260756. 2016-02-13 15:58:51 +00:00
Dimitry Andric
21cf1fd41c Update llvm, clang and lldb to release_38 branch r258968. 2016-01-27 22:48:52 +00:00
Dimitry Andric
8c24ff90c4 Update llvm and clang to release_38 branch r258549. 2016-01-22 21:50:08 +00:00
Dimitry Andric
42d8074a70 Update llvm/clang build glue. 2016-01-16 17:49:29 +00:00
Dimitry Andric
444ed5c5eb Update llvm, clang and lldb to trunk r257626, and update build glue. 2016-01-14 17:42:46 +00:00
Dimitry Andric
db3ae65e86 Update llvm/clang svn revision. 2016-01-06 21:26:57 +00:00
Dimitry Andric
f3304b8db5 Add new pkuintrin.h intrinsics header. 2016-01-06 21:26:31 +00:00
Dimitry Andric
34cdd77646 First part of updating llvm/clang build glue: getting llvm-tblgen,
clang-tblgen and clang itself built.
2015-12-31 14:39:45 +00:00
Dimitry Andric
802df53c82 Update various build glue files for the new llvm/clang version number. 2015-12-30 18:52:29 +00:00
Dimitry Andric
250e909a40 Update clang's Version.inc file, and regenerate various generated
configuration headers (these used to be generated by autoconf, but
upstream has deprecated autoconf in favor of CMake).
2015-12-30 18:23:01 +00:00
Dimitry Andric
9a4b31181f Upgrade our copies of clang and llvm to 3.7.1 release. This is a
bugfix-only release, with no new features.

Please note that from 3.5.0 onwards, clang and llvm require C++11
support to build; see UPDATING for more information.
2015-12-25 21:39:45 +00:00
Bryan Drewery
0383be9bae META MODE: Fix rebuilding of lib/clang/include after clang-tblgen.host is
staged.

None of usr.bin/clang/clang-tblgen or its dependencies need
lib/clang/include, so there is no cyclic dependency here to worry about.
The issue came about because of workarounds to dependencies on clang
being optional.

Without this, the clang-tblgen called during the build would change
after it was staged for the host.  This would cause lib/clang/include to
rebuild due to changed build commands.

Sponsored by:	EMC / Isilon Storage Division
2015-12-01 05:18:59 +00:00
Dimitry Andric
e9ae01703c Switch the default OpenMP runtime for clang to libomp (from the LLVM
project), as libgomp is not supported anyway.  You can use the
devel/llvm-devel port to install a recent copy of the OpenMP runtime.
2015-10-18 17:18:19 +00:00
Dimitry Andric
65dcb5bcb1 Merge ^/head r288197 through r288456. 2015-10-01 19:02:45 +00:00
Bryan Drewery
660d1f65bb Add missing CLEANFILES.
MFC after:	1 week
Sponsored by:	EMC / Isilon Storage Division
2015-09-24 23:15:24 +00:00
Dimitry Andric
b1fa820d8b Don't install Intrin.h, as this is an intrinsics header for Windows. 2015-09-20 21:39:55 +00:00
Dimitry Andric
b6c25e0ef3 Update llvm, clang and lldb to 3.7.0 release. 2015-09-06 19:58:48 +00:00
Dimitry Andric
875ed54817 Update llvm/clang to r242221. 2015-08-12 18:31:11 +00:00
Dimitry Andric
3dac3a9bad Update llvm/clang to r241361. 2015-07-05 22:34:42 +00:00
Dimitry Andric
cc38b6408e Update llvm/clang build glue. 2015-06-23 18:46:29 +00:00
Dimitry Andric
76aeda8ad4 Merge ^/head r284188 through r284643. 2015-06-20 19:34:50 +00:00
Simon J. Gerraty
ccfb965433 Add META_MODE support.
Off by default, build behaves normally.
WITH_META_MODE we get auto objdir creation, the ability to
start build from anywhere in the tree.

Still need to add real targets under targets/ to build packages.

Differential Revision:       D2796
Reviewed by: brooks imp
2015-06-13 19:20:56 +00:00
Dimitry Andric
97bc6c731e Update Makefiles and other build glue for llvm/clang 3.7.0, as of trunk
r239412.
2015-06-10 19:12:52 +00:00
Simon J. Gerraty
44d314f704 dirdeps.mk now sets DEP_RELDIR 2015-06-08 23:35:17 +00:00
Dimitry Andric
ebeff3f9b4 Update Makefiles and other build glue for llvm/clang 3.7.0, as of trunk
r238337.
2015-05-30 15:39:49 +00:00
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
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
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
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
Simon J. Gerraty
ee7b0571c2 Merge head from 7/28 2014-08-19 06:50:54 +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
Simon J. Gerraty
e2b820a948 Avoid circular dependency 2014-05-16 14:54:29 +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
Simon J. Gerraty
3b8f084595 Merge head 2014-04-28 07:50:45 +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
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
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
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
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
David E. O'Brien
d9a447559b Sync with HEAD. 2013-02-08 16:10:16 +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
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
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
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
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
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
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
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
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
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
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
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
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
Roman Divacky
47c832c3dd Import the build makefiles for clang/LLVM.
Approved by:	ed (mentor)
2010-06-09 19:32:20 +00:00