History log of /freebsd-10.0-release/contrib/llvm/
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
259278 12-Dec-2013 dim

Merge r259214 from stable/10 (head r259100):

Pull in r196658 from upstream clang trunk:

CodeGen: Don't emit linkage on thunks that aren't emitted because they're
vararg.

This can happen when we're trying to emit a thunk with available_externally
linkage with optimization enabled but bail because it doesn't make sense for
vararg functions.

[LLVM] PR18098.

This should fix clang "Broken module found, compilation aborted" errors when
building the qt4-based dvbcut port.

Reported by: se
Approved by: re (glebius)

259128 09-Dec-2013 gjb

Remove svn:mergeinfo from the releng/10.0 branch.

After branch creation from stable/10, the stable/10 branch mergeinfo
was moved to the root of the branch.

Since there have not been any merges from stable/10 to releng/10.0
yet, we do not need to track any of the existing mergeinfo here.

Merges to releng/10.0 should now be done to the root of the branch.

For future branches during the release cycle, unless otherwise noted,
this change will be done as part of the stable/ and releng/ branch
creation.

Discussed with: peter
Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


/freebsd-10.0-release/MAINTAINERS
/freebsd-10.0-release/Makefile.inc1
/freebsd-10.0-release/ObsoleteFiles.inc
/freebsd-10.0-release/UPDATING
/freebsd-10.0-release/bin/df
/freebsd-10.0-release/bin/freebsd-version
/freebsd-10.0-release/cddl
/freebsd-10.0-release/cddl/contrib/opensolaris
/freebsd-10.0-release/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print
/freebsd-10.0-release/cddl/contrib/opensolaris/cmd/zfs
/freebsd-10.0-release/cddl/contrib/opensolaris/lib/libzfs
/freebsd-10.0-release/contrib/apr
/freebsd-10.0-release/contrib/apr-util
/freebsd-10.0-release/contrib/atf
/freebsd-10.0-release/contrib/binutils
/freebsd-10.0-release/contrib/bmake
/freebsd-10.0-release/contrib/byacc
/freebsd-10.0-release/contrib/bzip2
/freebsd-10.0-release/contrib/com_err
/freebsd-10.0-release/contrib/compiler-rt
/freebsd-10.0-release/contrib/dialog
/freebsd-10.0-release/contrib/dtc
/freebsd-10.0-release/contrib/ee
/freebsd-10.0-release/contrib/expat
/freebsd-10.0-release/contrib/file
/freebsd-10.0-release/contrib/gcc
/freebsd-10.0-release/contrib/gdb
/freebsd-10.0-release/contrib/gdtoa
/freebsd-10.0-release/contrib/groff
/freebsd-10.0-release/contrib/ipfilter
/freebsd-10.0-release/contrib/ipfilter/ml_ipl.c
/freebsd-10.0-release/contrib/ipfilter/mlfk_ipl.c
/freebsd-10.0-release/contrib/ipfilter/mlh_rule.c
/freebsd-10.0-release/contrib/ipfilter/mli_ipl.c
/freebsd-10.0-release/contrib/ipfilter/mln_ipl.c
/freebsd-10.0-release/contrib/ipfilter/mls_ipl.c
/freebsd-10.0-release/contrib/ldns
/freebsd-10.0-release/contrib/less
/freebsd-10.0-release/contrib/libarchive
/freebsd-10.0-release/contrib/libarchive/cpio
/freebsd-10.0-release/contrib/libarchive/libarchive
/freebsd-10.0-release/contrib/libarchive/libarchive_fe
/freebsd-10.0-release/contrib/libarchive/tar
/freebsd-10.0-release/contrib/libc++
/freebsd-10.0-release/contrib/libc-vis
/freebsd-10.0-release/contrib/libcxxrt
/freebsd-10.0-release/contrib/libexecinfo
/freebsd-10.0-release/contrib/libpcap
/freebsd-10.0-release/contrib/libstdc++
/freebsd-10.0-release/contrib/llvm
tools/clang
/freebsd-10.0-release/contrib/mtree
/freebsd-10.0-release/contrib/ncurses
/freebsd-10.0-release/contrib/netcat
/freebsd-10.0-release/contrib/ntp
/freebsd-10.0-release/contrib/nvi
/freebsd-10.0-release/contrib/one-true-awk
/freebsd-10.0-release/contrib/openbsm
/freebsd-10.0-release/contrib/openpam
/freebsd-10.0-release/contrib/openresolv
/freebsd-10.0-release/contrib/pf
/freebsd-10.0-release/contrib/sendmail
/freebsd-10.0-release/contrib/serf
/freebsd-10.0-release/contrib/smbfs
/freebsd-10.0-release/contrib/subversion
/freebsd-10.0-release/contrib/tcpdump
/freebsd-10.0-release/contrib/tcsh
/freebsd-10.0-release/contrib/tnftp
/freebsd-10.0-release/contrib/top
/freebsd-10.0-release/contrib/top/install-sh
/freebsd-10.0-release/contrib/tzcode/stdtime
/freebsd-10.0-release/contrib/tzcode/zic
/freebsd-10.0-release/contrib/tzdata
/freebsd-10.0-release/contrib/unbound
/freebsd-10.0-release/contrib/wpa
/freebsd-10.0-release/contrib/xz
/freebsd-10.0-release/crypto/heimdal
/freebsd-10.0-release/crypto/openssh
/freebsd-10.0-release/crypto/openssl
/freebsd-10.0-release/etc
/freebsd-10.0-release/etc/rc.d
/freebsd-10.0-release/gnu/lib
/freebsd-10.0-release/gnu/usr.bin/binutils
/freebsd-10.0-release/gnu/usr.bin/cc/cc_tools
/freebsd-10.0-release/gnu/usr.bin/gdb
/freebsd-10.0-release/include
/freebsd-10.0-release/lib
/freebsd-10.0-release/lib/libc
/freebsd-10.0-release/lib/libc/stdtime
/freebsd-10.0-release/lib/libc_nonshared
/freebsd-10.0-release/lib/libfetch
/freebsd-10.0-release/lib/libiconv_modules
/freebsd-10.0-release/lib/libsmb
/freebsd-10.0-release/lib/libthr
/freebsd-10.0-release/lib/libutil
/freebsd-10.0-release/lib/libvmmapi
/freebsd-10.0-release/lib/libyaml
/freebsd-10.0-release/lib/libz
/freebsd-10.0-release/release
/freebsd-10.0-release/release/doc
/freebsd-10.0-release/sbin
/freebsd-10.0-release/sbin/camcontrol
/freebsd-10.0-release/sbin/dumpon
/freebsd-10.0-release/sbin/hastd
/freebsd-10.0-release/sbin/ifconfig
/freebsd-10.0-release/sbin/ipfw
/freebsd-10.0-release/sbin/nvmecontrol
/freebsd-10.0-release/share
/freebsd-10.0-release/share/examples/bhyve
/freebsd-10.0-release/share/i18n/csmapper/JIS
/freebsd-10.0-release/share/i18n/esdb/EUC
/freebsd-10.0-release/share/man
/freebsd-10.0-release/share/man/man4
/freebsd-10.0-release/share/man/man4/bhyve.4
/freebsd-10.0-release/share/man/man5
/freebsd-10.0-release/share/man/man7
/freebsd-10.0-release/share/man/man8
/freebsd-10.0-release/share/misc
/freebsd-10.0-release/share/mk
/freebsd-10.0-release/share/mk/bsd.arch.inc.mk
/freebsd-10.0-release/share/syscons
/freebsd-10.0-release/share/zoneinfo
/freebsd-10.0-release/sys
/freebsd-10.0-release/sys/amd64/include/vmm.h
/freebsd-10.0-release/sys/amd64/include/vmm_dev.h
/freebsd-10.0-release/sys/amd64/include/vmm_instruction_emul.h
/freebsd-10.0-release/sys/amd64/include/xen
/freebsd-10.0-release/sys/amd64/vmm
/freebsd-10.0-release/sys/boot
/freebsd-10.0-release/sys/boot/i386/efi
/freebsd-10.0-release/sys/boot/ia64/efi
/freebsd-10.0-release/sys/boot/ia64/ski
/freebsd-10.0-release/sys/boot/powerpc/boot1.chrp
/freebsd-10.0-release/sys/boot/powerpc/ofw
/freebsd-10.0-release/sys/cddl/contrib/opensolaris
/freebsd-10.0-release/sys/conf
/freebsd-10.0-release/sys/contrib/dev/acpica
/freebsd-10.0-release/sys/contrib/dev/acpica/changes.txt
/freebsd-10.0-release/sys/contrib/dev/acpica/common
/freebsd-10.0-release/sys/contrib/dev/acpica/compiler
/freebsd-10.0-release/sys/contrib/dev/acpica/components/debugger
/freebsd-10.0-release/sys/contrib/dev/acpica/components/disassembler
/freebsd-10.0-release/sys/contrib/dev/acpica/components/dispatcher
/freebsd-10.0-release/sys/contrib/dev/acpica/components/events
/freebsd-10.0-release/sys/contrib/dev/acpica/components/executer
/freebsd-10.0-release/sys/contrib/dev/acpica/components/hardware
/freebsd-10.0-release/sys/contrib/dev/acpica/components/namespace
/freebsd-10.0-release/sys/contrib/dev/acpica/components/parser
/freebsd-10.0-release/sys/contrib/dev/acpica/components/resources
/freebsd-10.0-release/sys/contrib/dev/acpica/components/tables
/freebsd-10.0-release/sys/contrib/dev/acpica/components/utilities
/freebsd-10.0-release/sys/contrib/dev/acpica/include
/freebsd-10.0-release/sys/contrib/dev/acpica/os_specific
/freebsd-10.0-release/sys/contrib/ipfilter
/freebsd-10.0-release/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c
/freebsd-10.0-release/sys/contrib/ipfilter/netinet/ip_raudio_pxy.c
/freebsd-10.0-release/sys/contrib/libfdt
/freebsd-10.0-release/sys/contrib/octeon-sdk
/freebsd-10.0-release/sys/contrib/x86emu
/freebsd-10.0-release/sys/dev/bvm
/freebsd-10.0-release/sys/dev/fdt/fdt_ic_if.m
/freebsd-10.0-release/sys/dev/hyperv
/freebsd-10.0-release/sys/modules/hyperv
/freebsd-10.0-release/sys/modules/vmm
/freebsd-10.0-release/sys/x86/include/acpica_machdep.h
/freebsd-10.0-release/tools
/freebsd-10.0-release/tools/build
/freebsd-10.0-release/tools/build/options
/freebsd-10.0-release/tools/tools/atsectl
/freebsd-10.0-release/usr.bin/calendar
/freebsd-10.0-release/usr.bin/csup
/freebsd-10.0-release/usr.bin/iscsictl
/freebsd-10.0-release/usr.bin/procstat
/freebsd-10.0-release/usr.sbin
/freebsd-10.0-release/usr.sbin/bhyve
/freebsd-10.0-release/usr.sbin/bhyvectl
/freebsd-10.0-release/usr.sbin/bhyveload
/freebsd-10.0-release/usr.sbin/bsdconfig
/freebsd-10.0-release/usr.sbin/bsdinstall
/freebsd-10.0-release/usr.sbin/ctladm
/freebsd-10.0-release/usr.sbin/ctld
/freebsd-10.0-release/usr.sbin/freebsd-update
/freebsd-10.0-release/usr.sbin/jail
/freebsd-10.0-release/usr.sbin/mergemaster
/freebsd-10.0-release/usr.sbin/mount_smbfs
/freebsd-10.0-release/usr.sbin/ndiscvt
/freebsd-10.0-release/usr.sbin/pkg
/freebsd-10.0-release/usr.sbin/rtadvctl
/freebsd-10.0-release/usr.sbin/rtadvd
/freebsd-10.0-release/usr.sbin/rtsold
/freebsd-10.0-release/usr.sbin/zic
259065 07-Dec-2013 gjb

- Copy stable/10 (r259064) to releng/10.0 as part of the
10.0-RELEASE cycle.
- Update __FreeBSD_version [1]
- Set branch name to -RC1

[1] 10.0-CURRENT __FreeBSD_version value ended at '55', so
start releng/10.0 at '100' so the branch is started with
a value ending in zero.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

258747 29-Nov-2013 dim

MFC r258620:

Pull in r195558 from upstream clang trunk:

Fix a SSE2 intrinsics typo

Full discourse at:

http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20131104/092514.html
http://lists.cs.uiuc.edu/pipermail/llvmdev/2013-November/068124.html

Patch by Dimitry Andric and Alexey Dokuchaev!

Reported by: danfe
Approved by: re (gjb)


258607 25-Nov-2013 dim

MFC r258350:

Pull in r191896 from upstream llvm trunk:

CaptureTracking: Plug a loophole in the "too many uses" heuristic.

The heuristic was added to avoid spending too much compile time in a
specially crafted test case (PR17461, PR16474) with many uses on a
select or bitcast instruction can still trigger the slow case. Add a
check for that case.

This only affects compile time, don't have a good way to test it.

This fixes the excessive compile time spent on a specific file of the
graphics/rawtherapee port.

Reported by: mandree
Approved by: re (gjb)


257327 29-Oct-2013 smh

MFC r257109:
Add clang-CC and CC to list of hints allowing clang to identify its operating
mode as c++ instead of defaulting to c for the binary names CC and clang-CC.

This fixes builds that use cmake which automatically sets CXX to
/usr/bin/CC by default.

PR: bin/182442
Approved by: re (glebius)


256281 10-Oct-2013 gjb

Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


256090 06-Oct-2013 dim

Pull in r192064 from upstream llvm trunk:

X86: Don't fold spills into SSE operations if the stack is unaligned.

Regalloc can emit unaligned spills nowadays, but we can't fold the
spills into SSE ops if we can't guarantee alignment. PR12250.

This fixes unaligned SSE accesses (leading to a SIGBUS) which could
occur in the ffmpeg ports.

Approved by: re (kib)
Reported by: tijl
MFC after: 3 days


256030 03-Oct-2013 dim

Pull in r189644 from upstream llvm trunk:

Add ms_abi and sysv_abi attribute handling.

Based on a patch by Benno Rice!

This will help to develop EFI support.

Approved by: re (kib)
Verified by: benno
MFC after: 1 week


256024 03-Oct-2013 dim

Pull in r186338 from upstream llvm trunk:

Remove invalid assert in DAGTypeLegalizer::RemapValue

There is a comment at the top of DAGTypeLegalizer::PerformExpensiveChecks
which, in part, says:

// Note that these invariants may not hold momentarily when processing a node:
// the node being processed may be put in a map before being marked Processed.

Unfortunately, this assert would be valid only if the above-mentioned invariant
held unconditionally. This was causing llc to assert when, in fact,
everything was fine.

Thanks to Richard Sandiford for investigating this issue!

Fixes PR16562.

This fixes assertions which could occur in the multimedia/ffmpeg1 and
multimedia/ffmpeg2 ports.

Approved by: re (hrs)
Reported by: Matthias Apitz <guru@unixarea.de>
MFC after: 3 days


255978 01-Oct-2013 dim

Pull in r191711 from upstream llvm trunk:

The X86FixupLEAs pass for Intel Atom must not call
convertToThreeAddress on ADD16rr opcodes, if src1 != src, since that
would cause convertToThreeAddress to try to create a virtual register.
This is not permitted after register allocation, which is when the
X86FixupLEAs pass runs.

This patch fixes PR16785.

Pull in r191715 from upstream llvm trunk:

Forgot to add a break statement.

This should enable building the x11-toolskits/libXaw port with
CPUTYPE=atom.

Approved by: re (gjb)
Reported by: Kenta Suzumoto <kentas@hush.com>
MFC after: 3 days


255804 22-Sep-2013 dim

Pull in r191165 from upstream llvm trunk:

ISelDAG: spot chain cycles involving MachineNodes

Previously, the DAGISel function WalkChainUsers was spotting that it
had entered already-selected territory by whether a node was a
MachineNode (amongst other things). Since it's fairly common practice
to insert MachineNodes during ISelLowering, this was not the correct
check.

Looking around, it seems that other nodes get their NodeId set to -1
upon selection, so this makes sure the same thing happens to all
MachineNodes and uses that characteristic to determine whether we
should stop looking for a loop during selection.

This should fix PR15840.

Specifically, this fixes the long-standing assertion failure when
compiling the multimedia/gstreamer port on i386. Thanks to Tijl
Coosemans for his help in getting upstream to fix it.

Approved by: re (marius)


255721 20-Sep-2013 emaste

Disable LLDB OSX ABI plugin

Approved by: re (blanket)


255682 19-Sep-2013 emaste

Merge lldb man page from r188801 to contrib/llvm/tools/lldb/docs/

Approved by: re (gjb)


255321 06-Sep-2013 theraven

On platforms where clang is the default compiler, don't build gcc or libstdc++.
To enable them, set WITH_GCC and WITH_GNUCXX in src.conf.
Make clang default to using libc++ on FreeBSD 10.
Bumped __FreeBSD_version for the change.

GCC is still enabled on PC98, because the PC98 bootloader requires GCC to build
(or, at least, hard-codes the use of gcc into its build).

Thanks to everyone who helped make the ports tree ready for this (and bapt
for coordinating them all). Also to imp for reviewing this and working on the
forward-porting of the changes in our gcc so that we're getting to a much
better place with regard to external toolchains.

Sorry to all of the people who helped who I forgot to mention by name.

Reviewed by: bapt, imp, dim, ...


255076 30-Aug-2013 dim

Pull in r189672 from upstream llvm trunk:

InstCombine: Check for zero shift amounts before subtracting one
causing integer overflow.

PR17026. Also avoid undefined shifts and shift amounts larger than 64
bits (those are always undef because we can't represent integer types
that large).

This should fix assertion failures when building the emulators/xmame
port.

Reported by: bapt


254851 25-Aug-2013 emaste

Disable lldb target support not (currently) of interest

- Remote iOS debugging
- OS X symbol provider, core files
- PECOFF object files
- Linux platform support

Sponsored by: DARPA, AFRL


254793 24-Aug-2013 emaste

Revert lldb change for Attribute::NoBuiltin

NoBuiltin was introduced after clang/llvm 3.3 and thus does not exist in
FreeBSD. Thus special handling for the attribute is not needed in lldb.

This reverts lldb r186990 (git eebd175)

Sponsored by: DARPA, AFRL


254790 24-Aug-2013 emaste

Import llvm r187614 (git 44c8e34), for lldb's use:

Author: Daniel Malea <daniel.malea@intel.com>
Date: Thu Aug 1 21:18:16 2013 +0000

Fixed the Intel-syntax X86 disassembler to respect the (existing)
option for hexadecimal immediates, to match AT&T syntax. This also
brings a new option for C-vs-MASM-style hex.

Patch by Richard Mitton
Reviewed: http://llvm-reviews.chandlerc.com/D1243


254768 24-Aug-2013 emaste

Revert lldb changes due to post-3.3 clang and llvm API changes

Revisions:
svn git
183929 99447a6
183862 15c1774
source/Host/common/FileSpec.cpp

184954 007e7bc
184948 4dc3761
source/Expression/ClangExpressionParser.cpp

182099 b31044e
181387 779e6ac
include/lldb/Expression/IRExecutionUnit.h
source/Expression/IRExecutionUnit.cpp

184177 0b2934b
182650 f2dcf35
181703 7bef4e2
source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp

182683 0d91b80
source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp

Sponsored by: DARPA, AFRL


254729 23-Aug-2013 emaste

Merge lldb r188801 to contrib/llvm/tools/lldb/


254582 20-Aug-2013 dim

Pull in r182983 from upstream clang trunk:

Fix handling of braced-init-list as reference initializer within
aggregate initialization. Previously we would incorrectly require an
extra set of braces around such initializers.

Pull in r188718 from upstream clang trunk:

Handle init lists and _Atomic fields.

Fixes PR16931.

These fixes are needed for the atomic_flag type to work correctly in our
stdatomic.h.

Requested by: theraven


254581 20-Aug-2013 dim

Pull in r188716 from upstream clang trunk:

PR16727: don't try to evaluate a potentially value-dependent
expression when checking for missing parens in &&/|| expressions.

This fixes an assertion encountered when building the lang/sdcc port.

Reported by: kwm


253802 30-Jul-2013 dim

Pull in r186696 from upstream clang trunk:

This patch implements __get_cpuid_max() as an inline and __cpuid()
and __cpuid_count() as macros to be compatible with GCC's cpuid.h.
It also adds bit_<foo> constants for the various feature bits as
described in version 039 (May 2011) of Intel's SDM Volume 2 in the
description of the CPUID instruction. The list of bit_<foo>
constants is a bit exhaustive (GCC doesn't do near this many). More
bits could be added from a newer version of SDM if desired.

Patch by John Baldwin!

This should fix several ports which depend on this functionality being
available.

MFC after: 1 week


253042 08-Jul-2013 dim

Pull in r185616 from llvm trunk:

FastISel can only append to basic blocks.

Compute the insertion point from the end of the basic block instead of
skipping labels from the front.

This caused failures in landing pads when live-in copies where inserted
before instruction selection.

I missed this change in r252720; without it, certain compilation flags
can cause exception labels to not be generated, but still referenced,
leading to link errors.

Reported by: zeising
MFC after: 3 days


252720 04-Jul-2013 dim

Pull in r185594 from llvm trunk:

Add MachineBasicBlock::addLiveIn().

This function adds a live-in physical register to an MBB and ensures
that it is copied to a virtual register immediately.

Pull in r185615 from llvm trunk:

Live-in copies go *after* EH_LABELs.

This will soon be tested by exception handling working at all.

Pull in r185617 from llvm trunk:

Simplify landing pad lowering.

Stop using the ISD::EXCEPTIONADDR and ISD::EHSELECTION when lowering
landing pad arguments. These nodes were previously legalized into
CopyFromReg nodes, but that never worked properly because the
CopyFromReg node weren't guaranteed to be scheduled at the top of the
basic block.

This meant the exception pointer and selector registers could be
clobbered before being copied to a virtual register.

This patch copies the two physical registers to virtual registers at
the beginning of the basic block, and lowers the landingpad instruction
directly to two CopyFromReg nodes reading the *virtual* registers. This
is safe because virtual registers don't get clobbered.

A future patch will remove the ISD::EXCEPTIONADDR and ISD::EHSELECTION
nodes.

Together, these changes fix llvm PR 16038 ('qt4 webcore file results in
"Bad machine code: Using an undefined physical register"'), and should
make it possible again to compile the www/qt4-webkit port again on the
i386 arch, without using a CPUTYPE=i686 or higher setting.


252587 03-Jul-2013 dim

Pull in r185446 from clang trunk:

Fix to PR15826 - clang hits assert in clang::ASTContext::getASTRecordLayout.

Reported by: glebius


252503 02-Jul-2013 andrew

Work around an ARM EABI issue where clang would sometimes incorrectly align
the stack in a leaf function that uses TLS.

The issue is, when using TLS, the function is no longer a leaf as it calls
__aeabi_read_tp. With statically linked programs this is not an issue as
it doesn't make use of the stack, however with dynamically linked
applications we enter rtld which does use the stack and makes assumptions
about it's alignment.

This is only a temporary fix until a better patch can be made and submitted
upstream.


252039 20-Jun-2013 dim

Pull in r183984 from llvm trunk:

Make PrologEpilogInserter save/restore all callee saved registers in
functions which call __builtin_unwind_init()

__builtin_unwind_init() is an undocumented gcc intrinsic which has
this effect, and is used in libgcc_eh.

Goes part of the way toward fixing PR8541.

This obsoletes the ugly hack to libgcc's unwind code from r245272, and
should also work for other arches, so revert the hack too.


251790 15-Jun-2013 andrew

Pull in r183926 from LLVM trunk:

Allow clang to build __clear_cache on ARM.

__clear_cache is special. It needs no signature, but is a real function in
compiler_rt or libgcc.

Patch by Andrew Turner.

This allows us to build the __clear_cache function in compiler-rt.


251785 15-Jun-2013 ed

Pull in r184040 from upstream clang trunk:

Emit native implementations of atomic operations on FreeBSD/armv6.

Just like on Linux, FreeBSD/armv6 assumes the system supports
ldrex/strex unconditionally. It is also used by the kernel. We can
therefore enable support for it, like we do on Linux.

While there, change one of the unit tests to explicitly test against
armv5 instead of armv7, as it actually tests whether libcalls are
emitted.


251761 14-Jun-2013 dim

Pull in r181620 from llvm trunk:

[ms-inline asm] Fix a crasher when we fail on a direct match.

The issue was that the MatchingInlineAsm and VariantID args to the
MatchInstructionImpl function weren't being set properly. Specifically, when
parsing intel syntax, the parser thought it was parsing inline assembly in the
at&t dialect; that will never be the case.

The crash was caused when the emitter tried to emit the instruction, but the
operands weren't set. When parsing inline assembly we only set the opcode, not
the operands, which is used to lookup the instruction descriptor.
rdar://13854391 and PR15945

Also, this commit reverts r176036. Now that we're correctly parsing the intel
syntax the pushad/popad don't match properly. I've reimplemented that fix using
a MnemonicAlias.

Pull in r183907 from llvm trunk:

X86: Make the cmov aliases work with intel syntax too.

These commits make a number of Intel-style inline assembly mnemonics
aliases (occurring in several ports) work properly, which could cause
assertions otherwise.

Reported by: kwm, bapt


251662 12-Jun-2013 dim

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


251431 05-Jun-2013 dim

Pull in r183297 from upstream llvm trunk:

PR15662: Optimized debug info produces out of order function
parameters

When a function is inlined we lazily construct the variables
representing the function's parameters. After that, we add any
remaining unused parameters.

If the function doesn't use all the parameters, or uses them out of
order, then the DWARF would produce them in that order, producing a
parameter order that doesn't match the source.

This fix causes us to always keep the arg variables at the start of
the variable list & in the original order from the source.

Reported by: avg
MFC after: 1 week


251216 01-Jun-2013 ed

Pull in r183033 and r183036 from LLVM trunk:

Add support for optimized (non-generic) atomic libcalls.

For integer types of sizes 1, 2, 4 and 8, libcompiler-rt (and libgcc)
provide atomic functions that pass parameters by value and return
results directly.

libgcc and libcompiler-rt only provide optimized libcalls for
__atomic_fetch_*, as generic libcalls on non-integer types would make
little sense. This means that we can finally make __atomic_fetch_*
work
on architectures for which we don't provide these operations as
builtins
(e.g. ARM).

This should fix the dreaded "cannot compile this atomic library call
yet" error that would pop up once every while.

This should make it possible for me to get C11 atomics working on all of
our platforms.


250997 26-May-2013 dim

Pull in r182656 from upstream llvm trunk:

LoopVectorize: LoopSimplify can't canonicalize loops with an
indirectbr in it, don't assert on those cases.

Fixes PR16139.

This should fix clang assertion failures when optimizing at -O3, similar
to:

Assertion failed: (TheLoop->getLoopPreheader() && "No preheader!!"),
function canVectorize, file
contrib/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp, line 2171.

Reported by: O. Hartmann <ohartman@zedat.fu-berlin.de>
PR: ports/178332, ports/178977
MFC after: 3 days


250593 13-May-2013 dim

Pull in r181286 from upstream llvm trunk:

LoopVectorize: getConsecutiveVector must respect signed arithmetic

We were passing an i32 to ConstantInt::get where an i64 was needed and we must
also pass the sign if we pass negatives numbers. The start index passed to
getConsecutiveVector must also be signed.

Should fix PR15882.

This should fix Firefox crashes some people have been reporting, when it
is compiled with -O3.


249817 23-Apr-2013 dim

Pull in r180121 from upstream llvm trunk:

LoopVectorizer: Fix 15830. When scalarizing and unrolling stores make
sure that the order in which the elements are scalarized is the same
as the original order.
This fixes a miscompilation in FreeBSD's regex library.

This should fix lib/libc/regex/regcomp.c at -O3 with clang 3.3 r178860
on CPUs with SSE. Before this change, the vectorizer could incorrectly
rearrange the second loop in computejumps(), leading to possibly invalid
entries in the re_gets::charjump table.

The net result was that for example "sed s/@CC@/foo/" failed to work
correctly, leading to trouble with many configure scripts.


249423 12-Apr-2013 dim

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.


248548 20-Mar-2013 andrew

Pull in r177252 from upstream clang trunk:

Make sure to use same EABI version for external assembler as for
integrated as.

This allows us to use gcc on a world built with clang on ARM.


247205 23-Feb-2013 dim

Pull in r175962 from upstream llvm trunk:

X86: Disable cmov-memory patterns on subtargets without cmov.

Fixes PR15115.

For the i386 arch, this should enable cmov instructions only on
-march=pentiumpro and higher. Since our default CPU is i486, cmov
instructions will now be disabled by default.

MFC after: 1 week


247166 22-Feb-2013 dim

Pull in r172354 from upstream clang trunk:

Refactor the x86 CPU name logic in the driver and pass -march and -mcpu
flag information down from the Clang driver into the Gold linker plugin
for LTO. This allows specifying -march on the linker commandline and
should hopefully have it pass all the way through to the LTO optimizer.

Fixes PR14697.

Pull in r175919 from upstream clang trunk:

Driver: Pass down the -march setting down to -cc1as on x86 too.

The assembler historically didn't make use of any target features, but this has
changed when support for old CPUs that don't support long nops was added.

This should fix the long nops that still occurred in crt*.o, and
possibly other object files, if the system was compiled for a CPU that
does not support those, such as Geode.

Note that gcc on i386 also does not pass through any -march, -mcpu or
-mtune setting to gas, but this has not caused any trouble yet, because
gas defaults to i386.

Reported by: lev
MFC after: 1 week


247003 19-Feb-2013 dim

Pull in r175360 from upstream llvm trunk:

MCParser: Reject .balign with non-pow2 alignments.

GNU as rejects them and there are configure scripts in the wild that
check if the assembler rejects ".align 3" to determine whether the
alignment is in bytes or powers of two.

MFC after: 3 days


246858 15-Feb-2013 dim

Pull in r175057 from upstream llvm trunk:

X86: Disable generation of rep;movsl when %esi is used as a base pointer.

This happens when there is both stack realignment and a dynamic alloca in the
function. If we overwrite %esi (rep;movsl uses fixed registers) we'll lose the
base pointer and the next register spill will write into oblivion.

Fixes PR15249 and unbreaks firefox on i386/freebsd. Mozilla uses dynamic allocas
and freebsd a 4 byte stack alignment.

MFC after: 1 week


246259 02-Feb-2013 dim

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


245952 26-Jan-2013 pfg

Clean some 'svn:executable' properties in the tree.

Submitted by: Christoph Mallon
MFC after: 3 days


244640 23-Dec-2012 andrew

Pull in r170096 from upstream clang trunk:

Initial support for FreeBSD on ARM.


244628 23-Dec-2012 dim

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


244598 22-Dec-2012 dim

Pull in r170353 from upstream llvm trunk:

Fix another SROA crasher, PR14601.

This was a silly oversight, we weren't pruning allocas which were used
by variable-length memory intrinsics from the set that could be widened
and promoted as integers. Fix that.

This should fix the following assertion failure:

Assertion failed: (CanSROA), function visitUsers, file
/usr/src/lib/clang/libllvmscalaropts/../../../contrib/llvm/lib/Transforms/Scalar/SROA.cpp,
line 2395.

Reported by: gerald


243830 03-Dec-2012 dim

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.


242835 09-Nov-2012 dim

Reduce LLVM's default stack alignment for i386 from 16 to 4 bytes, as
the FreeBSD ABI requires. This is essentially a revert of upstream llvm
commit r126226, and it will be reverted by upstream too.

MFC after: 1 week


242380 30-Oct-2012 dim

Pull in r165377 from upstream llvm trunk:

X86: fcmov doesn't handle all possible EFLAGS, fall back to a branch
for the others.

Otherwise it will try to use SSE patterns and fail horribly if sse is
disabled.

Fixes PR14035.

This should fix the following assertion failure:

Assertion failed: (Reg >= X86::FP0 && Reg <= X86::FP6 && "Expected FP
register!"), function getFPReg, file
contrib/llvm/lib/Target/X86/X86FloatingPoint.cpp, line 330.

which can show up when compiling contrib/compiler-rt, using -march=i686
through -march=pentium3 (CPU's which do support fcmov, but don't support
SSE2).

MFC after: 1 week


242080 25-Oct-2012 ed

Pull in r166498 from upstream clang trunk:

Add a new warning -Wmissing-variable-declarations, to warn about variables
defined without a previous declaration. This is similar to
-Wmissing-prototypes, but for variables instead of functions.


242007 24-Oct-2012 dim

Pull in r165367 from upstream llvm trunk:

Make sure always-inline functions get inlined. <rdar://problem/12423986>

Without this change, when the estimated cost for inlining a function with
an "alwaysinline" attribute was lower than the inlining threshold, the
getInlineCost function was returning that estimated cost rather than the
special InlineCost::AlwaysInlineCost value. That is fine in the normal
inlining case, but it can fail when the inliner considers the opportunity
cost of inlining into an internal or linkonce-odr function. It may decide
not to inline the always-inline function in that case. The fix here is just
to make getInlineCost always return the special value for always-inline
functions. I ran into this building clang with libc++. Tablegen failed to
link because of an always-inline function that was not inlined. I have been
unable to reduce the testcase down to a reasonable size.

This should fix the link errors that were reported when atf-run was
compiled with clang -stdlib=libc++. In this case, at -O3 optimization,
some calls to basic_ios::clear() were not inlined, even when the
function was marked __always_inline__.

Reported by: Jan Beich <jbeich@tormail.org>
MFC after: 1 week


241895 22-Oct-2012 dim

Pull in r165878 from upstream llvm trunk:

X86: Disable long nops for all cpus prior to pentiumpro/i686.

This is the safest approach for now. If you think long nops matter a
lot for performance, compile with -march=i686 or higher. :)

MFC after: 3 days


241430 10-Oct-2012 dim

Pull in r164132 from upstream llvm trunk:

When creating MCAsmBackend pass the CPU string as well. In X86AsmBackend
store this and use it to not emit long nops when the CPU is geode which
doesnt support them.

Fixes PR11212.

Pull in r164133 from upstream clang trunk:

Follow up on llvm r164132.

This should prevent illegal instructions when building world on Geode
CPUs (e.g. Soekris).

MFC after: 3 days


241427 10-Oct-2012 dim

Pull in r163710 from upstream llvm trunk:

Add support for AMD Geode.

MFC after: 3 days


241163 03-Oct-2012 dim

Pull in r164717 from upstream clang trunk:

Allow -MF to be used in combination with -E -M or -E -MM.

This should help with building the lang/ghc port.

MFC after: 1 week


240531 15-Sep-2012 dim

Pull in r163967 from upstream llvm trunk:

X86: Emitting x87 fsin/fcos for sinf/cosf is not safe without unsafe
fp math.

This should make clang emit calls to libm for sinf/cosf by default.

MFC after: 1 week


239619 23-Aug-2012 dim

Pull in r162360 from upstream clang trunk:

Merge existing attributes before processing pragmas in friend template
declarations.
Fixes pr13662.

This should help when building Firefox with libc++.


239462 20-Aug-2012 dim

Upgrade our copy of llvm/clang to trunk r162107. With thanks to
Benjamin Kramer and Joerg Sonnenberger for their input and fixes.


238864 28-Jul-2012 dim

Similar to what is already done for Linux, make clang not complain about
unused -g, -emit-llvm or -w arguments when doing linking. E.g. invoking
"clang -g foo.o -o foo" will now be silent.

Reported by: Jakub Lach <jakub_lach@mailplus.pl>
MFC after: 1 week


238863 28-Jul-2012 dim

Similar to r238472, let clang pass --enable-new-dtags to the linker
invocation by default. Also make sure --hash-style=both is passed for
the same arches as gcc, e.g. arm, sparc and x86.

X-MFC-with: r238472


238429 13-Jul-2012 dim

Pull in r159895 from upstream clang trunk:

When marking virtual functions as used for a class' vtable, mark all functions
which will appear in the vtable as used, not just those ones which were
declared within the class itself. Fixes an issue reported as comment#3 in
PR12763 -- we sometimes assert in codegen if we try to emit a reference to a
function declaration which we've not marked as referenced. This also matches
gcc's observed behavior.

This should fix clang assertions when building certain components of the
LibreOffice port.

MFC after: 3 days


236386 01-Jun-2012 dim

Pull in r155978 from upstream llvm trunk:

Fix unintentional use of operator bool.

This enables llvm's bugpoint tool to build with libc++.

MFC after: 3 days


236260 29-May-2012 dim

Pull in r156591 from upstream llvm trunk:

Allow unique_file to take a mode for file permissions, but default
to user only read/write.

and r156592 from upstream clang trunk:

For final output files create them with mode 0664 to match other
compilers and expected defaults.

This should fix clang creating files with mode 0600.

Reported by: James <james@hicag.org>
MFC after: 3 days


236258 29-May-2012 dim

For clang, similar to r236137, enable gnu hash generation for dynamic
ELF binaries on x86.


236149 27-May-2012 dim

Pull in r157212 from upstream clang trunk:

Revert r115805. An array type is required to have a range type,
however, the range can be unknown for the upper bound.

Testcase to follow.

Part of rdar://11457152

This should fix ctfconvert producing error messages during kernel
builds, similar to:

ERROR: scsi_all.c: die 24561: failed to retrieve array bounds

These were caused by incorrect debug information for flexible array
members of structs.

MFC after: 3 days


235864 23-May-2012 dim

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


234982 03-May-2012 dim

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


234353 16-Apr-2012 dim

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


232894 12-Mar-2012 dim

Pull in r145194 from upstream clang trunk:

Make our handling of MMX x SSE closer to what gcc does:

* Enabling sse enables mmx.
* Disabling (-mno-mmx) mmx, doesn't disable sse (we got this right already).
* The order in not important. -msse -mno-mmx is the same as -mno-mmx -msse.

Some configure scripts depend on this.

PR: i386/165968
MFC after: 3 days


231852 17-Feb-2012 bz

Merge multi-FIB IPv6 support from projects/multi-fibv6/head/:

Extend the so far IPv4-only support for multiple routing tables (FIBs)
introduced in r178888 to IPv6 providing feature parity.

This includes an extended rtalloc(9) KPI for IPv6, the necessary
adjustments to the network stack, and user land support as in netstat.

Sponsored by: Cisco Systems, Inc.
Reviewed by: melifaro (basically)
MFC after: 10 days


231057 06-Feb-2012 dim

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


230393 20-Jan-2012 dim

Pull in r148240 from upstream llvm trunk:

Make sure the non-SSE lowering for fences correctly clobbers EFLAGS.
PR11768.

In particular, this fixes segfaults during the build of devel/icu on
i386. The __sync_synchronize() builtin used for implementing icu's
internal barrier could lead to incorrect behaviour.

MFC after: 3 days


228379 09-Dec-2011 dim

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


227739 19-Nov-2011 andreast

Rename the linker emulation name for powerpc and powerc64. This is needed that
we can also use the upstream binutils linker where we have to have a unique
name for the FreeBSD emulation.


227737 19-Nov-2011 dim

Pull in r144505 from upstream clang trunk:

Fix the signature of the getcontext builtin, eliminating incorrect
warnings about its prototype.

This also adds a -W(no-)builtin-requires-header option, which can be
used to enable or disable warnings of this kind.

MFC after: 1 week


227736 19-Nov-2011 dim

Pull in r144237 from upstream clang trunk:

Fix the signature of __sigsetjmp and sigsetjmp. This eliminates
incorrect warnings about the prototypes of these functions.

MFC after: 1 week


227735 19-Nov-2011 dim

Pull in r144110 from upstream clang trunk:

Mark the overloaded atomic builtins as having custom type checking,
which they do. This avoids all of the default argument promotions that
we (1) don't want, and (2) undo during that custom type checking, and
makes sure that we don't run into trouble during template
instantiation. Fixes llvm/clang PR11320.

MFC after: 1 week


226951 30-Oct-2011 dim

Pull in r143305 and r143312 from upstream clang trunk, so using "clang
-march=native" on AMD K10 family processors no longer errors out with
"unknown target CPU 'amdfam10'". This also enables use of SSE4A.

Reported by: David Marec <david.marec@davenulle.org>
MFC after: 3 days


226633 22-Oct-2011 dim

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


226525 19-Oct-2011 dim

Fix breakage introduced by r226518.

Spotted by: tinderbox, yanefbsd at gmail.com
Pointy hat to: dim


226518 18-Oct-2011 dim

Fix the way clang retrieves the major FreeBSD release number from the
target triple, so that the __FreeBSD__ and __FreeBSD_cc_version builtin
macros return the expected results.

Spotted by: nalitoja at gmail.com


225880 29-Sep-2011 dim

Revive the LLVM and Clang license files, which were removed in my
too-thorough cleanup of unused files, in r213695. Also make sure these
get installed under /usr/share/doc.

Submitted by: rwatson, brooks
Pointy hat to: dim
MFC after: 3 days


224145 17-Jul-2011 dim

Upgrade our copy of llvm/clang to r135360, from upstream's trunk.


223758 04-Jul-2011 attilio

With retirement of cpumask_t and usage of cpuset_t for representing a
mask of CPUs, pc_other_cpus and pc_cpumask become highly inefficient.

Remove them and replace their usage with custom pc_cpuid magic (as,
atm, pc_cpumask can be easilly represented by (1 << pc_cpuid) and
pc_other_cpus by (all_cpus & ~(1 << pc_cpuid))).

This change is not targeted for MFC because of struct pcpu members
removal and dependency by cpumask_t retirement.

MD review by: marcel, marius, alc
Tested by: pluknet
MD testing by: marcel, marius, gonzo, andreast


223017 12-Jun-2011 dim

Upgrade our copy of llvm/clang to r132879, from upstream's trunk.


222813 07-Jun-2011 attilio

etire the cpumask_t type and replace it with cpuset_t usage.

This is intended to fix the bug where cpu mask objects are
capped to 32. MAXCPU, then, can now arbitrarely bumped to whatever
value. Anyway, as long as several structures in the kernel are
statically allocated and sized as MAXCPU, it is suggested to keep it
as low as possible for the time being.

Technical notes on this commit itself:
- More functions to handle with cpuset_t objects are introduced.
The most notable are cpusetobj_ffs() (which calculates a ffs(3)
for a cpuset_t object), cpusetobj_strprint() (which prepares a string
representing a cpuset_t object) and cpusetobj_strscan() (which
creates a valid cpuset_t starting from a string representation).
- pc_cpumask and pc_other_cpus are target to be removed soon.
With the moving from cpumask_t to cpuset_t they are now inefficient
and not really useful. Anyway, for the time being, please note that
access to pcpu datas is protected by sched_pin() in order to avoid
migrating the CPU while reading more than one (possible) word
- Please note that size of cpuset_t objects may differ between kernel
and userland. While this is not directly related to the patch itself,
it is good to understand that concept and possibly use the patch
as a reference on how to deal with cpuset_t objects in userland, when
accessing kernland members.
- KTR_CPUMASK is changed and now is represented through a string, to be
set as the example reported in NOTES.

Please additively note that no MAXCPU is bumped in this patch, but
private testing has been done until to MAXCPU=128 on a real 8x8x2(htt)
machine (amd64).

Please note that the FreeBSD version is not yet bumped because of
the upcoming pcpu changes. However, note that this patch is not
targeted for MFC.

People to thank for the time spent on this patch:
- sbruno, pluknet and Nicholas Esborn (nick AT desert DOT net) tested
several revision of the patches and really helped in improving
stability of this work.
- marius fixed several bugs in the sparc64 implementation and reviewed
patches related to ktr.
- jeff and jhb discussed the basic approach followed.
- kib and marcel made targeted review on some specific part of the
patch.
- marius, art, nwhitehorn and andreast reviewed MD specific part of
the patch.
- marius, andreast, gonzo, nwhitehorn and jceel tested MD specific
implementations of the patch.
- Other people have made contributions on other patches that have been
already committed and have been listed separately.

Companies that should be mentioned for having participated at several
degrees:
- Yahoo! for having offered the machines used for testing on big
count of CPUs.
- The FreeBSD Foundation for having sponsored my devsummit attendance,
which has been instrumental.
- Sandvine for having offered offices and infrastructure during
development.

(I really hope I didn't forget anyone, if it happened I apologize in
advance).


221503 05-May-2011 dim

Make cross-compiling using clang work better, by respecting the
LLVM_HOSTTRIPLE that is defined during the cross-tools stage.

Using clang, you can now build amd64 world and kernel on i386, and vice
versa. Other arches still need work.


221345 02-May-2011 dim

Upgrade our copy of llvm/clang to r130700, from upstream's trunk.


220754 17-Apr-2011 dim

For clang, make -mno-mmx imply -mno-3dnow. This is what gcc does.

Submitted by: arundel
Obtained from: http://llvm.org/viewvc/llvm-project?view=rev&revision=129665


220741 17-Apr-2011 dim

Cleanup some left-over empty directories in contrib/llvm.


219077 27-Feb-2011 dim

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'.


219076 27-Feb-2011 dim

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.


219073 26-Feb-2011 dim

Remove getDriver().Dir + /../libexec and /usr/libexec from clang's
program paths. Unlike gcc, clang has no executables in libexec.


219072 26-Feb-2011 dim

Remove misapplied space.


219011 24-Feb-2011 dim

Recently, in upstream clang, a fix was done to add -L/usr/lib to the
arguments passed to ld, when linking. This was to appease configure
scripts in several ports, that grep for such a -L option in "${CC} -v"
output, to determine the startup objects passed to ld. Note ld itself
does not need to be told about /usr/lib, since it has this path builtin
anyway.

However, if clang is built as a bootstrap tool during buildworld, it
should not use *anything* outside ${WORLDTMP} to include or link with.
The upstream fix to add -L/usr/lib breaks this assumption, and can thus
cause libraries from /usr/lib to be linked in during buildworld.

This can result in buildworld dying during linking of zinject, where it
picks up the wrong copy of libzpool.so, eventually leading to:

/usr/obj/usr/src/tmp/lib/libthr.so.3: undefined reference to `_rtld_get_stack_prot'

Fix this issue by not adding any hardcoded paths, but by looping through
the run-time library path list, which is already correctly set for the
bootstrap phase.

Reported by: datastream.freecity@gmail.com
Pointy hat to: dim


218893 20-Feb-2011 dim

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.


213786 13-Oct-2010 rdivacky

Actually, check for any kind of "C string type".

Approved by: rpaulo (mentor)


213777 13-Oct-2010 rdivacky

Extend this check for const unsigned char *.

Approved by: rpaulo (mentor)


213695 11-Oct-2010 dim

Remove more unneeded files and directories from contrib/llvm. This
still allows us to build tblgen and clang, and further reduces the
footprint in the tree.

Approved by: rpaulo (mentor)


213694 11-Oct-2010 rpaulo

Rework the analysis of the 'r' specifier. It turns out that we can't
make it like xArg because they are different ('x' doesn't accept sign,
but 'r' does).
This fixes some warnings when building DDB with clang.

With help from: rdivacky


213681 11-Oct-2010 rpaulo

Restore the support for the 'r' and the 'y' conversion specifiers, first
added on r208987.
These are undocumented but are part of printf(9).


213534 07-Oct-2010 dim

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)


213492 06-Oct-2010 dim

Apply r207674 from the clangbsd project branch:

Make "clang -print-multi-os-directory" return "." on amd64, matching
gcc's behaviour. This is needed because some ports use the option to
determine the installation directory for their libraries.

Requested by: kwm
Approved by: rpaulo (mentor)


213358 02-Oct-2010 dim

Cleanup some example and empty directories that were left around after
the last import of contrib/llvm.

Suggested by: obrien
Approved by: rpaulo (mentor)


212904 20-Sep-2010 dim

Upgrade our Clang in base to r114020, from upstream's release_28 branch.

Approved-by: rpaulo (mentor)


211573 21-Aug-2010 rpaulo

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


210299 20-Jul-2010 ed

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


209107 12-Jun-2010 ed

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.


208999 10-Jun-2010 rdivacky

Remove Xcode cmake win32 projects unittests from LLVM and
clang.xcodeproj INPUTS win32 from clang.

Requested by: jkim
Approved by: ed (mentor)


208987 10-Jun-2010 rdivacky

Introduce -fformat-extensions. A local FreeBSD extension used
for additional printf modifiers in kernel.

Approved by: ed (mentor)


208962 09-Jun-2010 rdivacky

Remove the commented out piece that slipped as a mismerge.

Approved by: ed (mentor)


208961 09-Jun-2010 rdivacky

Adjust include paths to FreeBSD. Remove /usr/local/include and
add /usr/include/clang/$VERSION (currently VERSION is 2.0).

Approved by: ed (mentor)


208959 09-Jun-2010 rdivacky

Change the default CPU to i486 on i386 (architecture).

Approved by: ed (mentor)


208958 09-Jun-2010 rdivacky

Comment out piece of code using __clear_cache() which FreeBSD
does not have. This is only used for JIT on ARM so it's harmless.

Approved by: ed (mentor)


208955 09-Jun-2010 ed

Remove unneeded directories.

Even though Roman removed these directories in his working copy, they
weren't removed from the actual repository, also causing his working
copy to be corrupted.


208954 09-Jun-2010 rdivacky

Import LLVM/clang from vendor stripped of docs/ test/ website/ www/ examples/
in llvm/ and/or llvm/contrib/clang/ respectively.

Approved by: ed (mentor)
Approved by: core


208599 27-May-2010 rdivacky

Update LLVM to r104832.


207631 04-May-2010 rdivacky

Update LLVM to r103052.


207618 04-May-2010 rdivacky

Update LLVM to r103004.


206274 06-Apr-2010 rdivacky

Update LLVM to r100520.


206124 03-Apr-2010 rdivacky

Update LLVM to r100285.


206083 02-Apr-2010 rdivacky

Update LLVM to r100181.


205407 21-Mar-2010 rdivacky

Update LLVM to r99115.


205218 16-Mar-2010 rdivacky

Update LLVM to r98631.


204961 10-Mar-2010 rdivacky

Update LLVM to r98164.


204792 06-Mar-2010 rdivacky

Update LLVM to r97873.


204642 03-Mar-2010 rdivacky

Update LLVM to 97654.


203954 16-Feb-2010 rdivacky

Update LLVM to r96341.


202878 23-Jan-2010 rdivacky

Update LLVM to r94309.


202375 15-Jan-2010 rdivacky

Update LLVM to 93512.


201360 01-Jan-2010 rdivacky

Update LLVM to 92395.


200581 15-Dec-2009 rdivacky

Update LLVM to 91430.


199989 01-Dec-2009 rdivacky

Update LLVM to r90226.


199513 19-Nov-2009 rdivacky

Remove includes that were removed upstream.


199511 19-Nov-2009 rdivacky

Update LLVM to r89337.


199481 18-Nov-2009 rdivacky

Update LLVM to r89205.


198953 05-Nov-2009 rdivacky

Update LLVM to r86140.


198906 04-Nov-2009 rdivacky

Delete this file.


198892 04-Nov-2009 rdivacky

Update LLVM to r86025.


198413 23-Oct-2009 rdivacky

This was removed upstream.


198403 23-Oct-2009 rdivacky

These files does not belong here.


198396 23-Oct-2009 rdivacky

Update LLVM to r84949.


198138 15-Oct-2009 rdivacky

Delete all stale files.


198113 15-Oct-2009 rdivacky

Update llvm to r84175.


198090 14-Oct-2009 rdivacky

Update llvm to r84119.


195340 04-Jul-2009 ed

Import LLVM 74788.


195098 27-Jun-2009 ed

Import LLVM r74383.


194754 23-Jun-2009 ed

Import LLVM r73984.

It seems I keep importing sources at very unlucky moments. Let's see
what this revision of LLVM does.


194710 23-Jun-2009 ed

Import LLVM r73954.


194612 22-Jun-2009 ed

Update LLVM sources to r73879.


194178 14-Jun-2009 ed

Import LLVM r73340.


193724 08-Jun-2009 ed

Import LLVM r73070.

Now I'm going to stop importing code for a while. I spent a lot of time
the last couple of days figuring out which LLVM commit caused g++ to
miscompile, which in its turn caused Clang to miscompile the next build.
I had to run `make buildworld' twice each time I bisected a revision.


193630 07-Jun-2009 ed

Import LLVM r73021.


193574 06-Jun-2009 ed

Import LLVM, at r72995.

We should now have support for #pragma weak.


193399 03-Jun-2009 ed

Import LLVM, at r72805, which fixes PR4315 and PR4316.

Normally I'm not updating sources this often, but I want to get rid of
this breakage, because right now I can't offer a proper source snapshot
yet.


193378 03-Jun-2009 ed

Import LLVM, at r72770.

This should fix LLVM PR4225.


193323 02-Jun-2009 ed

Import LLVM, at r72732.