I'm a hard-agree with this, BTW. The ability to create the packages is the goal, and one that works fine. My issue has been getting the cross-compiled package (in this case, suricata6
) to work to validate rust-lang
. It's the second part I've been having issues with.
Upstreaming the tuples isn't any harder than maintaining the local patches/
to add the OpenWrt specific tuples. The patch file I created for the rust PR could be dropped into feeds/packages/lang/rust/patches
(and, in fact, was before I cloned rust-lang to submit the PR)
As you can see, at one point I worked to cross-map tuples between Openwrt's and the GNU standard tuple that rust-lang (and LLVM) use. Trying to sort out the ABI was reasonable on everything except ARMv7, and you saw the spaghetti waterfall of checks. Ideally, just using the tuple Openwrt wants to use internally keeps everything the same across the entire build environment. The only downside is the PR to rust-lang vs an update PR to openwrt-packages
. But, it isn't like that would be an issue outside of rust-lang
version updates, which would require an update anyway.
There were a few issues.. You can read them on the rustup PR (https://github.com/openwrt/packages/pull/13040)
My method has always been make it work and then figure out how to make it work while doing it right. I honestly couldn't tell you if a -mhard-float
target would work with rustup
because it was a non-starter once I learned it.
When I asked about the dynamic vs static linking, below is what I was told and have gone with.
I'm always open to suggestions and comments!