Skip to content

tests/unittests: fix GCC compiler bug in core-atomic for SAML1X#13462

Merged
kaspar030 merged 2 commits into
RIOT-OS:masterfrom
dylad:pr/saml1x/fix_unittests
Feb 26, 2020
Merged

tests/unittests: fix GCC compiler bug in core-atomic for SAML1X#13462
kaspar030 merged 2 commits into
RIOT-OS:masterfrom
dylad:pr/saml1x/fix_unittests

Conversation

@dylad

@dylad dylad commented Feb 24, 2020

Copy link
Copy Markdown
Member

Contribution description

This PR provides a quick (dirty ?) fix for SAML1X families and unittests.
In fact, this PR extends a current fix that was there to fix a previous compiler issue when I was porting SAML10/SAML11 MCUs. I don't know if this is the best way to handle it...

Testing procedure

Compile tests/unittests on SAML10 or SAML11 boards.

Issues/PRs references

#13459

@dylad dylad added Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) Area: tests Area: tests and testing framework CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Area: cpu Area: CPU/MCU ports labels Feb 24, 2020
@dylad dylad added this to the Release 2020.04 milestone Feb 24, 2020
@dylad dylad requested a review from kaspar030 February 24, 2020 21:46
@dylad dylad requested a review from miri64 as a code owner February 24, 2020 21:46
Comment thread tests/unittests/tests-core/tests-core-atomic.c Outdated
@benpicco

Copy link
Copy Markdown
Contributor

Murdock is happy, please squash

@benpicco

Copy link
Copy Markdown
Contributor

You forgot to remove the saml1x boards from BOARD_BLACKLIST

@dylad

dylad commented Feb 25, 2020

Copy link
Copy Markdown
Member Author

You forgot to remove the saml1x boards from BOARD_BLACKLIST

Which blacklist are you referring to ? I didn't find it.

@benpicco

Copy link
Copy Markdown
Contributor

The one added by 13a6cfb

@dylad

dylad commented Feb 25, 2020

Copy link
Copy Markdown
Member Author

The one added by 13a6cfb

Oh, this PR needs a rebase then... I thought I was blind or something.

@dylad dylad force-pushed the pr/saml1x/fix_unittests branch from f150494 to 33d61a7 Compare February 25, 2020 20:36
@dylad

dylad commented Feb 25, 2020

Copy link
Copy Markdown
Member Author

Should be good now.

@benpicco

Copy link
Copy Markdown
Contributor

You can squash directly 😉

@benpicco benpicco left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Murdock will confirm this mitigated the issue for now.

@dylad dylad force-pushed the pr/saml1x/fix_unittests branch from 33d61a7 to 604356b Compare February 25, 2020 20:42
@dylad

dylad commented Feb 26, 2020

Copy link
Copy Markdown
Member Author

@kaspar030 any words before pushing the big button ?

Comment thread boards/pba-d-01-kw2x/include/board.h Outdated
@kaspar030

Copy link
Copy Markdown
Contributor

@kaspar030 any words before pushing the big button ?

Let's not forget to re-check on the next toolchain upgrade. Disabling atomics optimization cannot be good. :)

@dylad dylad force-pushed the pr/saml1x/fix_unittests branch from 604356b to fd98443 Compare February 26, 2020 09:56
@dylad

dylad commented Feb 26, 2020

Copy link
Copy Markdown
Member Author

Let's not forget to re-check on the next toolchain upgrade. Disabling atomics optimization cannot be good. :)

I will try to remember it :) But seems like this bug is getting worse on newer toolchain

@kaspar030

kaspar030 commented Feb 26, 2020

Copy link
Copy Markdown
Contributor

But seems like this bug is getting worse on newer toolchain

really? did you try a gcc-10 release snapshot?

@dylad

dylad commented Feb 26, 2020

Copy link
Copy Markdown
Member Author

really? did you try a gcc-10 release snapshot?

No but I ported this MCU one year ago and during the port I already had this issue.

At this time, only one function was affected but now there is three.

@kaspar030

Copy link
Copy Markdown
Contributor

&go.

@kaspar030 kaspar030 merged commit 426b0d7 into RIOT-OS:master Feb 26, 2020
@dylad dylad deleted the pr/saml1x/fix_unittests branch February 26, 2020 12:33
@dylad

dylad commented Feb 26, 2020

Copy link
Copy Markdown
Member Author

Thanks @kaspar030 !
I'll keep an eye on it with newer GCC version.

dylad added a commit to dylad/RIOT that referenced this pull request May 30, 2023
This reverts RIOT-OS#13462, this workaround is no longer needed with newer GCC version

Signed-off-by: Dylan Laduranty <dylan.laduranty@mesotic.com>
bors Bot added a commit that referenced this pull request May 30, 2023
19686: sys/string_utils: add memchk() r=maribu a=benpicco



19687: tests/unittests: remove old workaround for SAML1X and gcc9.X bug r=maribu a=dylad

### Contribution description
This reverts #13462, this workaround is no longer needed with newer GCC version.

### Testing procedure

Try to compile tests/unittests for `saml11-xpro` or `saml10-xpro`

### Issues/PRs references

This is a revert of #13462.


Co-authored-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
Co-authored-by: Dylan Laduranty <dylan.laduranty@mesotic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: cpu Area: CPU/MCU ports Area: tests Area: tests and testing framework CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants