riscv: fix tests/pkg_wolfssl and tests/lwip_gnrc_udp when building with default options#12502
Conversation
This is not an optimization issue I think. Let me try something. |
(IPv6 addresses in lwIP are not just represented by their actual bytes as they are typically in RIOT, but also contain a bunch of lwIP-specific meta information. So I think this is just a byte-width issue) |
|
See aabadie#14 |
9a51fa0 to
e67b9d5
Compare
|
The build passed on Murdock so I squashed and added you (@miri64) as co-author of the commit (since you found the solution). |
|
I'd ACK, but I provided ~50% of the code, so please, somebody else review it. |
e67b9d5 to
b9a380c
Compare
|
@miri64, I reverted the opt flags changes for riscv and went for your suggestion of disabling maybe-uninitialized when building wolfcrypt. |
@benpicco maybe? |
Co-authored-by: Martine Lenders <m.lenders@fu-berlin.de>
Only when building with riscv toolchain, because the default optimization used can lead to this problem.
b9a380c to
02ff487
Compare
Done and directly squashed after verification that the test still passes on native (and still builds for hifive1 board). |
benpicco
left a comment
There was a problem hiding this comment.
Fixes how the parameters for memcpy are derived, but the values don't change.
Also suppresses a warning - no functional changes.
benpicco
left a comment
There was a problem hiding this comment.
Fixes how the parameters for memcpy are derived, but the values don't change.
Also suppresses a warning - no functional changes.
|
Done #12524 :) |
Contribution description
This PR is an attempt to get a working build on hifive1/hifive1b boards with tests/pkg_wolfssl and tests/lwip_gnrc_udp applications. The failures were reported in RIOT-OS/Release-Specs#140 (comment) and RIOT-OS/Release-Specs#140 (comment).
For the wolfssl test application, removing the optimization flash from the debug flags of the toolchain fixed the issue.
For the lwip_gnrc_udp, I'm less sure of the fix because I have to admit I don't really understand the error message. Disabling any GCC optimizations on the problematic functions fix the build issue. But maybe there's an option that would be better ? Any better suggestion is welcome (I also set the RFC label because of this)
Since this PR is touching the RISV toolchain options, it may have other impacts I didn't think of.
Testing procedure
At least the 2 related applications should still work.
But better test all applications on hifive1.(the fixes are more localized now /@miri64)Issues/PRs references
Reported in RIOT-OS/Release-Specs#140