Giter Site home page Giter Site logo

Comments (3)

madebr avatar madebr commented on July 17, 2024

Adding hardware specific flags like -mcpu=..., -march=..., -mtune=... does not belong in a build system.
In autotools land, users should configure their CFLAGS/CPPFLAGS correctly.
In CMake land, users should use an appropriate CMake toolchain file (and don't worry about -mcpu=... at all)

In the same vain I also don't think we should print a warning when no -mcpu=... command can be found in the CFLAGS.
It does not scale to other projects. You can't expect every OSS project to do these checks.

I think extending system-wide autotools/cmake rules makes more sense.

from sdl.

smcv avatar smcv commented on July 17, 2024

Adding hardware specific flags like -mcpu=..., -march=..., -mtune=... does not belong in a build system.

I agree. With my Debian hat on, we have recurring problems with upstream projects (in the same position as SDL) saying something like "well obviously nobody will run my software on an x86 without SSE" or "well obviously nobody will run my software on an ARM without NEON" and hard-coding their own -mcpu or -march which is higher than the baseline that Debian has chosen to make its minimum for a particular architecture, resulting in binaries that crash with an illegal instruction on baseline CPUs.

Choosing the baseline is something to be done by OS builders, not by individual upstream projects that become part of your OS or are compiled as addons to your OS. It should be possible to configure gcc at the time that you build gcc to have a particular baseline of your choice (definitely true on x86 and ARM, probably equally true on SPARC), so that all software that you build with that gcc binary will automatically assume that baseline unless forced to behave otherwise by options like -march. I would suggest doing that.

from sdl.

icculus avatar icculus commented on July 17, 2024

Sounds like this is a WONTFIX. Those that are building can configure/cmake with CFLAGS="-mwhatever" and get what they want.

from sdl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.