Comments (3)
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.
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.
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)
- Solaris 10 does not include compatible UTF8 support by default, SDL2 cannot compile HOT 2
- SDL_FALLTHROUGH check in ./include/begin_code.h incompatible with Solaris 10 UNIX "make" HOT 8
- SDL2 threading config in ./cmake/sdlchecks.cmake not correct for non-GNU compiler (e.g. SunPro cc) HOT 2
- UNIX version of SDL_GetBasePath in SDL_sysfilesystem.c not correct for Solaris, probably other UNIXes HOT 2
- SDL incorrectly detects X11_XRANDR with CMake, does not compile on Solaris 10
- SDL build with configure (autoconf) incorrectly tries to build with Vulkan support on Solaris 10 (probably other UNIXes) HOT 11
- SDL loads wrong controller definition from gamecontrolllerdb HOT 6
- VC : Add /MT /MTd and /MD /MDd in artifacts github HOT 2
- Feature: Open SDL_StepUTF8() for public use HOT 3
- Switch SDLK_PERCENT and SDLK_DOLLAR to match ascii values? HOT 1
- KMSDRM: Garbled video with testgles2 on NVIDIA Tegra HOT 5
- doctest + SDL2main : error LNK2019 (despite using DOCTEST_CONFIG_IMPLEMENT) HOT 13
- Multiple Windows and SDL_EVENT_QUIT failure HOT 3
- SDL_RenderReadPixels doesn't give the same data depending on if the app is fullscreen or not HOT 11
- Encoding of paths in file dialogs HOT 3
- SDL_x11shape.c syntax error if SDL_X11_XSHAPE is disabled HOT 1
- segfault in testaudio HOT 2
- Issue with sdl output with AMD graphic
- Cannot create renderer even after `SDL_DestroyWindowSurface` has been called on a window HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sdl.