241 Commits

Author SHA1 Message Date
jca
1e1521f098 Fix LIB_DEPENDS-lldb in some edge cases on ports-gcc archs.
where we need a way to get to gcc-libs/libestdc++.  This happened to
work so far except when it didn't (slight differences between built
and already installed llvm packages, maybe?), as found the hard way by
cwen@.

Our COMPILER support automatically amends WANTLIB and LIB_DEPENDS, so
use those to explicitely set:
- WANTLIB-main and WANTLIB-lldb
- LIB_DEPENDS-main and LIB_DEPENDS-lldb
2019-05-22 11:03:47 +00:00
jca
ac6d437677 Set devel/llvm as a RUN_DEPENDS for lldb, not a LIB_DEPENDS
Since libLLVM-x.so isn't a properly versioned shared library, we can't
use LIB_DEPENDS/WANTLIB to register the dep.
2019-05-22 10:29:00 +00:00
jca
19cde7c50f Missed in previous. 2019-05-08 22:34:02 +00:00
jca
4663337cd2 Remove -extras subpackage (already disabled)
Discussed with rsadowski@
2019-05-08 21:53:20 +00:00
jca
c9bdddaea7 Now that we have ports-gcc-8, enable lldb on ports-gcc archs
While here remove PSEUDO_FLAVORS and other goo to make lldb conditional.
From Brad.
2019-05-08 21:48:20 +00:00
jca
8cf3ed58bc Actually disable -extras
no_* PSEUDO_FLAVORS are ignored under dpb(1) / BUILD_ONCE=Yes
Reminded by naddy@
2019-05-03 20:20:05 +00:00
jca
8984253f03 Reorder Makefile, add explicit CONFIGURE_STYLE 2019-04-29 12:37:52 +00:00
jca
35f3170bf7 Bump the -main subpackage to clean up the changes from -extras.
Discussed with sthen@
2019-04-29 11:56:40 +00:00
jca
be8a861a0b Disable -extras for now, it changes the content of the -main subpackage.
Breakage in devel/include-what-you-use reported by sthen@
2019-04-29 11:44:01 +00:00
rsadowski
5e00888b26 Add Clang extra tools
The clang-tools-extra package contains helpful developer tools using
Clang's APIs.

Initial diff from me, further work by jca@ with feedback from sthen@.

OK jca@ and @sthen
2019-04-28 11:00:08 +00:00
naddy
b7e8ac93a7 Switch ports-gcc to GCC 8.3.0:
* switch gcc4 module to gcc/8
* register the gcc/8 subpackages as updates for their gcc/4.9 counterparts
* sync the gcc version in devel/llvm
* add a quirk entry that gcj is obsolete
* unhook 4.9 from the build

Preparatory work by many.
ok sthen@
2019-04-27 21:26:34 +00:00
jca
a10d055774 Disable failing static_assert to let other tests run. 2019-04-22 17:24:26 +00:00
ajacoutot
624a6e6410 MESSAGE -> README
ok jca@ (maintainer)
2019-03-09 06:18:11 +00:00
naddy
b1eb1d48fd bump for plist changes 6.4 -> 6.5 2019-02-28 01:52:37 +00:00
jca
41787fafb6 X86FixupGadgets improvements from base
diff from Brad
2019-02-24 20:53:56 +00:00
jca
18a7533bd3 Merge various improvements from base
- avoid naming clash, bsd.lib.mk defines "PIC"
- x86: floating point fixes (backported from upstream)
- powerpc: avoid unaligned floating-point load and store instructions
(Initial diff by George Koehler)
- lldb, x86: skip retguard instructions in prologue detection

Diff from Brad
2019-02-20 00:24:11 +00:00
jca
e1036d9fc7 Fix long double size on powerpc
from George Koehler
2019-02-11 05:33:57 +00:00
jca
f036c6c741 Readd -msave-args and add support for getting thread name
from Brad
2019-02-11 05:24:16 +00:00
jca
822c559486 Back out the -msave-args addition, it breaks lang/rust on amd64
Pointed out by semarie@
2019-02-03 18:29:48 +00:00
jca
5920dd8509 Merge -msave-args support implemented by dlg in base clang
from Brad
2019-01-31 13:40:22 +00:00
semarie
2862edd08c backport patches to devel/llvm
- da1fb72bb3
- cc1f2a595e

it should unbreak firefox: firefox uses rustc with `-C lto' option for
some part of its build, and this code path expose the llvm bug.

llvm review: https://reviews.llvm.org/D52340
rust issue: https://github.com/rust-lang/rust/issues/57762

bump lang/rust to ensure updated statically linked libraries are taken on update.

ok jca@
2019-01-30 07:36:06 +00:00
jca
608b768579 Simplify patch, add lld -z interpose, more fixes from patrick@
from Brad, thanks
2019-01-28 15:34:22 +00:00
jca
21b863839c Update to llvm-7.0.1 (and include-what-you-use-0.11)
All the work done by Brad except for some fixes from base by mortimer@
and patrick@

Tests: amd64 Brad, jsg@ and me, i386: Brad, mips64: visa@, sparc64 me.
No tests on powerpc but a test build with only the PowerPC backend
packages on amd64.
2019-01-28 06:27:28 +00:00
jca
1f8c09b753 Sync bits from base
- don't build clang itself with -fno-ret-protector and -mno-retpoline,
to regain performance
- use -mretpoline by default on amd64
- fix printf %b length specifiers

from Brad
2019-01-14 16:08:44 +00:00
jca
56023a8d74 Actually depend on the g++ package on non-clang archs
On non-clang archs, ports-clang uses the libestdc++ backend from
ports-gcc, so it needs the headers in the g++ package at runtime.

Testing CHOSEN_COMPILER == "ports-gcc" is nice semantically but since it
happens after including bsd.port.mk, it's too late to change TEST/RUN_DEPENDS.
Use a different test that may not be optimal but works in practice, so that
the dep is correctly registered.

This should fix random build failures due to dpb junking in bulk builds
on non-clang archs.

Problem pointed out by Goerge Koehler, ok sthen@
2019-01-05 11:38:49 +00:00
jca
ea572b9bd1 Stop using -mlongcall on powerpc
Using long calls means slower code.  It is not useful right now because
the size of the llvm executables has been reduced, as shown by tests by
Charlene Wendling.  And it breaks compilation with gcc 6, as pointed out
by a report from George Koehler.
2019-01-04 00:14:57 +00:00
jca
ee542c5865 Take devel/llvm maintainership
The goal is to provide quick feedback on proposed diffs, and enforce
testing on at least one gcc arch (probably sparc64) before diffs get
committed.  All contributions are still welcome.

Maintainer timeout, ok ajacoutot@ visa@ naddy@ sthen@ espie@
2018-12-15 15:21:48 +00:00
semarie
2fcf889dd6 unbreak lldb python module by making the symlink to point to versioned liblldb.so
tweak and ok jca@
2018-12-07 09:01:39 +00:00
sthen
c380b5a309 subpackage LLDB, and knock out that subpackage on arches where we
build with ports-gcc which isn't yet in shape to build LLDB.

tests and tweaks from various people including jca@, landry@,
Charlene Wendling, and probably others -- ok jca@
2018-12-06 21:51:01 +00:00
ajacoutot
8730604019 Remove duplicates. 2018-11-21 12:46:00 +00:00
ajacoutot
9c67f8ed48 Adjust PLIST with PFRAG to deal with PowerPC specific build behavior.
from Brad (maintainer)
2018-11-21 08:03:05 +00:00
ajacoutot
82187d36a5 From upstream:
- [mips] Prevent PIC to be set to level 2
- [mips] Improve handling of -fno-[pic/PIC] option
- [PowerPC] Set the default PLT mode on OpenBSD/powerpc to Secure PLT.

- Remove PowerPC -nopie workaround
- Add workaround to PowerPC to only build the PowerPC backend as a means
  of reducing the code size
- Enable building on PowerPC

from Brad (maintainer)
This allows building webkitgtk4 on OpenBSD/powerpc
2018-11-19 08:51:03 +00:00
ajacoutot
348faba600 Revert, it breaks the build on (at least) i386.
spotted by sthen@, thanks!
2018-11-18 13:50:36 +00:00
ajacoutot
298d4badff - [mips] Prevent PIC to be set to level 2
- [mips] Improve handling of -fno-[pic/PIC] option

from Brad (maintainer)
2018-11-18 09:02:56 +00:00
ajacoutot
634e5c9204 - Sync with base:
add PowerPC Secure PLT support and enable Secure PLT by default for
OpenBSD.

from Brad (maintainer)
2018-11-17 08:32:38 +00:00
sthen
6b8e265514 bump ports known/suspected to be affected by issue with libedit/libreadline
and termcap on lld arches.
2018-11-14 20:48:21 +00:00
ajacoutot
aa81e92d88 Merge from upstream:
- [Sparc] Add mnemonic aliases for flush, stb, stba, sth, and stha
- [Sparc] Add membar assembler tags

from Brad (maintainer)
2018-11-14 09:07:41 +00:00
ajacoutot
1e6c9d2358 Sync OpenBSD driver code a bit closer to upstream.
from Brad (maintainer)
2018-10-29 08:36:35 +00:00
ajacoutot
9b536d7f79 Sync with base:
- Accept both `--foo bar` and `--foo=bar` styles options.
- Add support for -z initfirst.
- Generate __data_start symbol that marks the start of .data when __data_start
  is referenced from code being linked.

From Brad (maintainer)
2018-10-25 09:25:38 +00:00
ajacoutot
e443ecd01a Sync with base:
When merging sections into the output, lld tries to adjust the alignment of
the section to be at least as large as the entry size of the section.
This causes a later check that validates the alignment to fail if the
entry size isn't a power of two.  This happens when building some of the
java support code in ports gcc.  Fix this by sticking to the original
alignment if the entry size isn't a power of two.

from Brad (maintainer)
2018-10-23 08:59:59 +00:00
ajacoutot
85514ee306 Resolve file collision with py-six by removing the copy of Six shipped
with LLVM and add a build depends on py-six.

From Brad (maintainer)
2018-10-17 08:35:55 +00:00
ajacoutot
e8b39de277 Add LLDB.
from Brad (maintainer)
input and ok sthen@
2018-10-06 15:27:10 +00:00
ajacoutot
de82d6b432 Sync with base:
Allow preemption of functions with protected visibility.  Disallowing this
makes no sense.  Yes it breaks function address equality and therefore
the expectations of the standard C language.  However declaring symbols
with protected visibility isn't standard C in the first place.

from Brad (maintainer)
2018-09-30 10:57:28 +00:00
ajacoutot
8790d8dfed 2 patches from upstream:
- Initialize LiveRegs once in BranchFolder::mergeCommonTails
- [CodeGen] Initialize large arrays by copying from a global

from Brad (maintainer)
2018-09-21 08:56:06 +00:00
ajacoutot
482ca16c44 Fix --exclude-libs option.
from Brad (maintainer)
2018-09-16 06:09:16 +00:00
ajacoutot
3a1f1f84e9 [x86] Fix a really subtle miscompile due to a somewhat glaring bug in EFLAGS
copy lowering.

from upstream via Brad (maintainer)
2018-08-27 08:46:52 +00:00
ajacoutot
14520cde72 Bring retguard for arm64 from base.
from Brad (maintainer).
2018-08-21 06:56:09 +00:00
ajacoutot
e12b1b2c51 Fix for --sysroot.
from Brad (maintainer)
2018-07-16 07:26:18 +00:00
sthen
d64cdb6a21 - set PKGSPEC-main in devel/llvm, which provides the default pkgspec for
dependent ports, this restricts deps to use the current clang version
which is required for some ports using the unversioned libLLVM*.so
library. see https://marc.info/?l=openbsd-ports&m=152377935312657&w=2

- set RUN_DEPENDS on devel/llvm in lang/crystal as it uses libLLVM*.so
breakage reported by James Turner

I don't like this at all, but don't see what other option we have,
if anyone has a better idea please pipe up.
2018-07-12 21:19:34 +00:00
ajacoutot
5abfe5c4c7 Sync with what was commited upstream:
[mips][ias] Enable IAS by default for OpenBSD / FreeBSD mips64/mips64el.

from Brad (maintainer)
2018-07-08 10:32:45 +00:00