From 1287a9bb9fcce6b62e5cf5bc4b3b18136c234893 Mon Sep 17 00:00:00 2001 From: Soren Jorvang Date: Sat, 29 Jan 2011 11:40:20 +0000 Subject: [PATCH] Be a little more careful about the use of SSE. We really need to adopt the GCC model of one instruction set per compilation unit. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6965 8ced0084-cf51-0410-be5f-012b33b47a6e --- SConstruct | 11 +++++++++-- Source/Core/Common/Src/Common.h | 10 ++++++---- Source/Core/Core/Src/SConscript | 13 ++++--------- Source/Core/DebuggerWX/Src/SConscript | 7 +------ Source/Core/DiscIO/Src/SConscript | 6 +----- 5 files changed, 21 insertions(+), 26 deletions(-) diff --git a/SConstruct b/SConstruct index 3c56d7c6d7..bb943fe24c 100644 --- a/SConstruct +++ b/SConstruct @@ -121,6 +121,7 @@ if sys.platform == 'darwin': env['CCFLAGS'] += ccld env['CCFLAGS'] += ['-Wextra-tokens', '-Wnewline-eof'] env['CCFLAGS'] += ['-march=core2', '-mdynamic-no-pic'] + env['CCFLAGS'] += ['-Xarch_i386', '-msse3', '-Xarch_x86_64', '-mssse3'] env['CC'] = 'llvm-gcc' env['CXX'] = 'llvm-g++' env['CXXFLAGS'] += ['-x', 'objective-c++'] @@ -330,8 +331,14 @@ dirs = [ 'Externals/SFML/src', #'Externals/wxWidgets', 'Externals/zlib', - 'Source/Plugins/Plugin_VideoOGL/Src', - #'Source/Plugins/Plugin_VideoSoftware/Src', + ] + +if sys.platform == 'darwin': + dirs += ['Source/Plugins/Plugin_VideoOGL/Src'] +else: + dirs += ['Source/Plugins/Plugin_VideoSoftware/Src'] + +dirs += [ 'Source/Core/AudioCommon/Src', 'Source/Core/Common/Src', 'Source/Core/Core/Src', diff --git a/Source/Core/Common/Src/Common.h b/Source/Core/Common/Src/Common.h index 7bbed7590e..9bb42aaf9b 100644 --- a/Source/Core/Common/Src/Common.h +++ b/Source/Core/Common/Src/Common.h @@ -149,11 +149,13 @@ private: // wxWidgets does not have a true dummy macro for this. #define _trans(a) a -#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3) || defined __APPLE__ +#if defined __APPLE__ && defined __i386__ +#define _M_SSE 0x300 +#elif defined __APPLE__ && defined __x86_64__ #define _M_SSE 0x301 -#endif - -#if _MSC_VER >= 1500 // Visual Studio 2008 +#elif __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3) +#define _M_SSE 0x301 +#elif _MSC_VER >= 1500 // Visual Studio 2008 #define _M_SSE 0x401 #endif diff --git a/Source/Core/Core/Src/SConscript b/Source/Core/Core/Src/SConscript index 727e97338a..d545c2e6ca 100644 --- a/Source/Core/Core/Src/SConscript +++ b/Source/Core/Core/Src/SConscript @@ -160,18 +160,13 @@ files = [ "PowerPC/Jit64/Jit64_Tables.cpp", ] -libs = [ - 'bdisasm', - 'inputcommon', - 'lua', - 'sfml-network', - ] - if sys.platform == 'win32': files += [ "HW/BBA-TAP/TAP_Win32.cpp", "stdafx.cpp", "HW/WiimoteReal/IOWin.cpp" ] elif sys.platform == 'darwin': files += [ "HW/BBA-TAP/TAP_Apple.cpp", "HW/WiimoteReal/IOdarwin.mm" ] -else: +elif sys.platform == 'linux2' and env['HAVE_BLUEZ']: files += [ "HW/BBA-TAP/TAP_Unix.cpp", "HW/WiimoteReal/IONix.cpp" ] +else: + files += [ "HW/BBA-TAP/TAP_Unix.cpp", "HW/WiimoteReal/IODummy.cpp" ] -env.StaticLibrary(env['local_libs'] + 'core', files, LIBS = libs) +env.StaticLibrary(env['local_libs'] + 'core', files) diff --git a/Source/Core/DebuggerWX/Src/SConscript b/Source/Core/DebuggerWX/Src/SConscript index 4b1b2a8761..da7beae7cc 100644 --- a/Source/Core/DebuggerWX/Src/SConscript +++ b/Source/Core/DebuggerWX/Src/SConscript @@ -20,9 +20,4 @@ files = [ "JitWindow.cpp", ] -libs = [ - 'common', - 'debugger_ui_util' - ] - -env.StaticLibrary(env['local_libs'] + "debwx", files, LIBS = libs) +env.StaticLibrary(env['local_libs'] + "debwx", files) diff --git a/Source/Core/DiscIO/Src/SConscript b/Source/Core/DiscIO/Src/SConscript index 7126b178ca..909545c018 100644 --- a/Source/Core/DiscIO/Src/SConscript +++ b/Source/Core/DiscIO/Src/SConscript @@ -26,8 +26,4 @@ files = [ 'WiiWad.cpp', ] -libs = [ - 'common' - ] - -env.StaticLibrary(env['local_libs'] + 'discio', files, LIBS = libs) +env.StaticLibrary(env['local_libs'] + 'discio', files)