Disable the default PIC generation on OS X. This might make for a

minor performance improvement and also possibly make that platform a
little less prone to problems with ABI assumptions in the JIT code,
although I haven't measured the first or seen signs of the latter.

Only the GL context needs to be specifically freed when shutting
down OpenGL. The GL canvas is implicitly freed by wxWindow.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6885 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Soren Jorvang 2011-01-20 05:06:29 +00:00
parent 82422371f3
commit bf2bb00f63
3 changed files with 6 additions and 2 deletions

View File

@ -123,6 +123,7 @@ if sys.platform == 'darwin':
env['CCFLAGS'] += ccld
env['CCFLAGS'] += ['-Xarch_i386', '-msse3', '-Xarch_x86_64', '-mssse3']
env['CCFLAGS'] += ['-mtune=core2', '-Xarch_x86_64', '-march=core2']
env['CCFLAGS'] += ['-mdynamic-no-pic']
env['CCFLAGS'] += ['-iframework/Developer/SDKs/MacOSX10.5.sdk' + system]
env['CCFLAGS'] += ['-iframework/Developer/SDKs/MacOSX10.6.sdk' + system]
env['CC'] = "gcc-4.2 -ObjC"
@ -135,7 +136,9 @@ if sys.platform == 'darwin':
env['LIBS'] = ['iconv']
env['LINKFLAGS'] += ccld
env['LINKFLAGS'] += ['-Wl,-search_paths_first', '-Wl,-Z', '-F' + system]
env['SHCCFLAGS'] = env['CCFLAGS'] # Get rid of the -fPIC added in gcc.py
env['SHLINKFLAGS'] += ['-Wl,-undefined,dynamic_lookup']
env['SHLINKFLAGS'] += ['-Xarch_i386', '-Wl,-read_only_relocs,suppress']
if platform.mac_ver()[0] >= '10.6.0':
env['CCFLAGS'] += ['-Wextra-tokens', '-Wnewline-eof']
@ -163,6 +166,7 @@ if sys.platform == 'darwin':
env['CPPPATH'] += ['#Externals']
env['FRAMEWORKPATH'] += ['Externals/Cg']
env['FRAMEWORKS'] += ['Cg']
env['shared_sdl'] = True
env['shared_zlib'] = True
env['data_dir'] = '#' + env['prefix'] + '/Dolphin.app/Contents/Resources'

View File

@ -572,7 +572,7 @@ void OpenGL_Update()
void OpenGL_Shutdown()
{
#if defined(USE_WX) && USE_WX
delete GLWin.glCanvas;
delete GLWin.glCtxt;
#elif defined(__APPLE__)
[GLWin.cocoaWin close];
[GLWin.cocoaCtx clearDrawable];

View File

@ -383,7 +383,7 @@ void OpenGL_Update()
void OpenGL_Shutdown()
{
#if defined(USE_WX) && USE_WX
delete GLWin.glCanvas;
delete GLWin.glCtxt;
#elif defined(_WIN32)
if (hRC) // Do We Have A Rendering Context?
{