Skip to content

Commit

Permalink
PS2: Fix compilation with latest PS2SDK
Browse files Browse the repository at this point in the history
  • Loading branch information
ccawley2011 authored and David Turner committed Sep 14, 2018
1 parent 58f3aac commit 174b0d1
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 2 deletions.
2 changes: 2 additions & 0 deletions backends/fs/ps2/ps2-fs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
// Disable symbol overrides so that we can use "FILE"
#define FORBIDDEN_SYMBOL_EXCEPTION_FILE
#define FORBIDDEN_SYMBOL_EXCEPTION_printf
#define FORBIDDEN_SYMBOL_EXCEPTION_abort
#define FORBIDDEN_SYMBOL_EXCEPTION_exit

#include "backends/fs/ps2/ps2-fs.h"

Expand Down
2 changes: 2 additions & 0 deletions backends/platform/ps2/Gs2dScreen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
*/

#define FORBIDDEN_SYMBOL_EXCEPTION_printf
#define FORBIDDEN_SYMBOL_EXCEPTION_abort
#define FORBIDDEN_SYMBOL_EXCEPTION_exit

#include "Gs2dScreen.h"
#include <kernel.h>
Expand Down
2 changes: 2 additions & 0 deletions backends/platform/ps2/fileio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
// Disable symbol overrides so that we can use "FILE"
#define FORBIDDEN_SYMBOL_EXCEPTION_FILE
#define FORBIDDEN_SYMBOL_EXCEPTION_printf
#define FORBIDDEN_SYMBOL_EXCEPTION_abort
#define FORBIDDEN_SYMBOL_EXCEPTION_exit

#include "backends/platform/ps2/fileio.h"

Expand Down
3 changes: 3 additions & 0 deletions backends/platform/ps2/ps2mutex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,11 @@
*/

#define FORBIDDEN_SYMBOL_EXCEPTION_printf
#define FORBIDDEN_SYMBOL_EXCEPTION_abort
#define FORBIDDEN_SYMBOL_EXCEPTION_exit

#include "backends/platform/ps2/systemps2.h"
#include <kernel.h>

void OSystem_PS2::initMutexes(void) {
ee_sema_t newSema;
Expand Down
5 changes: 5 additions & 0 deletions backends/plugins/ps2/ps2-provider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,18 @@
*
*/

#define FORBIDDEN_SYMBOL_EXCEPTION_abort
#define FORBIDDEN_SYMBOL_EXCEPTION_exit

#include "common/scummsys.h"

#if defined(DYNAMIC_MODULES) && defined(__PLAYSTATION2__)

#include "backends/plugins/ps2/ps2-provider.h"
#include "backends/plugins/elf/mips-loader.h"

#include <kernel.h>

class PS2DLObject : public MIPSDLObject {
protected:

Expand Down
8 changes: 6 additions & 2 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -2127,7 +2127,7 @@ fi
# However, some platforms use GNU extensions in system header files, so
# for these we must not use -pedantic.
case $_host_os in
android | androidsdl | gamecube | psp | tizen | wii | webos)
android | androidsdl | gamecube | ps2 | psp | tizen | wii | webos)
;;
*)
# ICC does not support pedantic, while GCC and clang do.
Expand Down Expand Up @@ -3296,7 +3296,7 @@ if test -n "$_host"; then
# libtremor, while our code later on expects it to be called libvorbisidec.
# TODO: Enable tremor, e.g. by adding -ltremor or by renaming the lib.
# Disable this for older SDK as this breaks the build otherwise...
if test -z "$PS2SDK_OLD"; then
if test -z "$PS2SDK_OLD" && test "$_tremor" = auto; then
_tremor=yes
fi
_mad=yes
Expand Down Expand Up @@ -3499,6 +3499,10 @@ case $_backend in
fi
append_var LDFLAGS "-L$PS2SDK/ee/lib"
append_var LDFLAGS "-L$PS2SDK/ports/lib"
if test -d "$PS2DEV/isjpcm"; then
append_var INCLUDES "-I$PS2DEV/isjpcm/include"
append_var LDFLAGS "-L$PS2DEV/isjpcm/lib"
fi
append_var LIBS "-lmc -lpad -lmouse -lhdd -lpoweroff -lsjpcm"
append_var LIBS "-lm -lc -lfileXio -lkernel -lstdc++"
;;
Expand Down

0 comments on commit 174b0d1

Please sign in to comment.