[cmake] remove -fPIC. Expect a little speed up.

[plugins] remove __forceinline on variadic function that has been broken by the removal of -fPIC.
[debian] update readme about fpic status. And add some lintian overrides.


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3395 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
gregory.hainaut 2010-07-05 15:43:21 +00:00
parent 1a593a4134
commit f8163336b7
20 changed files with 22 additions and 20 deletions

View File

@ -23,6 +23,10 @@
# Remove -rdynamic option that can some segmentation fault when openining pcsx2 plugins # Remove -rdynamic option that can some segmentation fault when openining pcsx2 plugins
SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS " ") SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS " ")
SET(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS " ") SET(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS " ")
# Remove -fPIC option. No good reason to use it for plugins. Moreover we
# only support x86 architecture. And last but not least it impact the performance.
set(CMAKE_SHARED_LIBRARY_C_FLAGS "")
set(CMAKE_SHARED_LIBRARY_CXX_FLAGS "")
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
# if no build type is set, use Devel as default # if no build type is set, use Devel as default

View File

@ -10,4 +10,10 @@
* Documentation needs some loves. Feel free to help. * Documentation needs some loves. Feel free to help.
* -fPIC option was removed for multiple reason.
- Code only support x86 architecture.
- Upstream code use ebx register so it is not compliant with PIC.
- Impact too much performance.
- only plugins so no others package link against us.
-- Gregory Hainaut <gregory.hainaut@gmail.com> Sat, 24 Apr 2010 23:11:10 +0200 -- Gregory Hainaut <gregory.hainaut@gmail.com> Sat, 24 Apr 2010 23:11:10 +0200

View File

@ -0,0 +1,3 @@
# PIC code cause regression in the library and issue with the ebx register.
# Morever library are plugins and the code is only compatible with x86.
pcsx2-plugins-unstable: shlib-with-non-pic-code

View File

@ -76,6 +76,9 @@ install: build
cp debian/pcsx2.desktop debian/pcsx2-unstable/usr/share/applications cp debian/pcsx2.desktop debian/pcsx2-unstable/usr/share/applications
cp debian/pcsx2.xpm debian/pcsx2-unstable/usr/share/pixmaps cp debian/pcsx2.xpm debian/pcsx2-unstable/usr/share/pixmaps
# lintian override
dh_lintian
# Build architecture-independent files here. # Build architecture-independent files here.
binary-indep: build install binary-indep: build install
dh_testdir -i dh_testdir -i

View File

@ -76,6 +76,9 @@ install: build
cp debian/pcsx2.desktop debian/pcsx2-unstable/usr/share/applications cp debian/pcsx2.desktop debian/pcsx2-unstable/usr/share/applications
cp debian/pcsx2.xpm debian/pcsx2-unstable/usr/share/pixmaps cp debian/pcsx2.xpm debian/pcsx2-unstable/usr/share/pixmaps
# lintian override
dh_lintian
# Build architecture-independent files here. # Build architecture-independent files here.
binary-indep: build install binary-indep: build install
dh_testdir -i dh_testdir -i

View File

@ -12,7 +12,6 @@ set(CDVDisoName CDVDiso)
set(CommonFlags set(CommonFlags
-Wall -Wall
-m32 -m32
-fpic
-fpermissive -fpermissive
) )

View File

@ -12,7 +12,6 @@ set(CDVDnullName CDVDnull)
set(CommonFlags set(CommonFlags
-Wall -Wall
-m32 -m32
-fPIC
) )
set(OptimizationFlags set(OptimizationFlags

View File

@ -12,7 +12,6 @@ set(FWnullName FWnull)
set(CommonFlags set(CommonFlags
-Wall -Wall
-m32 -m32
-fPIC
) )
set(OptimizationFlags set(OptimizationFlags

View File

@ -12,7 +12,6 @@ set(GSnullName GSnull)
set(CommonFlags set(CommonFlags
-Wall -Wall
-m32 -m32
-fPIC
-msse2 -msse2
) )

View File

@ -9,7 +9,6 @@ endif(NOT TOP_CMAKE_WAS_SOURCED)
set(CommonFlags set(CommonFlags
-Wall -Wall
-m32 -m32
-fPIC
) )
set(OptimizationFlags set(OptimizationFlags

View File

@ -12,7 +12,6 @@ set(SPU2nullName SPU2null)
set(CommonFlags set(CommonFlags
-Wall -Wall
-m32 -m32
-fPIC
) )
set(OptimizationFlags set(OptimizationFlags

View File

@ -12,7 +12,6 @@ set(USBnullName USBnull)
set(CommonFlags set(CommonFlags
-Wall -Wall
-m32 -m32
-fPIC
) )
set(OptimizationFlags set(OptimizationFlags

View File

@ -12,7 +12,6 @@ set(dev9nullName dev9null)
set(CommonFlags set(CommonFlags
-Wall -Wall
-m32 -m32
-fPIC
) )
set(OptimizationFlags set(OptimizationFlags

View File

@ -12,7 +12,6 @@ set(onepadName onepad)
set(CommonFlags set(CommonFlags
-Wall -Wall
-m32 -m32
-fPIC
) )
set(OptimizationFlags set(OptimizationFlags

View File

@ -33,7 +33,7 @@ Display *GSdsp;
extern string KeyName(int pad, int key); extern string KeyName(int pad, int key);
void __forceinline SysMessage(const char *fmt, ...) void SysMessage(const char *fmt, ...)
{ {
va_list list; va_list list;
char msg[512]; char msg[512];

View File

@ -22,7 +22,6 @@ set(CMAKE_CXX_FLAGS_RELEASE "")
set(CommonFlags set(CommonFlags
-Wall -Wall
-m32 -m32
-fPIC
-msse2 -msse2
) )

View File

@ -21,7 +21,7 @@
#include <gtk/gtk.h> #include <gtk/gtk.h>
#include <cstring> #include <cstring>
void __forceinline SysMessage(const char *fmt, ...) void SysMessage(const char *fmt, ...)
{ {
va_list list; va_list list;
char msg[512]; char msg[512];

View File

@ -12,7 +12,6 @@ set(zerospu2Name zerospu2)
set(CommonFlags set(CommonFlags
-Wall -Wall
-m32 -m32
-fPIC
-msse2 -msse2
) )

View File

@ -25,7 +25,7 @@
extern char *libraryName; extern char *libraryName;
void __forceinline SysMessage(const char *fmt, ...) void SysMessage(const char *fmt, ...)
{ {
va_list list; va_list list;
char msg[512]; char msg[512];

View File

@ -16,12 +16,6 @@ set(CMAKE_CXX_FLAGS_DEVEL "")
set(CMAKE_C_FLAGS_RELEASE "") set(CMAKE_C_FLAGS_RELEASE "")
set(CMAKE_CXX_FLAGS_RELEASE "") set(CMAKE_CXX_FLAGS_RELEASE "")
# Also clear shared library flag to remove fpic option
# that broke some asm code. The better solution will be to remove
# the asm or fix it.
set(CMAKE_SHARED_LIBRARY_CXX_FLAGS "")
set(CMAKE_SHARED_LIBRARY_C_FLAGS "")
# plugin name # plugin name
set(zzoglName zzogl) set(zzoglName zzogl)