[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
SET(CMAKE_SHARED_LIBRARY_LINK_C_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

View File

@ -10,4 +10,10 @@
* 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

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.xpm debian/pcsx2-unstable/usr/share/pixmaps
# lintian override
dh_lintian
# Build architecture-independent files here.
binary-indep: build install
dh_testdir -i

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -16,12 +16,6 @@ set(CMAKE_CXX_FLAGS_DEVEL "")
set(CMAKE_C_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
set(zzoglName zzogl)