Commit graph

290 commits

Author SHA1 Message Date
Dimitry Andric 621cbb9437 Regenerate clang man page after upstream change to document the possible
values for the -std= option.

Noticed by:	Steve Kargl
Obtained from:	https://reviews.llvm.org/rL329827
MFC after:	3 days
2018-04-11 18:39:47 +00:00
Ed Maste 1b49115a40 Promote llvm-cov to a standalone option
Introduce WITH_/WITHOUT_LLVM_COV to match GCC's WITH_/WITHOUT_GCOV.
It is intended to provide a superset of the interface and functionality
of gcov.

It is enabled by default when building Clang, similarly to gcov and GCC.

This change moves one file in libllvm to be compiled unconditionally.
Previously it was included only when WITH_CLANG_EXTRAS was set, but the
complexity of a new special case for (CLANG_EXTRAS | LLVM_COV) is not
worth avoiding a tiny increase in build time.

Reviewed by:	dim, imp
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D142645
2018-02-10 00:22:35 +00:00
Ed Maste 18f201e79c ld.lld.1: explain long options may use one or two dashes 2018-02-08 00:09:17 +00:00
Ed Maste c62c1fe23e Update ld.lld.1 based on the version committed upstream 2018-02-07 23:58:00 +00:00
Ed Maste 5725799a3b ld.lld.1: miscellaneous style improvements
Submitted by:	wblock in review D13813
2018-02-02 21:52:00 +00:00
Dimitry Andric 62bd626920 Build llvm-extract with -lz, and add a few objects to liblldb, both of
which turn out to be needed when you don't use -ffunction-sections.

Reported by:	Shawn Webb <shawn.webb@hardenedbsd.org>
2018-01-13 13:53:05 +00:00
Dimitry Andric c79126f2e4 Merge ^/head r327624 through r327885. 2018-01-12 18:23:35 +00:00
Ed Maste 71e8c9b65d lld: introduce basic man page
Upstream lld has no man page. Introduce a basic one for FreeBSD based on
ld.lld --help, with a brief introduction and additional detail for some
options.

We'll continue refining this in FreeBSD, and then submit it upstream once
the first round of edits are complete.

Submitted by:	krion, Arshan Khanifar, emaste, bjk
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D13813
2018-01-10 16:01:25 +00:00
Dimitry Andric 747dcddd1d Regenerate clang manpage. 2017-12-24 13:06:37 +00:00
Dimitry Andric 7435ffaa83 Regenerate llvm tools manpages, and add one for llvm-pbdutil. 2017-12-24 13:02:43 +00:00
Dimitry Andric 5e00e53008 Minimize library dependencies for some llvm tools. 2017-12-24 12:42:30 +00:00
Dimitry Andric 9509d906c1 Add new llvm-objcopy utility, enabled when MK_CLANG_EXTRAS=yes. 2017-12-24 12:36:31 +00:00
Dimitry Andric 2757ff7e2f Update clang, lld and llvm version numbers for r321414, and update build
glue.
2017-12-24 12:32:55 +00:00
Dimitry Andric 7bfc2d0f8e Next step in updating llvm/clang build glue: make lld build. 2017-12-22 16:27:29 +00:00
Dimitry Andric 3cd201a12f Next step in updating llvm/clang build glue: make the optional llvm and
clang tools build.
2017-12-22 13:28:10 +00:00
Dimitry Andric 36cb3905c9 First step in updating llvm/clang build glue: make only the clang
executable build.
2017-12-21 21:24:52 +00:00
Bryan Drewery ea825d0274 DIRDEPS_BUILD: Update dependencies.
Sponsored by:	Dell EMC Isilon
2017-10-31 00:07:04 +00:00
John Baldwin de6feefdb7 Improve the coverage of debug symbols for MK_DEBUG_FILES.
- Include debug symbols in static libraries.  This permits binaries
  to include debug symbols for functions obtained from static libraries.
- Permit the C/C++ compiler flags added for MK_DEBUG_FILES to be
  overridden by setting DEBUG_FILES_CFLAGS.  Use this to limit the debug
  information for llvm libraries and binaries.

Reviewed by:	emaste
Sponsored by:	DARPA / AFRL
Differential Revision:	https://reviews.freebsd.org/D12025
2017-08-23 23:30:25 +00:00
Dimitry Andric c439438675 Merge llvm, clang, lld, lldb, compiler-rt and libc++ r307894, and update
build glue.
2017-07-13 21:58:45 +00:00
Dimitry Andric a580b01494 Merge llvm, clang, lld, lldb, compiler-rt and libc++ r306956, and update
build glue.
2017-07-02 11:41:15 +00:00
Dimitry Andric edd7eaddc8 Merge llvm, clang, lld, lldb, compiler-rt and libc++ r306325, and update
build glue.
2017-06-27 06:40:39 +00:00
Dimitry Andric 24d58133b7 Merge llvm, clang, lld, lldb, compiler-rt and libc++ r305575, and update
build glue.
2017-06-17 00:09:34 +00:00
Dimitry Andric db17bf38c5 Merge llvm, clang, lld, lldb, compiler-rt and libc++ r305145, and update
build glue.
2017-06-10 19:17:14 +00:00
Dimitry Andric f9448bf33f Merge llvm, clang, lld, lldb, compiler-rt and libc++ r304460, and update
build glue.
2017-06-01 22:47:02 +00:00
Dimitry Andric 302affcb04 Merge llvm, clang, lld, lldb, compiler-rt and libc++ r304149, and update
build glue.
2017-05-29 22:09:23 +00:00
Dimitry Andric 5517e702c0 Merge llvm, clang, lld, lldb, compiler-rt and libc++ r303197, and update
build glue.
2017-05-16 21:50:29 +00:00
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 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 b33474c89f Strip out a few objects from libclang, liblldb and lldb, which are not
referenced due to the selection of tools that we build, and our compile
time options.
2017-04-21 21:06:11 +00:00
Dimitry Andric 482a8244bf Update some more build glue. All llvm extras, lld and lldb should link now. 2017-04-21 15:59:58 +00:00
Dimitry Andric f8bb7d0f87 Add new objects to usr.bin/clang/lld for the MK_LLD=yes case. 2017-04-18 19:15:06 +00:00
Dimitry Andric 050e2df194 Add new objects to lib/clang/lib{llvm,clang} and usr.bin/clang for the
MK_CLANG_EXTRAS=yes case.
2017-04-18 17:39:20 +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 14f850f3df Merge ^/head r312720 through r312893. 2017-01-27 20:01:46 +00:00
Ed Maste f52e4bdfd7 Rename LLD_AS_LD to LLD_IS_LD, for consistency with CLANG_IS_CC
Reported by:	Dan McGregor <dan.mcgregor usask.ca>
2017-01-27 01:59:12 +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 69415bc524 Merge ^/head r311546 through r311683. 2017-01-08 14:36:18 +00:00
Dimitry Andric dc6e1047ce Link llvm-ar to llvm-ranlib, if WITH_CLANG_EXTRAS is enabled. When
invoked as llvm-ranlib, it can create an archive symbol table for
archives of objects compiled for LTO by an LLVM compiler.

Submitted by:	Dan McGregor <danismostlikely@gmail.com>
MFC after:	3 days
2017-01-06 23:05:29 +00:00
Dimitry Andric 281264c5d1 Add new llvm-{cxxfilt,lto2,modextract,xray} tools. 2017-01-04 21:47:39 +00:00
Dimitry Andric d5e9498269 Fix double-dollar typo in lld Makefile. 2017-01-04 20:56:03 +00:00
Dimitry Andric 1419873d24 Update lld Makefile. 2017-01-04 18:53:35 +00:00
Dimitry Andric 51d027f2a4 Update llvm-cov and llvm-pdbdump Makefiles. 2017-01-04 18:53:25 +00:00
Dimitry Andric 09bfd04318 Initial updates to llvm/clang build glue. 2017-01-03 20:28:09 +00:00
Dimitry Andric 30d4828e63 Reapply 310775, now it also builds correctly if lldb is disabled:
Move llvm-objdump from CLANG_EXTRAS to installed by default

We currently install three tools from binutils 2.17.50: as, ld, and
objdump. Work is underway to migrate to a permissively-licensed
tool-chain, with one goal being the retirement of binutils 2.17.50.

LLVM's llvm-objdump is intended to be compatible with GNU objdump
although it is currently missing some options and may have formatting
differences. Enable it by default for testing and further investigation.
It may later be changed to install as /usr/bin/objdump, it becomes a
fully viable replacement.

Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D8879
2016-12-30 18:00:31 +00:00
Dimitry Andric a222710ce2 Revert r310775 for now, until we can figure out why it does not seem to
work properly when cross-building.  Sorry for the breakage.
2016-12-29 21:57:16 +00:00
Dimitry Andric 1357722508 Move llvm-objdump from CLANG_EXTRAS to installed by default
We currently install three tools from binutils 2.17.50: as, ld, and
objdump. Work is underway to migrate to a permissively-licensed
tool-chain, with one goal being the retirement of binutils 2.17.50.

LLVM's llvm-objdump is intended to be compatible with GNU objdump
although it is currently missing some options and may have formatting
differences. Enable it by default for testing and further investigation.
It may later be changed to install as /usr/bin/objdump, it becomes a
fully viable replacement.

Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D8879
2016-12-29 13:27:04 +00:00
Dimitry Andric 8930262bce Fix packaging for clang, lldb and lld 3.9.0
During the upgrade of clang/llvm etc to 3.9.0 in r309124, the PACKAGE
directive in the usr.bin/clang/*.mk files got dropped accidentally.

Restore it, with a few minor changes and additions:
* Correct license in clang.ucl to NCSA
* Add PACKAGE=clang for clang and most of the "ll" tools
* Put lldb in its own package
* Put lld in its own package

Reviewed by:	gjb, jmallett
X-MFC-With:	309124
Differential Revision: https://reviews.freebsd.org/D8666
2016-11-28 20:13:56 +00:00
Ed Maste 0aa5466e7d Add WITH_LLD_AS_LD build knob
If set it installs LLD as /usr/bin/ld.  LLD (as of version 3.9) is not
capable of linking the world and kernel, but can self-host and link many
substantial applications. GNU ld continues to be used for the world and
kernel build, regardless of how this knob is set.

It is on by default for arm64, and off for all other CPU architectures.

Sponsored by:	The FreeBSD Foundation
2016-11-25 13:15:28 +00:00
Ed Maste 28a116bab4 Correct lld llvm-tblgen dependency file name 2016-11-25 01:24:35 +00:00
Ed Maste 826e43974c lld: use ${SRCDIR} instead of ${.CURDIR}-relative path 2016-09-28 19:15:46 +00:00
Dimitry Andric 4c1492a1aa Fix sneaky typo in lld's Makefile: s/OBJOP/OBJTOP/ 2016-09-10 16:08:50 +00:00
Dimitry Andric 084b3adb03 Some further micro-optimizations for the libllvm and lldb build. 2016-09-04 16:54:55 +00:00
Dimitry Andric b989893ac8 Undo r305299, since it also sets up BINDIR, via usr.bin/Makefile.inc.
Just set WARNS to zero instead.
2016-09-02 20:07:05 +00:00
Dimitry Andric 710f7c3aa1 For now, undo the WARNS=3 setting for the clang and llvm tools. More
work needs to be done first to get everything compiling without warnings.
2016-09-02 19:26:39 +00:00
Bryan Drewery 08e3200cd3 DIRDEPS_BUILD: Connect lld.
Sponsored by:	EMC / Isilon Storage Division
2016-09-01 21:03:27 +00:00
Bryan Drewery 03165addb5 DIRDEPS_BUILD: Connect the new clang build.
Sponsored by:	EMC / Isilon Storage Division
2016-09-01 20:38:59 +00:00
Bryan Drewery 7d969b1d9b DIRDEPS_BUILD: Use libllvmminimal for tblgen for the host build.
The host tools are only ever built for the same reason as TOOLS_PREFIX, for running
during the build.

Sponsored by:	EMC / Isilon Storage Division
2016-09-01 18:35:37 +00:00
Ed Maste 75bc38b916 Add WITH_/WITHOUT_LLD knobs to enable the lld linker
Use this to control inclusion of the libllvm functionality required
by lld. Enable by default on arm64 and amd64, the two platforms where
lld is most usable for testing.

Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D7713
2016-08-31 21:18:38 +00:00
Ed Maste adbee1887f Add lld Makefile
Sponsored by:	The FreeBSD Foundation
2016-08-30 21:08:45 +00:00
Dimitry Andric e92a9ae100 Compile clang, lldb and related tools with WARNS=3 by default. 2016-08-27 16:01:10 +00:00
Dimitry Andric 01d8757d3d Centralize where LLVM_SRCS, CLANG_SRCS and LLDB_SRCS are defined. 2016-08-27 10:00:33 +00:00
Dimitry Andric c9bab4efb0 Missed one .mk file where OBJTOP can be used. 2016-08-27 09:51:57 +00:00
Dimitry Andric e1cd768299 Use SRCTOP and OBJTOP throughout the llvm/clang/lldb build. 2016-08-27 09:29:39 +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 113c14a010 Don't link the clang executable with unnecessary libraries. 2016-08-20 19:33:55 +00:00
Dimitry Andric 9228435a16 Update build glue for lldb. Also comment out parts of the
initialization and termination code which reference plugins and
components that we don't use.
2016-08-20 18:45:25 +00:00
Dimitry Andric 7fff4413af Update build glue for clang and the llvm/clang extras. 2016-08-19 17:55:34 +00:00
Bryan Drewery bc2abcfdef Add clang-format under WITH_CLANG_EXTRAS.
Reviewed by:	dim
Approved by:	re (gjb)
Sponsored by:	EMC / Isilon Storage Division
Differential Revision:	https://reviews.freebsd.org/D6856
2016-06-17 16:46:58 +00:00
Glen Barber 7d536dc855 MFH
Sponsored by:	The FreeBSD Foundation
2016-03-10 21:16:01 +00:00
Bryan Drewery f51eac06ce DIRDEPS_BUILD: Update clang dependencies after r296417.
Sponsored by:	EMC / Isilon Storage Division
2016-03-08 21:26:44 +00:00
Glen Barber b655ec9752 MFH
Sponsored by:	The FreeBSD Foundation
2016-03-06 04:13:17 +00:00
Dimitry Andric ada554fc20 Regenerate llvm and clang manpages. 2016-03-03 23:09:57 +00:00
Glen Barber 52259a98ad MFH
Sponsored by:	The FreeBSD Foundation
2016-03-02 16:14:46 +00:00
Dimitry Andric 14e9c9161c Merge ^/head r295902 through r296006. 2016-02-24 21:38:51 +00:00
Bryan Drewery bd18fd57db DIRDEPS_BUILD: Regenerate without local dependencies.
These are no longer needed after the recent 'beforebuild: depend' changes
and hooking DIRDEPS_BUILD into a subset of FAST_DEPEND which supports
skipping 'make depend'.

Sponsored by:	EMC / Isilon Storage Division
2016-02-24 17:20:11 +00:00
Glen Barber 317cec3c43 MFH
Sponsored by:	The FreeBSD Foundation
2016-02-22 12:28:23 +00:00
Dimitry Andric 9893f787ec Merge ^/head r295601 through r295844. 2016-02-21 13:49:26 +00:00
Bryan Drewery af96ced5c5 DIRDEPS_BUILD: Add dependencies somehow missed in r295681.
Sponsored by:	EMC / Isilon Storage Division
2016-02-19 00:41:38 +00:00
Glen Barber 72c3aa02dc MFH
Sponsored by:	The FreeBSD Foundation
2016-02-18 00:37:58 +00:00
Bryan Drewery 6b128c1707 DIRDEPS_BUILD: Hookup CLANG_EXTRAS.
Sponsored by:	EMC / Isilon Storage Division
2016-02-16 23:11:09 +00:00
Glen Barber 59d43d11fe MFH
Sponsored by:	The FreeBSD Foundation
2016-01-20 09:50:54 +00:00
Dimitry Andric 7f38eb34e2 Merge ^/head r293850 through r294089. 2016-01-15 17:55:00 +00:00
Andrew Turner c455b92483 Set -mlong-calls where needed to get a static clang and lldb 3.8.0
linking. These are too large for a branch instruction to branch from an
earlier point in the code to somewhere later.

This will also allow these to be build with Thumb-2 when we get this
infrastructure.

Reviewed by:	dim
Differential Revision:	https://reviews.freebsd.org/D4855
2016-01-14 19:00:13 +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 dbc595b2ae Some additional llvm tools need libz. While here, consistently use
LIBADD+=.
2016-01-06 21:28:39 +00:00
Glen Barber 7d2c986e47 Fix mis-merged LDADD/DPADD
Sponsored by:	The FreeBSD Foundation
2016-01-05 16:08:26 +00:00
Glen Barber b626f5a73a MFH r289384-r293170
Sponsored by:	The FreeBSD Foundation
2016-01-04 19:19:48 +00:00
Ed Maste 0a97e59728 Update build infrastructure for LLDB 3.8 2016-01-04 00:02:58 +00:00
Dimitry Andric ffa548ae3e Next part of updating llvm/clang build glue: getting the
WITH_CLANG_EXTRAS tools built.
2015-12-31 17:37:35 +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 28db8b1226 Drop the clang patch which adds recognition of 'CC' suffixes as aliases
for --driver-mode=g++, since this was never upstreamed.  For backwards
compatibility, add a wrapper shell script.

MFC after:	1 week
2015-12-30 16:14:30 +00:00
Bryan Drewery 1ef7db0f31 Use LIBADD for pthread.
Sponsored by:	EMC / Isilon Storage Division
2015-12-10 01:16:22 +00:00
Bryan Drewery b2fe867a0f DIRDEPS_BUILD: Update dependencies.
Sponsored by:	EMC / Isilon Storage Division
2015-12-07 23:53:01 +00:00
Bryan Drewery eacae6dc66 Fix LDADD/DPADD that should be LIBADD.
Sponsored by:	EMC / Isilon Storage Division
2015-12-04 03:17:47 +00:00
Bryan Drewery b1f92fa229 META MODE: Update dependencies with 'the-lot' and add missing directories.
This is not properly respecting WITHOUT or ARCH dependencies in target/.
Doing so requires a massive effort to rework targets/ to do so.  A
better approach will be to either include the SUBDIR Makefiles directly
and map to DIRDEPS or just dynamically lookup the SUBDIR.  These lose
the benefit of having a userland/lib, userland/libexec, etc, though and
results in a massive package.  The current implementation of targets/ is
very unmaintainable.

Currently rescue/rescue and sys/modules are still not connected.

Sponsored by:	EMC / Isilon Storage Division
2015-12-01 05:23:19 +00:00
Baptiste Daroussin 9be27fdc00 Merge from head 2015-10-09 22:45:54 +00:00
Baptiste Daroussin b5ff185e19 Merge from head 2015-09-12 11:41:31 +00:00
Dimitry Andric 999971f7f7 Minimize the number of files compiled for clang only (e.g. when neither
WITH_CLANG_EXTRAS nor WITH_LLDB is in effect).
2015-09-06 22:02:13 +00:00
Dimitry Andric 875ed54817 Update llvm/clang to r242221. 2015-08-12 18:31:11 +00:00
Dimitry Andric 635b2e1e5a Merge ^/head r285153 through r285283. 2015-07-08 18:43:55 +00:00
Ed Maste 0b0796a3dc lldb: use .PATH to find man page instead of symlinking it
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
2015-07-07 18:46:41 +00:00
Dimitry Andric 3dac3a9bad Update llvm/clang to r241361. 2015-07-05 22:34:42 +00:00
Ed Maste 1c3bbb013d Update LLDB snapshot to upstream r241361
Notable upstream commits (upstream revision in parens):

- Add a JSON producer to LLDB (228636)
- Don't crash on bad DWARF expression (228729)
- Add support of DWARFv3 DW_OP_form_tls_address (231342)
- Assembly profiler for MIPS64 (232619)
- Handle FreeBSD/arm64 core files (233273)
- Read/Write register for MIPS64 (233685)
- Rework LLDB system initialization (233758)
- SysV ABI for aarch64 (236098)
- MIPS software single stepping (236696)
- FreeBSD/arm live debugging support (237303)
- Assembly profiler for mips32 (237420)
- Parse function name from DWARF DW_AT_abstract_origin (238307)
- Improve LLDB prompt handling (238313)
- Add real time signals support to FreeBSDSignals (238316)
- Fix race in IOHandlerProcessSTDIO (238423)
- MIPS64 Branch instruction emulation for SW single stepping (238820)
- Improve OSType initialization in elf object file's arch_spec (239148)
- Emulation of MIPS64 floating-point branch instructions (239996)
- ABI Plugin for MIPS32 (239997)
- ABI Plugin for MIPS64 (240123)
- MIPS32 branch emulation and single stepping (240373)
- Improve instruction emulation based stack unwinding on ARM (240533)
- Add branch emulation to aarch64 instruction emulator (240769)
2015-07-04 01:02:43 +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
Baptiste Daroussin 2fbd60ec47 Merge from head @274131 2015-06-20 00:58:46 +00:00
Simon J. Gerraty 2ef6d5a7b9 new depends 2015-06-16 23:37:19 +00:00
Baptiste Daroussin 9067d50812 Move clang binaries into FreeBSD-clang package 2015-06-16 20:34:39 +00:00
Baptiste Daroussin d9c8ae62f4 Convert to LIBADD 2015-06-15 21:20:52 +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 fe2efc8c43 Add the llvm-cov and llvm-profdata tools, when WITH_CLANG_EXTRAS is
defined.  These help with processing coverage and profile data.
2015-04-03 19:43:39 +00:00
Dimitry Andric 07f4251006 Regenerated llvm/clang manpages. 2015-03-14 19:22:15 +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 1ae6788e51 Update llvm and clang library and binary Makefiles for 3.6.0 rc1. 2015-01-26 18:48:27 +00:00
Dimitry Andric c369979c46 Add the llvm-symbolizer tool, which enables the sanitizers to report
more complete debugging information.  This tools is only enabled when
WITH_CLANG_EXTRAS is on.

Submitted by:	Dan McGregor <danismostlikely@gmail.com>
2015-01-10 22:22:42 +00:00
Dimitry Andric f91be99b1f Remove a few redundant DPADD/LDADD pairs in llvm utilities. 2015-01-10 22:11:49 +00:00
Dimitry Andric 559f16f0dd Regenerate the manpages for the additional llvm/clang tools. This
contains only very minor updates.
2015-01-10 21:44:31 +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 046ffce1c3 Update llvm and clang binary Makefiles. 2014-11-24 19:47:59 +00:00
Baptiste Daroussin b156563c0c Regenerate the manpage in mdoc(7) format using pod2mdoc
Now mandoc can render the manpage properly
2014-11-23 22:16:43 +00:00
Simon J. Gerraty 9268022b74 Merge from head@274682 2014-11-19 01:07:58 +00:00
Enji Cooper e5516195c6 Convert LIBCURSES to LIBNCURSES to fix "make checkdpadd"
Also, add a missing LIBPANEL dependency for lldb

Approved by: rpaulo (mentor)
Suggested by: brooks
MFC after: 5 days
Phabric: D675 (as part of a larger diff)
PR: 192762
2014-08-26 09:10:28 +00:00
Bryan Drewery 5608fd23c2 Revert r267233 for now. PIE support needs to be reworked.
1. 50+% of NO_PIE use is fixed by adding -fPIC to INTERNALLIB and other
   build-only utility libraries.
2. Another 40% is fixed by generating _pic.a variants of various libraries.
3. Some of the NO_PIE use is a bit absurd as it is disabling PIE (and ASLR)
   where it never would work anyhow, such as csu or loader. This suggests
   there may be better ways of adding support to the tree. Many of these
   cases can be fixed such that -fPIE will work but there is really no
   reason to have it in those cases.
4. Some of the uses are working around hacks done to some Makefiles that are
   really building libraries but have been using bsd.prog.mk because the code
   is cleaner. Had they been using bsd.lib.mk then NO_PIE would not have
   been needed.

We likely do want to enable PIE by default (opt-out) for non-tree consumers
(such as ports). For in-tree though we probably want to only enable PIE
(opt-in) for common attack targets such as remote service daemons and setuid
utilities. This is also a great performance compromise since ASLR is expected
to reduce performance. As such it does not make sense to enable it in all
utilities such as ls(1) that have little benefit to having it enabled.

Reported by:	kib
2014-08-19 15:04:32 +00:00
Simon J. Gerraty ee7b0571c2 Merge head from 7/28 2014-08-19 06:50:54 +00:00
Brooks Davis 80189b3b09 Replace all uses of libncurses and libtermcap with their wide character
variants.  This allows usable file system images (i.e. those with both a
shell and an editor) to be created with only one copy of the curses library.

Exp-run:	antoine
PR:		189842
Discussed with:	bapt
Sponsored by:	DARPA, AFRL
2014-07-17 18:24:34 +00:00
Bryan Drewery 864c53ead8 In preparation for ASLR [1] support add WITH_PIE to support building with -fPIE.
This is currently an opt-in build flag. Once ASLR support is ready and stable
it should changed to opt-out and be enabled by default along with ASLR.

Each application Makefile uses opt-out to ensure that ASLR will be enabled by
default in new directories when the system is compiled with PIE/ASLR. [2]

Mark known build failures as NO_PIE for now.

The only known runtime failure was rtld.

[1] http://www.bsdcan.org/2014/schedule/events/452.en.html
Submitted by:		Shawn Webb <lattera@gmail.com>
Discussed between:	des@ and Shawn Webb [2]
2014-06-08 17:29:31 +00:00
Simon J. Gerraty 9ac5c14c93 Pay attention to MK_SHARED_TOOLCHAIN 2014-05-16 15:02:12 +00:00
Simon J. Gerraty fae50821ae Updated dependencies 2014-05-16 14:09:51 +00:00
Simon J. Gerraty 9a08faa5bf Updated depends 2014-05-10 21:53:07 +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
Warner Losh 3bdf775801 NO_MAN= has been deprecated in favor of MAN= for some time, go ahead
and finish the job. ncurses is now the only Makefile in the tree that
uses it since it wasn't a simple mechanical change, and will be
addressed in a future commit.
2014-04-13 05:21:56 +00:00
Dimitry Andric 32a632c401 Enable parallel building for gnu/usr.bin and usr.bin/clang too.
MFC after:	2 weeks
X-MFC-With:	r263778
2014-03-27 20:15:33 +00:00
Dimitry Andric 21efc33edc Apply fix for lldb not linking after the sparc backend import.
Reported by:	se
Pointy hat to:	dim
2014-03-01 16:07:17 +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 5eef691b3e Update LLDB bmake build for r262187
Sponsored by:	DARPA, AFRL
2014-02-18 20:25:02 +00:00
Ed Maste adacc0725e Update lldb for clang/llvm 3.4 import
This commit largely restores the lldb source to the upstream r196259
snapshot with the addition of threaded inferior support and a few bug
fixes.

Specific upstream lldb revisions restored include:
   SVN      git
  181387  779e6ac
  181703  7bef4e2
  182099  b31044e
  182650  f2dcf35
  182683  0d91b80
  183862  15c1774
  183929  99447a6
  184177  0b2934b
  184948  4dc3761
  184954  007e7bc
  186990  eebd175

Sponsored by:	DARPA, AFRL
2014-02-17 18:50:03 +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 3caf0790a8 Merge head@256284 2013-10-13 02:35:19 +00:00