[clang] [llvm] [llvm] Add triples for managarm (PR #87845)
Arsen Arsenović via llvm-commits
llvm-commits at lists.llvm.org
Wed May 29 10:49:19 PDT 2024
ArsenArsen wrote:
(context: I work(ed) on managarm, but haven't interacted with the LLVM port on it nearly at all, and have never added targets to LLVM)
The `Kernel` environment probably was added is to mimic what gnuconfig does:
```
~$ /usr/share/gnuconfig/config.sub x86_64-managarm-kernel
x86_64-pc-managarm-kernel
~$ /usr/share/gnuconfig/config.sub x86_64-linux-kernel
Invalid configuration 'x86_64-linux-kernel': 'linux' does not support 'kernel'.
~ 1 $
```
It might be reasonable to constrain it to `managarm` (as gnuconfig does).
> Does your OS need a different target triple for kernel development? Note that almost all other OSes don't make the target triple distinction.
It does for GCC, at least for libstdc++. I don't know how LLVM works, so I can't comment there.
The kernel environment could also conceivably be a multilib of `*-*-managarm*-*` in general. I haven't done the work necessary to implement that in our GCC port yet, but it's been simmering in the back of my mind for a while. Generally, though, I don't buy that an OS triplet covers said OSes kernel. It seems simpler for kernel compilers to be kernel compilers (perhaps via multilib).
WRT niche, I don't disagree - that's part of why I haven't upstreamed anything into GCC either. The other part is that I haven't worked enough on the port to consider myself confident in quality for inclusion (but that doesn't have an influence on the LLVM port)
https://github.com/llvm/llvm-project/pull/87845
More information about the llvm-commits
mailing list