diff options
author | Cameron Cawley | 2017-11-14 23:00:56 +0000 |
---|---|---|
committer | Eugene Sandulenko | 2018-04-07 09:30:07 +0200 |
commit | 9111998c49958646a9216548b9c886136afd7c14 (patch) | |
tree | b54641021cc27c9c9d3960001f929e8639a5bb2f | |
parent | 668084c58a2267897f58eb6a6d9baac09b65969d (diff) | |
download | scummvm-rg350-9111998c49958646a9216548b9c886136afd7c14.tar.gz scummvm-rg350-9111998c49958646a9216548b9c886136afd7c14.tar.bz2 scummvm-rg350-9111998c49958646a9216548b9c886136afd7c14.zip |
DS: Fix compilation with devkitARM r47
-rw-r--r-- | audio/softsynth/opl/mame.cpp | 8 | ||||
-rw-r--r-- | backends/fs/ds/ds-fs-factory.cpp | 2 | ||||
-rw-r--r-- | backends/fs/ds/ds-fs.cpp | 2 | ||||
-rw-r--r-- | backends/platform/ds/arm9/source/cdaudio.cpp | 2 | ||||
-rw-r--r-- | backends/platform/ds/arm9/source/dsmain.cpp | 2 | ||||
-rw-r--r-- | backends/platform/ds/arm9/source/dsmain.h | 2 | ||||
-rw-r--r-- | backends/platform/ds/arm9/source/dsoptions.cpp | 2 | ||||
-rw-r--r-- | backends/platform/ds/arm9/source/fat/disc_io.c | 2 | ||||
-rw-r--r-- | backends/platform/ds/arm9/source/osystem_ds.cpp | 1 | ||||
-rw-r--r-- | backends/platform/ds/arm9/source/osystem_ds.h | 2 | ||||
-rw-r--r-- | backends/platform/ds/arm9/source/wordcompletion.cpp | 2 | ||||
-rw-r--r-- | backends/platform/ds/arm9/source/zipreader.cpp | 3 | ||||
-rw-r--r-- | backends/platform/ds/ds.mk | 11 | ||||
-rw-r--r-- | backends/plugins/ds/ds-provider.cpp | 2 | ||||
-rwxr-xr-x | configure | 13 |
15 files changed, 35 insertions, 21 deletions
diff --git a/audio/softsynth/opl/mame.cpp b/audio/softsynth/opl/mame.cpp index eb08582da0..cba95422fc 100644 --- a/audio/softsynth/opl/mame.cpp +++ b/audio/softsynth/opl/mame.cpp @@ -29,6 +29,10 @@ #include <stdarg.h> #include <math.h> +#if defined(__DS__) +#include "dsmain.h" +#endif + #include "mame.h" #include "audio/mixer.h" @@ -40,10 +44,6 @@ #include "common/config-manager.h" #endif -#if defined(__DS__) -#include "dsmain.h" -#endif - namespace OPL { namespace MAME { diff --git a/backends/fs/ds/ds-fs-factory.cpp b/backends/fs/ds/ds-fs-factory.cpp index 98c522f1d6..3ec4a40bd8 100644 --- a/backends/fs/ds/ds-fs-factory.cpp +++ b/backends/fs/ds/ds-fs-factory.cpp @@ -24,9 +24,9 @@ #define FORBIDDEN_SYMBOL_EXCEPTION_FILE #if defined(__DS__) +#include "dsmain.h" //for the isGBAMPAvailable() function #include "backends/fs/ds/ds-fs-factory.h" #include "backends/fs/ds/ds-fs.h" -#include "dsmain.h" //for the isGBAMPAvailable() function namespace Common { DECLARE_SINGLETON(DSFilesystemFactory); diff --git a/backends/fs/ds/ds-fs.cpp b/backends/fs/ds/ds-fs.cpp index 035178dbb4..1df54a983d 100644 --- a/backends/fs/ds/ds-fs.cpp +++ b/backends/fs/ds/ds-fs.cpp @@ -23,12 +23,12 @@ // Disable symbol overrides for FILE as that is used in FLAC headers #define FORBIDDEN_SYMBOL_EXCEPTION_FILE +#include "dsmain.h" #include "common/str.h" #include "common/util.h" //#include <NDS/ARM9/console.h> //basic print funcionality #include "backends/fs/ds/ds-fs.h" #include "backends/fs/stdiostream.h" -#include "dsmain.h" #include "fat/gba_nds_fat.h" #include "common/bufferedstream.h" diff --git a/backends/platform/ds/arm9/source/cdaudio.cpp b/backends/platform/ds/arm9/source/cdaudio.cpp index c963f4d8bd..3952eeb6ab 100644 --- a/backends/platform/ds/arm9/source/cdaudio.cpp +++ b/backends/platform/ds/arm9/source/cdaudio.cpp @@ -23,10 +23,10 @@ // Disable symbol overrides for FILE as that is used in FLAC headers #define FORBIDDEN_SYMBOL_EXCEPTION_FILE +#include "dsmain.h" #include "cdaudio.h" #include "backends/fs/ds/ds-fs.h" #include "common/config-manager.h" -#include "dsmain.h" #include "NDS/scummvm_ipc.h" #define WAV_FORMAT_IMA_ADPCM 0x14 diff --git a/backends/platform/ds/arm9/source/dsmain.cpp b/backends/platform/ds/arm9/source/dsmain.cpp index b7c9c108a6..ac030dbe2e 100644 --- a/backends/platform/ds/arm9/source/dsmain.cpp +++ b/backends/platform/ds/arm9/source/dsmain.cpp @@ -573,7 +573,7 @@ void initGame() { s_currentGame = &gameList[0]; // Default game for (int r = 0; r < NUM_SUPPORTED_GAMES; r++) { - if (!stricmp(gameName, gameList[r].gameId)) { + if (!scumm_stricmp(gameName, gameList[r].gameId)) { s_currentGame = &gameList[r]; // consolePrintf("Game list num: %d\n", r); } diff --git a/backends/platform/ds/arm9/source/dsmain.h b/backends/platform/ds/arm9/source/dsmain.h index fec97d878e..7345fc2ceb 100644 --- a/backends/platform/ds/arm9/source/dsmain.h +++ b/backends/platform/ds/arm9/source/dsmain.h @@ -23,6 +23,8 @@ #ifndef _DSMAIN_H #define _DSMAIN_H +#define FORBIDDEN_SYMBOL_ALLOW_ALL + #include <nds.h> #include "osystem_ds.h" diff --git a/backends/platform/ds/arm9/source/dsoptions.cpp b/backends/platform/ds/arm9/source/dsoptions.cpp index 733592e958..562038166b 100644 --- a/backends/platform/ds/arm9/source/dsoptions.cpp +++ b/backends/platform/ds/arm9/source/dsoptions.cpp @@ -20,8 +20,8 @@ * */ -#include "dsoptions.h" #include "dsmain.h" +#include "dsoptions.h" #include "gui/dialog.h" #include "gui/gui-manager.h" #include "gui/widgets/list.h" diff --git a/backends/platform/ds/arm9/source/fat/disc_io.c b/backends/platform/ds/arm9/source/fat/disc_io.c index 5896cbb750..74fc8fb09b 100644 --- a/backends/platform/ds/arm9/source/fat/disc_io.c +++ b/backends/platform/ds/arm9/source/fat/disc_io.c @@ -367,7 +367,7 @@ bool disc_setDsSlotInterface (void) active_interface = DLDI_GetInterface(); - if (stricmp((char *)(&_dldi_driver_name), "Default (No interface)")) { + if (strcasecmp((char *)(&_dldi_driver_name), "Default (No interface)")) { char name[48]; memcpy(name, &_dldi_driver_name, 48); name[47] = '\0'; diff --git a/backends/platform/ds/arm9/source/osystem_ds.cpp b/backends/platform/ds/arm9/source/osystem_ds.cpp index 861ee2e0c5..03d336e804 100644 --- a/backends/platform/ds/arm9/source/osystem_ds.cpp +++ b/backends/platform/ds/arm9/source/osystem_ds.cpp @@ -23,6 +23,7 @@ // Allow use of stuff in <time.h> #define FORBIDDEN_SYMBOL_EXCEPTION_time_h +#define FORBIDDEN_SYMBOL_ALLOW_ALL #include "common/scummsys.h" #include "common/system.h" diff --git a/backends/platform/ds/arm9/source/osystem_ds.h b/backends/platform/ds/arm9/source/osystem_ds.h index f883bd14d1..585f72bd31 100644 --- a/backends/platform/ds/arm9/source/osystem_ds.h +++ b/backends/platform/ds/arm9/source/osystem_ds.h @@ -24,6 +24,8 @@ #ifndef _OSYSTEM_DS_H_ #define _OSYSTEM_DS_H_ +#define FORBIDDEN_SYMBOL_ALLOW_ALL + #include "backends/base-backend.h" #include "common/events.h" #include "nds.h" diff --git a/backends/platform/ds/arm9/source/wordcompletion.cpp b/backends/platform/ds/arm9/source/wordcompletion.cpp index 36fa31247c..2257c49005 100644 --- a/backends/platform/ds/arm9/source/wordcompletion.cpp +++ b/backends/platform/ds/arm9/source/wordcompletion.cpp @@ -20,8 +20,8 @@ * */ -#include "wordcompletion.h" #include "osystem_ds.h" +#include "wordcompletion.h" #include "engines/agi/agi.h" // Caution for #define for NUM_CHANNELS, causes problems in mixer_intern.h #ifdef ENABLE_AGI diff --git a/backends/platform/ds/arm9/source/zipreader.cpp b/backends/platform/ds/arm9/source/zipreader.cpp index 0de2b0c981..2ad0a39ed2 100644 --- a/backends/platform/ds/arm9/source/zipreader.cpp +++ b/backends/platform/ds/arm9/source/zipreader.cpp @@ -23,6 +23,7 @@ #define FORBIDDEN_SYMBOL_ALLOW_ALL #include "common/scummsys.h" +#include "common/str.h" #include "zipreader.h" ZipFile::ZipFile() { @@ -193,7 +194,7 @@ bool ZipFile::findFile(const char *search) { } - if (!stricmp(name, searchName)) { + if (!scumm_stricmp(name, searchName)) { // consolePrintf("'%s'=='%s'\n", name, searchName); return true; // Got it! } else { diff --git a/backends/platform/ds/ds.mk b/backends/platform/ds/ds.mk index 78216cb9a2..f2e7707a7f 100644 --- a/backends/platform/ds/ds.mk +++ b/backends/platform/ds/ds.mk @@ -75,7 +75,7 @@ endif # Compiler options for files which should be optimised for speed -OPT_SPEED := -O3 -mno-thumb +OPT_SPEED := -O3 -marm # Compiler options for files which should be optimised for space OPT_SIZE := -Os -mthumb @@ -134,7 +134,8 @@ engines/teenagent/actor.o: CXXFLAGS:=$(CXXFLAGS) $(OPT_SPEED) # ############################################################################# -all: scummvm.nds scummvm.ds.gba +# FIXME: Newer versions of devkitARM don't include dsbuild, which is needed to create scummvm.ds.gba +all: scummvm.nds # scummvm.ds.gba clean: dsclean @@ -170,10 +171,10 @@ dsclean: # HACK/FIXME: C compiler, for cartreset.c -- we should switch this to use CXX # as soon as possible. -CC := $(DEVKITPRO)/devkitARM/bin/arm-eabi-gcc +CC := $(DEVKITPRO)/devkitARM/bin/arm-none-eabi-gcc # HACK/TODO: Pointer to objcopy. This should really be set by configure -OBJCOPY := $(DEVKITPRO)/devkitARM/bin/arm-eabi-objcopy +OBJCOPY := $(DEVKITPRO)/devkitARM/bin/arm-none-eabi-objcopy # # Set various flags @@ -194,7 +195,7 @@ ARM7_CFLAGS := -g -Wall -O2\ ARM7_CXXFLAGS := $(ARM7_CFLAGS) -fno-exceptions -fno-rtti -ARM7_LDFLAGS := -g $(ARM7_ARCH) -mno-fpu +ARM7_LDFLAGS := -g $(ARM7_ARCH) -mfloat-abi=soft # HACK/FIXME: Define a custom build rule for cartreset.c. # We do this because it is a .c file, not a .cpp file and so is outside our diff --git a/backends/plugins/ds/ds-provider.cpp b/backends/plugins/ds/ds-provider.cpp index 1c9744518e..b21c48355d 100644 --- a/backends/plugins/ds/ds-provider.cpp +++ b/backends/plugins/ds/ds-provider.cpp @@ -20,6 +20,8 @@ * */ +#define FORBIDDEN_SYMBOL_ALLOW_ALL + #include "common/scummsys.h" #if defined(DYNAMIC_MODULES) && defined(__DS__) @@ -1476,7 +1476,7 @@ dreamcast) ds) _host_os=ds _host_cpu=arm - _host_alias=arm-eabi + _host_alias=arm-none-eabi ;; gamecube) _host_os=gamecube @@ -2555,7 +2555,8 @@ case $_host_os in append_var DEFINES "-DARM" append_var DEFINES "-DNONSTANDARD_PORT" append_var CXXFLAGS "-isystem $DEVKITPRO/libnds/include" - append_var CXXFLAGS "-isystem $DEVKITPRO/devkitARM/arm-eabi/include" + append_var CXXFLAGS "-I$DEVKITPRO/portlibs/nds/include" + append_var CXXFLAGS "-I$DEVKITPRO/portlibs/armv5te/include" append_var CXXFLAGS "-mcpu=arm9tdmi" append_var CXXFLAGS "-mtune=arm9tdmi" append_var CXXFLAGS "-fomit-frame-pointer" @@ -2566,7 +2567,7 @@ case $_host_os in append_var CXXFLAGS "-fuse-cxa-atexit" append_var LDFLAGS "-specs=ds_arm9.specs" append_var LDFLAGS "-mthumb-interwork" - append_var LDFLAGS "-mno-fpu" + append_var LDFLAGS "-mfloat-abi=soft" append_var LDFLAGS "-Wl,-Map,map.txt" if test "$_dynamic_modules" = no ; then append_var LDFLAGS "-Wl,--gc-sections" @@ -2576,6 +2577,8 @@ case $_host_os in # append_var LDFLAGS "-Wl,--retain-symbols-file,ds.syms" fi append_var LDFLAGS "-L$DEVKITPRO/libnds/lib" + append_var LDFLAGS "-L$DEVKITPRO/portlibs/nds/lib" + append_var LDFLAGS "-L$DEVKITPRO/portlibs/armv5te/lib" append_var LIBS "-lnds9" ;; freebsd*) @@ -3727,7 +3730,7 @@ POST_OBJS_FLAGS := -Wl,--no-whole-archive append_var DEFINES "-DUNCACHED_PLUGINS" append_var DEFINES "-DELF_NO_MEM_MANAGER" _mak_plugins=' -PLUGIN_LDFLAGS += -Wl,-T$(srcdir)/backends/plugins/ds/plugin.ld -mthumb-interwork -mno-fpu +PLUGIN_LDFLAGS += -Wl,-T$(srcdir)/backends/plugins/ds/plugin.ld -mthumb-interwork -mfloat-abi=soft ' ;; freebsd*) @@ -5232,6 +5235,7 @@ cat > config.h << EOF $_config_h_data /* Data types */ +#ifndef SCUMMVM_DONT_DEFINE_TYPES typedef unsigned $type_1_byte byte; typedef unsigned int uint; typedef unsigned $type_1_byte uint8; @@ -5242,6 +5246,7 @@ typedef signed $type_1_byte int8; typedef signed $type_2_byte int16; typedef signed $type_4_byte int32; typedef signed $type_8_byte int64; +#endif typedef $type_ptr uintptr; |