Skip to content
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

bird2: replace gcc flag workaround with patch fixing alignment issues #1097

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

PolynomialDivision
Copy link
Member

Previously, we used the -mno-unaligned-access flag to instruct GCC to forbid unaligned memory access on arm processors. This was a workaround for alignment issues that caused crashes.

This commit imports a patch from the BIRD mailing list discussion [0] that resolves the alignment issue by modifying the net_addr structure, removing the need for the GCC flag. The patch addresses the alignment problem more efficiently and avoids the performance, code size, and hardware optimization drawbacks of the flag.

[0] - http://trubka.network.cz/pipermail/bird-users/2024-December/017957.html

Maintainer: @tohojo
Compile tested: arm7
Run tested: arm7

Previously, we used the -mno-unaligned-access flag to instruct GCC to
forbid unaligned memory access on arm processors. This was a workaround
for alignment issues that caused crashes.

This commit imports a patch from the BIRD mailing list discussion [0]
that resolves the alignment issue by modifying the net_addr structure,
removing the need for the GCC flag. The patch addresses the alignment
problem more efficiently and avoids the performance, code size, and
hardware optimization drawbacks of the flag.

[0] - http://trubka.network.cz/pipermail/bird-users/2024-December/017957.html

Signed-off-by: Nick Hainke <[email protected]>
@PolynomialDivision PolynomialDivision marked this pull request as draft December 18, 2024 00:14
@PolynomialDivision PolynomialDivision marked this pull request as ready for review December 18, 2024 00:21
Copy link
Contributor

@tohojo tohojo left a comment

Choose a reason for hiding this comment

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

Needs PKG_RELEASE bump...

@spolack
Copy link

spolack commented Dec 18, 2024

@tohojo
Copy link
Contributor

tohojo commented Dec 19, 2024

There are two patches upstream, let's include both - cf: http://trubka.network.cz/pipermail/bird-users/2024-December/017988.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants