This is an archive of the discontinued LLVM Phabricator instance.

MidnightBSD support in LLVM
Needs ReviewPublic

Authored by laffer1 on Sep 2 2018, 11:09 AM.

Details

Reviewers
jfb
Summary

Adds MidnightBSD operating system to LLVM.

Diff Detail

Repository
rL LLVM

Event Timeline

laffer1 created this revision.Sep 2 2018, 11:09 AM

Please upload patches with the full context (-U99999).
Also, i suspect the test coverage is missing.

Why to patch mips-specific code for MidnightBSD? Why to patch code for sanitizers and instrumentation in general?

The mips support is because I recently brought it into MidnightBSD for a future platform.

I can reroll the patch against SVN, but I did follow the guide for git https://llvm.org/docs/GettingStarted.html#checkout

arsenm added a subscriber: arsenm.Sep 3 2018, 3:34 AM

Are there any actual codegen changes vs. FreeBSD, since you seem to have just added handling to everywhere FreeBSD is? if not, can you just make this an alias of freebsd in the triple parsing?

CMakeLists.txt
811

Just drop the entire endif contents?

Are there any actual codegen changes vs. FreeBSD, since you seem to have just added handling to everywhere FreeBSD is? if not, can you just make this an alias of freebsd in the triple parsing?

MidnightBSD is a fork of FreeBSD rebranded as a distinct OS. I think that the correct solution is to fix MidnightBSD and let it to recognize self as (a legacy version of) FreeBSD.

Adding some more context, there are a few remixes of FreeBSD such as TruOS, GhostBSD, DesktopBSD etc... and all of them are custom reconfiguration of defaults and they keep self recognition to __FreeBSD__. MidnightBSD is similar, it's a remix of FreeBSD with GNUSTEP. For some reason the project decided to fork the FreeBSD distribution entirely, however over the years there were no[t so many] distinct features to recognize this OS as a distinct version of BSD ( https://github.com/freebsd/freebsd/blob/master/share/misc/bsd-family-tree ).

I know that this is harsh, but this is the current track of patches for MidnightBSD, that they are regularly rejected in projects. Unless the MidnightBSD community can attach a buildbot in the building farm, I recommend to reject this code and recommend to MidnightBSD to fix self-recognition... and probably rebase to recent FreeBSD to get MIPS support also in sanitizers.

What are the requirements for the build farm? At most I could probably spin up an AWS instance right now.

Does every project get treated like this when they try to add support? Did you make Linus provide build hardware too?