Skip to content
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

OpenBSD #10

Closed
mulle-nat opened this issue Oct 18, 2021 · 7 comments
Closed

OpenBSD #10

mulle-nat opened this issue Oct 18, 2021 · 7 comments

Comments

@mulle-nat
Copy link
Member

mulle-nat commented Oct 18, 2021

Originally posted by @alepi in #1 (comment)

Hi, I am interested in porting mulle objc ecosystem to openbsd and I need some guidance for that.
For example, openbsd makes its own patches to llvm and clang and I may need some help with how mulle-clang is > changed compared to vanilla clang.
Is the community the right place to ask this kind of questions? :-)

@mulle-nat
Copy link
Member Author

mulle-nat commented Oct 18, 2021

It depends on the amount of patches that OpenBSD does. If you're really unlucky, it will hit some common code path. But I would not expect that. Mostly I would expect that you can take a 12.0.0 mulle-clang and apply the OpenBSD patches on top of it without problems. But you only know after trying :)

@alepi
Copy link

alepi commented Oct 18, 2021

OpenBSD makes some quite heavy changes to clang from what I saw.

For example, I tried to build a cross compiler to compile code from my Mac to OpenBSD and even the simplest C code crashes when run on OpenBSD.

I have built clang/llvm for Mac targeting linux before, so I have some experience with this... OpenBSD devs discourage anyone from trying to create a cross compiler that targets OpenBSD from what I read. Not impossible but not trivial as well.

Is it possible to have a repo with a set of patches for vanilla clang/llvm to enable mulle instead? Also, have you considered submitting your patches to the official clang/llvm community?

@mulle-nat
Copy link
Member Author

mulle-nat commented Oct 18, 2021

Clang/llvm is so huge, it's just a guess, if there are conflicts. You can grep through the sources looking for @mulle-clang@ and check the files affected and compare with the files affected by the OpenBSD patches. But then you could also just patch and see ;)

Sure it would be nice to have mulle-objc in mainline llvm, but it's still much too niche for that I believe.

The mulle-clang-project is a fork off llvm. The changes are always rebased on llvm on release. So you can use git to get a patch set from mulle/12.0.0 to the respective llvm tag. The actual commands to do this elude me, but probably git diff something ?

Coming to think of it, you could also take llvm with OpenBSD patches and then patch it with mulle/12.0.0. If it goes well, it goes well, if it doesn't, I suggest you abandon it. Doing clang/llvm development is a terrible waste of human lifetime.

@alepi
Copy link

alepi commented Oct 18, 2021

ok

@mulle-nat
Copy link
Member Author

mulle-nat commented Oct 18, 2021

And one more thing :) For the releases I use a script to rebase my changes on top of the llvm repository. It's probably not complicated to pull the OpenBSD branch into mulle-clang-project via another git remote and then run an edited version of the script to patch it.

@mulle-nat
Copy link
Member Author

Was it succesful ?

@mulle-nat
Copy link
Member Author

I guess not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants