Commit Graph

35 Commits

Author SHA1 Message Date
Sam Lantinga
9853ab62c8 Switched back to configure generating SDL_config.h
It was very confusing to have configure generate an SDL_config.h and then not have it be used when building on Mac OS X or Windows.  I'll just have to remember to use SDL_config_windows.h when building official releases that are supposed to be ABI compatible with Visual Studio.
2012-01-19 01:55:51 -05:00
Sam Lantinga
d4c4a98f59 Make sure that we use consistent configuration options on platforms like Windows so that command line builds and IDE builds have ABI compatibility.
Make sure we don't clobber SDL_revision.h when building from Mercurial
2012-01-14 13:21:19 -05:00
Sam Lantinga
aeb5be9fe8 This file keeps getting clobbered... *sigh* 2012-01-03 01:46:52 -05:00
Sam Lantinga
2da6fd7637 Fixes bug 1296 - SDL_SetVideoMode crashes because of unaligned MOVAPS instruction
t.grundner@goto3d.de 2011-09-01 03:59:17 PDT
I figured out what is going on. GCC 4.5.2 assumes the stack is 16 byte aligned
by default. Therefore there are no AND alignment corrections necessary if we
wish to align a stack variable to a 16 byte boundary. That is bad if your OS
ABI is not 16 byte aligned. Windows 32 bit stacks are 4 byte aligned. This
results in the above mentioned SIGSEGV. This is also no problem if I compile
both SDL.dll and my app with MingW because MinGW/GCC inserts a

        andl    $-16, %esp

instruction right in the beginning of the main function. So at least the stack
of the thread calling the main function is 16 byte aligned. But as soon as I
start to use the SDL.dll from an application not compiled by MinGW there is no
ANDL safing my app.

However there is a GCC option that can change the default stack alignment:

        -mpreferred-stack-boundary=num

Setting num=2 assumes a the stack is aligned to a 4 byte boundary. This results
in GCC inserting the necessary

        andl    $-16, %esp

into SDL_FillRect. Rebuilding SDL with

       ./configure "CFLAGS=-mpreferred-stack-boundary=2 -g -O3"

solved the problem.

IMHO this should also be a problem on Solaris.

The following links contain further information:

http://gcc.gnu.org/onlinedocs/gcc-4.5.2/gcc/i386-and-x86_002d64-Options.html#i386-and-x86_002d64-Options

http://www.agner.org/optimize/calling_conventions.pdf
2011-12-29 05:36:39 -05:00
Ryan C. Gordon
abe9021987 Backed out most of changeset 4b88086910d3, at Andreas's request. 2011-12-05 12:43:50 -05:00
Andreas Schiffler
5e0fdc8f9e Fix buildbot sdl-macosx-unix-x86 and sdl-macosx-amd64 compiler warnings 2011-12-05 07:41:20 -08:00
Ryan C. Gordon
fefd678dfd Backed out SDL_config.h overwrite that got committed by accident. 2011-08-30 17:11:51 -04:00
Andreas Schiffler
40bfbbdbf9 Fixed global suite declaration segfault via external linkage declaration 2011-05-26 20:13:49 -07:00
Sam Lantinga
6196aa221e SDL 1.3 is now under the zlib license. 2011-04-08 13:03:26 -07:00
Sam Lantinga
6b2b174db0 The file is actually SDL_config.h now. 2011-02-17 19:00:29 -08:00
Sam Lantinga
307a90d292 Made it possible to build SDL from a fresh checkout without any additional steps.
The trick is that if you're using configure and you don't want to have SDL_config.h and SDL_revision.h to show up as modified, you need to configure and build from a separate directory.

You also need to include SDL_revision.h directly if you want to use the SDL_REVISION constant, as a side effect of these changes.
2011-02-16 02:37:09 -08:00
Sam Lantinga
235cf60d67 *** empty log message *** 2006-03-23 21:39:02 +00:00
Sam Lantinga
967de2d3dd Fixed bug #171
SDL_config.h is no longer in CVS.  Instead, configure will generate it for
systems that use configure, and we always copy SDL_config.h.default to
SDL_config.h before generating a snapshot or release archive.

Also fixed a couple of uninstall issues.
2006-03-23 21:28:33 +00:00
Sam Lantinga
45d6790639 *sigh* 2006-03-23 15:22:40 +00:00
Ryan C. Gordon
21c1fa5e46 More dynamic X11 mangling...should fix NetBSD builds. And hopefully doesn't
break 6 other platforms.  :)
2006-03-23 08:43:37 +00:00
Ryan C. Gordon
aa2b3e6f26 Reverted SDL_config.h from accidental checkin. (see Bugzilla #171). 2006-03-22 05:12:07 +00:00
Ryan C. Gordon
eb3f189e59 Updated dynamic X11 code. See details in Bugzilla #170. 2006-03-22 05:00:59 +00:00
Sam Lantinga
9491ae58df By default all the real targets have dummy audio/video and disk audio. 2006-03-14 16:19:32 +00:00
Ryan C. Gordon
58b18d03af Implemented dummy audio driver.
Fixes Bugzilla #161.
2006-03-14 08:53:33 +00:00
Sam Lantinga
339f03befc Added documentation on how to build a completely useless SDL library. :) 2006-03-08 08:30:17 +00:00
Sam Lantinga
aaf71291d0 Updated OS/2 build, yay! 2006-02-26 19:30:21 +00:00
Sam Lantinga
dead618337 Hmm, how am I going to keep from committing bad versions of this? 2006-02-24 09:58:03 +00:00
Sam Lantinga
7e11ec69f9 Updated MacOS Classic MPW build 2006-02-24 09:57:14 +00:00
Sam Lantinga
026aec11d6 Added pre-configured versions of SDL_config.h for various platforms 2006-02-24 07:26:31 +00:00
Sam Lantinga
190b425364 Use consistent identifiers for the various platforms we support.
Make sure every source file includes SDL_config.h, so the proper system
headers are chosen.
2006-02-21 08:46:50 +00:00
Sam Lantinga
49255e3fa6 Fixes for BeOS and Solaris builds 2006-02-17 08:43:23 +00:00
Sam Lantinga
f05187e232 New configure-based build system. Still work in progress, but much improved 2006-02-16 10:11:48 +00:00
Sam Lantinga
7eac789438 *** empty log message *** 2006-02-10 07:29:08 +00:00
Sam Lantinga
769424426d More header massaging... works great on Windows. ;-) 2006-02-10 06:48:43 +00:00
Sam Lantinga
20c4849e7e Fixed build problem with SDL_string.c
Officially deprecated SDL_byteorder.h, SDL_getenv.h and SDL_types.h
Moved endian-related SDL_rwops code into SDL_rwops.c
2006-02-09 09:38:05 +00:00
Sam Lantinga
8df54cd371 Started the process of improving configure support, and merging C types
and library support into a single header.
2006-02-09 09:07:13 +00:00
Sam Lantinga
d72a9898ed Configure dynamically generates SDL_config.h
I'm still wrestling with autoheader, but this should work for now...
Fixed lots of build problems with C library support disabled
2006-02-07 12:11:33 +00:00
Sam Lantinga
02cc6c0f11 Use SDL_ prefixed versions of C library functions.
FIXME:
Change #include <stdlib.h> to #include "SDL_stdlib.h"
Change #include <string.h> to #include "SDL_string.h"
Make sure nothing else broke because of this...
2006-02-07 06:59:48 +00:00
Sam Lantinga
f62242e296 A few fixes to get this building on Linux again 2006-02-06 08:46:14 +00:00
Sam Lantinga
82bfaee73a It's now possible to build SDL without any C runtime at all on Windows,
using Visual C++ 2005
2006-02-06 08:28:51 +00:00