diff --git a/cmake/BuildParameters.cmake b/cmake/BuildParameters.cmake index 4645b0b1ee..5717516435 100644 --- a/cmake/BuildParameters.cmake +++ b/cmake/BuildParameters.cmake @@ -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 diff --git a/debian-unstable-upstream/README.Debian b/debian-unstable-upstream/README.Debian index cbea48e9f1..d5851bd5d8 100644 --- a/debian-unstable-upstream/README.Debian +++ b/debian-unstable-upstream/README.Debian @@ -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 Sat, 24 Apr 2010 23:11:10 +0200 diff --git a/debian-unstable-upstream/pcsx2-plugins-unstable.lintian-overrides b/debian-unstable-upstream/pcsx2-plugins-unstable.lintian-overrides new file mode 100644 index 0000000000..7f790a7dd6 --- /dev/null +++ b/debian-unstable-upstream/pcsx2-plugins-unstable.lintian-overrides @@ -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 diff --git a/debian-unstable-upstream/rules b/debian-unstable-upstream/rules index 711d028448..c041a61a80 100755 --- a/debian-unstable-upstream/rules +++ b/debian-unstable-upstream/rules @@ -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 diff --git a/debian-unstable-upstream/rules_fglrx b/debian-unstable-upstream/rules_fglrx index 9197c16303..d21c2a16e6 100755 --- a/debian-unstable-upstream/rules_fglrx +++ b/debian-unstable-upstream/rules_fglrx @@ -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 diff --git a/plugins/CDVDiso/src/CMakeLists.txt b/plugins/CDVDiso/src/CMakeLists.txt index ec1503e293..cf48730395 100644 --- a/plugins/CDVDiso/src/CMakeLists.txt +++ b/plugins/CDVDiso/src/CMakeLists.txt @@ -12,7 +12,6 @@ set(CDVDisoName CDVDiso) set(CommonFlags -Wall -m32 - -fpic -fpermissive ) diff --git a/plugins/CDVDnull/CMakeLists.txt b/plugins/CDVDnull/CMakeLists.txt index b3a0d1bed6..24b0899b77 100644 --- a/plugins/CDVDnull/CMakeLists.txt +++ b/plugins/CDVDnull/CMakeLists.txt @@ -12,7 +12,6 @@ set(CDVDnullName CDVDnull) set(CommonFlags -Wall -m32 - -fPIC ) set(OptimizationFlags diff --git a/plugins/FWnull/CMakeLists.txt b/plugins/FWnull/CMakeLists.txt index 7c0762f3cd..f2b1b51804 100644 --- a/plugins/FWnull/CMakeLists.txt +++ b/plugins/FWnull/CMakeLists.txt @@ -12,7 +12,6 @@ set(FWnullName FWnull) set(CommonFlags -Wall -m32 - -fPIC ) set(OptimizationFlags diff --git a/plugins/GSnull/CMakeLists.txt b/plugins/GSnull/CMakeLists.txt index b995c96f86..f4234c52e9 100644 --- a/plugins/GSnull/CMakeLists.txt +++ b/plugins/GSnull/CMakeLists.txt @@ -12,7 +12,6 @@ set(GSnullName GSnull) set(CommonFlags -Wall -m32 - -fPIC -msse2 ) diff --git a/plugins/PadNull/CMakeLists.txt b/plugins/PadNull/CMakeLists.txt index ce0971a59a..319c02d8d0 100644 --- a/plugins/PadNull/CMakeLists.txt +++ b/plugins/PadNull/CMakeLists.txt @@ -9,7 +9,6 @@ endif(NOT TOP_CMAKE_WAS_SOURCED) set(CommonFlags -Wall -m32 - -fPIC ) set(OptimizationFlags diff --git a/plugins/SPU2null/CMakeLists.txt b/plugins/SPU2null/CMakeLists.txt index 3c565581a1..6104e9a3e2 100644 --- a/plugins/SPU2null/CMakeLists.txt +++ b/plugins/SPU2null/CMakeLists.txt @@ -12,7 +12,6 @@ set(SPU2nullName SPU2null) set(CommonFlags -Wall -m32 - -fPIC ) set(OptimizationFlags diff --git a/plugins/USBnull/CMakeLists.txt b/plugins/USBnull/CMakeLists.txt index c0552176d4..5c278c52df 100644 --- a/plugins/USBnull/CMakeLists.txt +++ b/plugins/USBnull/CMakeLists.txt @@ -12,7 +12,6 @@ set(USBnullName USBnull) set(CommonFlags -Wall -m32 - -fPIC ) set(OptimizationFlags diff --git a/plugins/dev9null/CMakeLists.txt b/plugins/dev9null/CMakeLists.txt index 0b58669d78..02dce7cdf3 100644 --- a/plugins/dev9null/CMakeLists.txt +++ b/plugins/dev9null/CMakeLists.txt @@ -12,7 +12,6 @@ set(dev9nullName dev9null) set(CommonFlags -Wall -m32 - -fPIC ) set(OptimizationFlags diff --git a/plugins/onepad/CMakeLists.txt b/plugins/onepad/CMakeLists.txt index 738bdcd7b9..00f5c49c89 100644 --- a/plugins/onepad/CMakeLists.txt +++ b/plugins/onepad/CMakeLists.txt @@ -12,7 +12,6 @@ set(onepadName onepad) set(CommonFlags -Wall -m32 - -fPIC ) set(OptimizationFlags diff --git a/plugins/onepad/Linux/linux.cpp b/plugins/onepad/Linux/linux.cpp index 398948e1a9..91aef44439 100644 --- a/plugins/onepad/Linux/linux.cpp +++ b/plugins/onepad/Linux/linux.cpp @@ -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]; diff --git a/plugins/spu2-x/src/CMakeLists.txt b/plugins/spu2-x/src/CMakeLists.txt index 70a6592976..29fdf09351 100644 --- a/plugins/spu2-x/src/CMakeLists.txt +++ b/plugins/spu2-x/src/CMakeLists.txt @@ -22,7 +22,6 @@ set(CMAKE_CXX_FLAGS_RELEASE "") set(CommonFlags -Wall -m32 - -fPIC -msse2 ) diff --git a/plugins/spu2-x/src/Linux/Dialogs.cpp b/plugins/spu2-x/src/Linux/Dialogs.cpp index e7caf54bc5..9b1ca43cea 100644 --- a/plugins/spu2-x/src/Linux/Dialogs.cpp +++ b/plugins/spu2-x/src/Linux/Dialogs.cpp @@ -21,7 +21,7 @@ #include #include -void __forceinline SysMessage(const char *fmt, ...) +void SysMessage(const char *fmt, ...) { va_list list; char msg[512]; diff --git a/plugins/zerospu2/CMakeLists.txt b/plugins/zerospu2/CMakeLists.txt index 2ba5947a6b..584914e12c 100644 --- a/plugins/zerospu2/CMakeLists.txt +++ b/plugins/zerospu2/CMakeLists.txt @@ -12,7 +12,6 @@ set(zerospu2Name zerospu2) set(CommonFlags -Wall -m32 - -fPIC -msse2 ) diff --git a/plugins/zerospu2/Linux/Linux.cpp b/plugins/zerospu2/Linux/Linux.cpp index eb5354b235..5eab60fcd3 100644 --- a/plugins/zerospu2/Linux/Linux.cpp +++ b/plugins/zerospu2/Linux/Linux.cpp @@ -25,7 +25,7 @@ extern char *libraryName; -void __forceinline SysMessage(const char *fmt, ...) +void SysMessage(const char *fmt, ...) { va_list list; char msg[512]; diff --git a/plugins/zzogl-pg/opengl/CMakeLists.txt b/plugins/zzogl-pg/opengl/CMakeLists.txt index 462dc40ab5..bb45dceb30 100644 --- a/plugins/zzogl-pg/opengl/CMakeLists.txt +++ b/plugins/zzogl-pg/opengl/CMakeLists.txt @@ -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)