Re-organized the QNX support.#4984
Conversation
As most of the differences are related to the change in network stack half-way through the life of QNX Neutrino 7.1, the definitions are now split into io-pkt (the older stack) and io-sock (the newer stack). I didn't add any architecture definitions for x86 (as would be required for i686-pc-nto-qnx700) because I don't have access to QNX Neutrino 7.0 to verify what should go here. But there's a clear place to add it later. I do have QNX Neutrino 7.1 and QNX OS 8.0 and I have verified each of the types in the io-pkt and io-sock modules against the relevant C header files. I have not verified the remaining types or functions - I assume they are correct.
|
Force push some formatting fixes. |
5862404 to
f3a43cf
Compare
|
I tried to tell bootstrap to use this libc, but this repo has 1.0.0-something and my rust source build wants libc 0.2, so it ignored the |
|
I rebased these changes onto the libc-0.2 branch, built a libstd for AArch64 QNX 7.1 with io-sock, built some test programs that do threading and networking, sent to them an AArch64 QNX Neutrino 7.1 instance on AWS, and they worked OK. So I'm fairly confident I've not broken anything catastrophically. I can send the libc-0.2 PR once this is merged, if that's useful. |
There was a problem hiding this comment.
Do io_pkt and io_sock match up with specific headers or directories? If so, they can go in src/new/nto which is where we're migrating files that closer match up with source. (Ideally also add a tag like //! Header: uapi/linux/can.h` to make it easy to match up). You can re-order things to be in the same order as the source headers too if it's easier to follow.
I assume neutrino.rs could probably also move here
There was a problem hiding this comment.
There are two trees, one for io-pkt and one for io-sock. They contain files with the same names, and the file contents are similar but slightly different.
I guess there's a trade-off between having the Rust code faithfully match the C headers, but with a lot of duplication. Or, as I have done here, have one Rust file that covers all the common elements, and then have only their differences pulled out to their own files.
Description
As most of the differences are related to the change in network stack half-way through the life of QNX Neutrino 7.1, the definitions are now split into io-pkt (the older stack) and io-sock (the newer stack).
I didn't add any architecture definitions for x86 (as would be required for i686-pc-nto-qnx700) because I don't have access to QNX Neutrino 7.0 to verify what should go here. But there's a clear place to add it later.
I do have QNX Neutrino 7.1 and QNX OS 8.0 and I have verified each of the types in the io-pkt and io-sock modules against the relevant C header files. I have not verified the remaining types or functions - I assume they are correct.
This is an alternative to #4615, which seems to have stalled.
Sources
For io-sock, QNX says:
For io-pkt, you can refer to https://www.qnx.com/developers/docs/7.1/.
Checklist
libc-test/semverhave been updated*LASTor*MAXare included (see #3131)cd libc-test && cargo test --target mytarget); especially relevant for platforms that may not be checked in CI