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

improve portability #457

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

rbgarga
Copy link

@rbgarga rbgarga commented Nov 29, 2024

  • configure: improve portability
  • libxdp: improve portability
  • configure: detect systems without gcc
  • libxdp: improve portability

No functional changes intended

BSD grep has no -P parameter, replace it by a sed pattern that works
both on GNU and BSDs.

Signed-off-by: Renato Botelho do Couto <[email protected]>
BSD sed fails with "extra characters at the end of p command" error
without the semicolon after p command while GNU sed works both ways.

Signed-off-by: Renato Botelho do Couto <[email protected]>
Let the build to happen using clang when gcc is not available

Signed-off-by: Renato Botelho do Couto <[email protected]>
Small adjustment on xdp-dispatcher.c.in to make it to build fine with
both GNU and BSD m4

Signed-off-by: Renato Botelho do Couto <[email protected]>
xdp_multiprog__dispatcher() was removed by f0a2055
clang's lld refuses to link without architecture being passed using -m
@rbgarga
Copy link
Author

rbgarga commented Nov 29, 2024

I'm still unable to build it on arm64 system due to linking error

ld -r -b binary -o xdp-dispatcher.embed.o -z noexecstack --format=binary xdp-dispatcher.o
ld: error: target emulation unknown: -m or at least one .o file required

I don't know expected approach for this one, if you prefer to keep calling ld and pass -m parameter for current architecture or instead, use gcc/clang for linking

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.

1 participant