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

Replace -march=native from Makefile #50

Open
ptr1337 opened this issue Aug 1, 2023 · 2 comments
Open

Replace -march=native from Makefile #50

ptr1337 opened this issue Aug 1, 2023 · 2 comments

Comments

@ptr1337
Copy link

ptr1337 commented Aug 1, 2023

Hi,

As already stated in the PR (#49) this should be replaced with more default -march, since compiling this package to repositories will break the package, if the instruction set used from the builder is not supported from the user.

Since I don't feel well in providing that many information's for the registration, please any oracle member should work on this

@alan-maguire
Copy link
Member

we also build bpftune for aarch64, so maybe this will help cross-compile to x86_64 on other architectures, but it breaks existing native builds on aarch64 so is a step backwards. it would be nice to enable cross-compile, but the solution you've proposed breaks native compile so isn't workable.

@aviallon
Copy link

aviallon commented Nov 9, 2023

@alan-maguire -march=native is not necessary to build on any GCC supported architecture.

What it does is to enable the use of instructions specific to the builder's CPU, which may make the binary non-functional on any other machine, including those of the same micro-architecture but of a different model.

See : https://gcc.gnu.org/onlinedocs/gcc/x86-Options.html#index-march-16

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

No branches or pull requests

3 participants