oracle / bpftune

bpftune uses BPF to auto-tune Linux systems
Other
685 stars 59 forks source link

Replace -march=native from Makefile #50

Open ptr1337 opened 1 year ago

ptr1337 commented 1 year ago

Hi,

As already stated in the PR (https://github.com/oracle/bpftune/pull/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 commented 1 year ago

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 commented 11 months ago

@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