-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Improve newlib constants #1335
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
Improve newlib constants #1335
Conversation
This is necessary to set socket options on the Nintendo Switch, which uses a socket implementation directly ported from FreeBSD.
r? @gnzlbg (rust_highfive has picked a reviewer for you, use r? to override) |
Some of the bots fail because of #1333 |
@leo60228 do you have a link to these definitions in newlib upstream ? |
Also, the Nintendo Switch libc bindings live here: https://github.com/rust-lang/libc/blob/master/src/switch.rs But maybe those aren't necessary anymore and can be deleted ? It would be great if you could add at least a test that builds libc for your target. Check https://github.com/rust-lang/libc/blob/master/ci/build.sh for how we do that for some targets, or |
@gnzlbg There's two Switch Rust toolchains; one based on newlib, and one based on pure Rust. switch.rs is for the pure Rust one. |
Newlib upstream doesn't support sockets beyond copying the headers from Linux when built for Linux. The Switch's sockets are ported directly from FreeBSD, so I copied them over. I could possibly add a cfg flag so that the constants are only used on the Switch? |
That .travis.yml says that it's using the dkp linker solely due to the outdated GBA CPU having problems with lld. I've been using dkp's linker for the Switch. Should I try to get it working with lld, or just use dkp's linker like the GBA does? DKP will still be necessary due to providing newlib for the Switch. |
All of the newlib Switch-specific stuff is in the libnx repo: https://github.com/switchbrew/libnx/tree/master/nx/external/bsd/include/sys I don't know why it's done this way when newlib includes headers itself for Cygwin and Linux, but... |
@gnzlbg The CI seems to work. |
@bors: r+ |
📌 Commit a92266b has been approved by |
Improve newlib constants This is necessary to set socket options on the Nintendo Switch, which uses a socket implementation directly ported from FreeBSD. Reopened from #1334 because I accidentally closed that.
💔 Test failed - checks-travis |
#1333 still hasn't been fixed yet. I'm on mobile, but I'm pretty sure that's what's causing Travis to fail. |
@bors: retry |
Improve newlib constants This is necessary to set socket options on the Nintendo Switch, which uses a socket implementation directly ported from FreeBSD. Reopened from #1334 because I accidentally closed that.
☀️ Test successful - checks-cirrus, checks-travis, status-appveyor |
This is necessary to set socket options on the Nintendo Switch, which uses a socket implementation directly ported from FreeBSD. Reopened from #1334 because I accidentally closed that.