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

Modify CXXFLAGS suggestions in BOINC Wiki #5987

Closed
computezrmle opened this issue Jan 3, 2025 · 1 comment
Closed

Modify CXXFLAGS suggestions in BOINC Wiki #5987

computezrmle opened this issue Jan 3, 2025 · 1 comment

Comments

@computezrmle
Copy link
Contributor

The BOINC wiki suggests certain CXXFLAGS to be used for compiling the BOINC client:
https://github.com/BOINC/boinc/wiki/CompileClient#linux

For compiling a portable client on Linux in a VirtualBox VM it suggests this:
CXXFLAGS="-O3 -funroll-loops -fforce-addr -ffast-math"

This should be modified to something like this:
CXXFLAGS="-march=x86-64 -O3 -ffast-math"

Reasons

As of v7.1 VirtualBox supports x86-64-v3 if the host CPU is recent enough.
Using -march=x86-64 will create a portable binary being able to run even on older target CPUs regardless whether they are Intel or AMD.
Without that option a "native" binary will be created that may fail on those CPUs.

-funroll-loops should be removed.
According to the gcc manual it may or may not speed up the binary but will definitely enlarge it (which causes cache misses).

-fforce-addr (like -fforce-mem) is not mentioned any more in the gcc manual since v4.3.6.

@davidpanderson
Copy link
Contributor

Done - thanks

@AenBleidd AenBleidd moved this from Backlog to Done in Client/Manager Jan 5, 2025
@AenBleidd AenBleidd added this to the Client/Manager 8.0.5 milestone Jan 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

No branches or pull requests

3 participants