pcsx2 & spu2x: allow to compile[0] with lto on linux. It removes an useless wx feature on linux.

[0]: it needs gold linker, tuning parameter large-function-growth to 5000 and gcc-4.6.


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4617 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
gregory.hainaut@gmail.com 2011-05-02 19:11:00 +00:00
parent 8ffb0d7a17
commit 763f21cfbc
3 changed files with 21 additions and 2 deletions

View File

@ -19,7 +19,17 @@
#include "Threading.h" #include "Threading.h"
#include "IniInterface.h" #include "IniInterface.h"
#ifdef __LINUX__
// I do not know if it is a GCC issue or a bug in wxwidget !
// Anyway the code isn't used (m_hasContextHelp always false) so I remove
// it for linux. The 'vtable' issue appears with the include of
// <wx/cshelp.h> -- Gregory
#define GCC_4_6_LTO_COMPILATION_ISSUE
#endif
#ifndef GCC_4_6_LTO_COMPILATION_ISSUE
#include <wx/cshelp.h> #include <wx/cshelp.h>
#endif
#include <wx/tooltip.h> #include <wx/tooltip.h>
#include <wx/spinctrl.h> #include <wx/spinctrl.h>
@ -146,8 +156,10 @@ void wxDialogWithHelpers::Init( const pxDialogCreationFlags& cflags )
m_extraButtonSizer = NULL; m_extraButtonSizer = NULL;
#ifndef GCC_4_6_LTO_COMPILATION_ISSUE
if( m_hasContextHelp ) if( m_hasContextHelp )
delete wxHelpProvider::Set( new wxSimpleHelpProvider() ); delete wxHelpProvider::Set( new wxSimpleHelpProvider() );
#endif
// GTK/Linux Note: currently the Close (X) button doesn't appear to work in dialogs. Docs // GTK/Linux Note: currently the Close (X) button doesn't appear to work in dialogs. Docs
// indicate that it should, so I presume the problem is in wxWidgets and that (hopefully!) // indicate that it should, so I presume the problem is in wxWidgets and that (hopefully!)
@ -327,6 +339,7 @@ void wxDialogWithHelpers::AddOkCancel( wxSizer &sizer, bool hasApply )
m_extraButtonSizer = new wxBoxSizer( wxHORIZONTAL ); m_extraButtonSizer = new wxBoxSizer( wxHORIZONTAL );
#ifndef GCC_4_6_LTO_COMPILATION_ISSUE
// Add the context-sensitive help button on the caption for the platforms // Add the context-sensitive help button on the caption for the platforms
// which support it (currently MSW only) // which support it (currently MSW only)
if( m_hasContextHelp ) if( m_hasContextHelp )
@ -336,6 +349,7 @@ void wxDialogWithHelpers::AddOkCancel( wxSizer &sizer, bool hasApply )
*m_extraButtonSizer += new wxContextHelpButton(this) | StdButton(); *m_extraButtonSizer += new wxContextHelpButton(this) | StdButton();
#endif #endif
} }
#endif
// create a sizer to hold the help and ok/cancel buttons, for platforms // create a sizer to hold the help and ok/cancel buttons, for platforms
// that need a custom help icon. [fixme: help icon prolly better off somewhere else] // that need a custom help icon. [fixme: help icon prolly better off somewhere else]

View File

@ -82,7 +82,7 @@ GSPanel::GSPanel( wxWindow* parent )
m_HasFocus = false; m_HasFocus = false;
if ( !wxWindow::Create(parent, wxID_ANY) ) if ( !wxWindow::Create(parent, wxID_ANY) )
throw Exception::RuntimeError().SetDiagMsg( L"GSPanel constructor esplode!!" ); throw Exception::RuntimeError().SetDiagMsg( L"GSPanel constructor explode!!" );
SetName( L"GSPanel" ); SetName( L"GSPanel" );

View File

@ -799,7 +799,12 @@ StereoOut32 Apply_Dealias_Filter(StereoOut32 &SoundStream)
// used to throttle the output rate of cache stat reports // used to throttle the output rate of cache stat reports
static int p_cachestat_counter=0; static int p_cachestat_counter=0;
__forceinline void Mix() // Gcc does not want to inline it when lto is enabled because some functions growth too much.
// The function is big enought to see any speed impact. -- Gregory
#ifndef __LINUX__
__forceinline
#endif
void Mix()
{ {
// Note: Playmode 4 is SPDIF, which overrides other inputs. // Note: Playmode 4 is SPDIF, which overrides other inputs.
StereoOut32 InputData[2] = StereoOut32 InputData[2] =