We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 2914 - --disable-assembly (#undef SDL_ASSEMBLY_ROUTINES) does not work
Summary: --disable-assembly (#undef SDL_ASSEMBLY_ROUTINES) does not work
Status: NEW
Alias: None
Product: SDL
Classification: Unclassified
Component: build (show other bugs)
Version: don't know
Hardware: All All
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-18 19:22 UTC by john
Modified: 2015-03-18 19:22 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description john 2015-03-18 19:22:22 UTC
Instances of asm, __asm__, and __asm appear all over the code unguarded by a preprocessor check for defined(SDL_ASSEMBLY_ROUTINES). The --disable-assembly flag is supposed to eliminate them by #undef-ing SDL_ASSEMBLY_ROUTINES.

This fails to compile in some cases. e.g., src/cpuinfo/SDL_cpuinfo.c will not compile under clang on Linux x86_64 when --disable-assembly is specified. The fix is trivial.

To fix: Insert a preprocessor check for "defined(SDL_ASSEMBLY_ROUTINES)" wherever asm, __asm__, or __asm appears. That will fix most of them. There are a few other places that will slip through, e.g., USE_ASM_STRETCH in src/video/SDL_stretch.c