-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CHERI LLVM updates #179
base: main
Are you sure you want to change the base?
CHERI LLVM updates #179
Conversation
Update to the latest snapshots. We've done OK so far with installing standard headers as part of devel/llvm## ports so extend that to these ports. This is certainly correct for llvm-cheriot. Practical testing is likely required for the others. (cherry picked from commit ffb78cd)
Arm has merged LLVM 15 changes into Morello LLVM. Sponsored by: DARPA, AFRL (cherry picked from commit 9584352)
Sponsored by: DARPA, AFRL (cherry picked from commit c85e97b)
Align license section with other devel/llvm* ports. Only add per-LLVM release patches if any exist. Sponsored by: DARPA, AFRL (cherry picked from commit f661b45)
The CHERIoT LLVM baseline has been updated to LLVM 17. Sponsored by: DARPA, AFRL (cherry picked from commit 56f3450)
which is the same symptom as before. |
I can see in upstream that devel/llvm17 installs standard headers but devel/llvm15 still does not. It might be worth checking if devel/llvm17 can build multimedia/libv4l on FreeBSD to know if this problem will go away once llvm-morello reaches 17. |
Including this header standalone without errors is exactly one of the reasons why stddef.h was previously removed from the package. Since most ports in FreeBSD will use the system compiler, not a devel/llvmN port, you're not going to notice most of the issues for FreeBSD. The headers should not be introduced upstream in any LLVM port, CHERI or otherwise, until a full exp run has been done using LLVM from ports as the system compiler on FreeBSD. |
There are still some rough edges when used as a ports compiler.
All LLVM ports in the tree use the Apache License 2.0 with LLVM Exceptions license so cerntralize the definition. Sponsored by: DARPA, AFRL (cherry picked from commit 18840af)
While most ports that need to override it can do so after including Makefile.LICENSE, CHERI-LLVM derivatives benefit from being able to pre-define it. Sponsored by: DARPA, AFRL (cherry picked from commit fc0da5a)
All LLVM ports excluded it from the list as it was removed many years ago. Sponsored by: DARPA, AFRL (cherry picked from commit d17143d)
WRKSRC moved to the top of the source tree with llvm12. As a result, LICENSE_DIR became ${WRKSRC}/llvm. Given that llvm11 the only port that wasn't setting LICENSE_DIR, flip the script and default to ${WRKSRC}/llvm with llvm11 overriding. Sponsored by: DARPA, AFRL (cherry picked from commit 4f177ec)
The location of this license file moved in LLVM 16. Since I'm doing cleanup in this area and the split of ports is about 50/50, switch to setting the old location in the older ports so the newer ports set fewer variables. Sponsored by: DARPA, AFRL (cherry picked from commit 57f97b3)
Move condiationl EXTRA_PATCHES additions after bsd.port.pre.mk so PATCHDIR is defined. Sponsored by: DARPA, AFRL (cherry picked from commit dab073e)
This adds clangd among other things. (Due to the port structure, this includes a graturious PORTREVISION bump in llvm-cheriot. It doesn't seem worth the effort to avoid at this point.) (cherry picked from commit f7f5f91)
I've pushed a revert to the branch and more recently pushed an update to add clang-tools-extras. Upstream I think the current state of affairs is a better balance given there's no supported, practical way to replace the base compiler with one of the llvm ports. |
In this specific case I think I've convinced myself that it's a bug that execinfo.h relies on header pollution to include sys/cdefs.h for |
It's not clear to me. I think it would be justified for our stddef.h to stop including sys/cdefs.h and break such cases. But at the same time whether including stddef.h includes sys/cdefs.h or not shouldn't really vary between compilers used. |
Hmm, it looks like gcc's stddef.h includes sys/_types.h for FreeBSD and only FreeBSD which includes sys/cdefs.h (for no reason that I can see). FreeBSD's stddef.h includes sys/_types.h and directly includes sys/cdefs.h for |
This should have been updated as part of the commit below and the PORTREVISION bump did apply to all. I was working on two things related to these ports (one of which didn't touch llvm-cheriot) and got mixed up. Reported by: jrtc27 Fixes: f7f5f91 devel/llvm-{cheri,morello}: add clang-tools-extras (cherry picked from commit fce28cc)
llvm-debuginfo-analyzer isn't part of Clang, but was matched by the overly broad pattern `-analyzer`. Reported by: jrtc27 Sponsored by: DARPA, AFRL (cherry picked from commit f3f26e7)
Pull in upstream patches to the CHERI LLVM ports.
The cherry-pick of ffb78cd is probably the biggest concern as it adds back std*.h headers. In the testing I was able to do on ordinary FreeBSD I didn't encounter issues and I've received no reports, but it may well be that we'll hit issues in CheriBSD ports builds.