Age | Commit message (Collapse) | Author |
|
|
|
ld --start-group --end-group block. bfd ld seems to need this where
lld doesn't.
|
|
build so external users of Support/TargetSelect.h will work correctly.
Previously these were defined via -D in CPPFLAGS.
Fixes llvmpipe erroring out due to no targets being registered.
ok patrick@
|
|
making sure LLVM_ARCH is set before including architecture-specific
Makefiles.
ok deraadt@
|
|
Generated with gmake and py-sphinx installed via
cd /usr/src/gnu/llvm/docs && gmake -f Makefile.sphinx man
|
|
This is required to build the radeonsi Mesa driver.
ok patrick@
|
|
|
|
symlink for libLLVM-7.so or libLLVM.so. Adjust llvm-config to cope and
force llvm-config DyLibExists to true.
This is specific to LLVM in base this patch should not be used in ports.
|
|
A build time dependency on python is avoided by generating the arch
specific list of library components in advance. A 'reconf' target
is included to regenerate them. Approach discussed with patrick@
|
|
ok hackroom@
|
|
ld(1) would try to free uninitialized memory when used with -r -b binary
<fontfile> by ports/textproc/mupdf. Perform the same bfd type check
as bfd_elf_match_symbols_in_sections(). Fix found the hard way,
cheese and wine sponsor: miod. Almost identical fix already present
upstream.
Also set the freed pointer to NULL, just in case.
ok tb@ sthen@
|
|
libLLVM from a single directory avoid reused filenames by symlinking
duplicated names with a prefix of the component library name so object
file names will be unique.
symlink approach suggested by deraadt@ ok patrick@
|
|
matches the result of building with cmake
ok patrick@
|
|
|
|
ok patrick@
|
|
As of usr.bin/xinstall/install.c revision 1.68, -S is a no-op and
install(1) will always create files safely, thus clean the option usage
from the tree.
Diff from Lauri Tirkkonen <lotheac at iki dot fi>, thanks.
|
|
- Target all four kinds of return bytes (c2, c3, ca, cb)
- Fix up instructions using both ModR/M and SIB bytes
- Force alignment before instructions with return bytes in immediates
- Force alignment before instructions that have return bytes in their encoding
- Add a command line switch to toggle the functionality.
ok deraadt@
|
|
load and store instructions. The vast majority of PowerPC CPUs that
OpenBSD runs on don't implement those and will generate an alignment
exceptions. While we do emulate lfd and stfd (to work around GCC bugs),
we don't emulate lfs and stfs. It is way more efficient to have the
compiler generate code that only uses aligned load and store instructions.
Based on a diff from Georg Koehler.
ok patrick@, visa@
|
|
ok hackroom@
|
|
ok patrick@
|
|
|
|
causes problems in the following files which use PIC as a variable name.
Undefine PIC in llvm-config.h to minimise the diff to upstream LLVM.
include/llvm/MC/MCObjectFileInfo.h
lib/MC/MCObjectFileInfo.cpp
lib/Transforms/Scalar/LICM.cpp
lib/Transforms/Utils/PredicateInfo.cpp
These are the files that would be built as part of a shared libLLVM.
There are other files with PIC variable names in clang code.
#undef PIC approach suggested by kettenis@
|
|
looking good sthen@, Great! bluhm@
|
|
looking good sthen@, Great! bluhm@
|
|
looking good sthen@, Great! bluhm@
|
|
looking good sthen@, Great! bluhm@
|
|
|
|
|
|
to fix a regression in floating point operations. Bluhm noticed that
the bc regression test has been failing after the upgrade to 7.0.1
because setting the floating point control register was in some cases
reordered erroneously.
Found and tested by bluhm@
ok bluhm@ kettenis@
|
|
ok hackroom@
|
|
FreeBSD/powerpc. From George Koehler.
ok millert@, deraadt@, visa@
|
|
"where is the kaboom?" deraadt@
|
|
been fixed in a much more complicated way upstream which we can't easily
backport and involves GPLv3 code as well. So instead simply nuke the addend
in the most convenient spot. Makes -Wl,-relax work well enough to link
base clang.
ok guenther@
|
|
ok dlg@
|
|
are on command-line.
and use a bool type for a boolean in C++.
ok kettenis@ deraadt@
|
|
in order the generate .eh_frame_hdr. In particular, don't rely on FDEs
pointing to the last CIE that was seen. Fixes exception handling issues
with clang++ on platforms that don't use ld.lld as the default linker.
ok deraadt@
|
|
alltraps_kern() is a trap function. Also initialize the struct
amd64_frame_cache in amd64_skip_prologue() which was missing.
Original diff from IIJ.
ok mpi mortimer kettenis deraadt
|
|
|
|
ok patrick@, naddy@
|
|
ok patrick@, naddy@
|
|
this is a bit different to gcc as gcc likes to use movs to move
stuff on and off the stack, and directly updates the stack pointers
with add and sub instructions. llvm prefers to use push and pop
instructions, is a lot more careful about keeping track of how
much stuff is currently on the stack, and generally pops the frame
pointer rather than do maths on it.
-msave-args adds a bunch of pushes as the first thing a function
prologue does. to keep the stack aligned, if there's an odd number
of arguments to the function it pushes the first one again to put
the frame back on a 16 byte boundary.
to undo the pushes the frame pointer needs to be updated in function
epilogues. clang emits a series of pops to fix up the registers on
the way out, but popping saved arguments is a waste of time and
harmful to actual data in the function. rather than add an offset
to the stack pointer, -msave-args emits a leaveq operation to fix
up the frame again. leaveq is effectively mov rbp,rsp; pop rbp, and
is a single byte, meaning there's less potential for gadgets compared
to a direct add to rsp, or an explicit mov rbp,rsp.
the only thing missing compared to the gcc implementation is adding
the SUN_amd64_parmdump dwarf flag to affected functions. if someone
can tell me how to add that from the frame lowering code, let me
know.
when enabled in kernel builds again, this will provide useful
arguments in ddb stack traces again.
|
|
"where is the kaboom?" deraadt@
|
|
|
|
ok hackroom@
|
|
From Brad
|
|
|
|
ok patrick@
|
|
Note that this will still produce binaries that have the read-only segment
placed before the executable segment. This means that on machines without
the NX bit, the read-only segment is now executable. However on machines
with an NX bit, the ordering used by lld means the program headers are no
longer executable since they are now part of the read-only segment.
ok deraadt@, naddy@
|
|
|
|
|