From 69b1485a22dc2b8a2cfe0bd10edcbaad0da0cf6e Mon Sep 17 00:00:00 2001 From: strangerke Date: Thu, 12 May 2011 01:13:57 +0200 Subject: GIT: Clean up: Suppress SVN tags, now useless --- configure | 2 -- 1 file changed, 2 deletions(-) (limited to 'configure') diff --git a/configure b/configure index e5ca5aaeca..9fb72f0474 100755 --- a/configure +++ b/configure @@ -20,8 +20,6 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # -# $URL$ -# $Id$ # Save the current environment variables for next runs SAVED_CONFIGFLAGS=$@ -- cgit v1.2.3 From 7543c3ba5fcc914a4031fc8328aacd3d28c7055d Mon Sep 17 00:00:00 2001 From: md5 Date: Fri, 13 May 2011 18:52:51 +0300 Subject: CONFIGURE: Don't disable the sword25 engine when libpng is not found --- configure | 5 ----- 1 file changed, 5 deletions(-) (limited to 'configure') diff --git a/configure b/configure index 9fb72f0474..91461f340b 100755 --- a/configure +++ b/configure @@ -2582,11 +2582,6 @@ fi define_in_config_if_yes "$_png" 'USE_PNG' echo "$_png" -if test `get_engine_build sword25` = yes && test ! "$_png" = yes ; then - echo "...disabling Broken Sword 2.5 engine. PNG is required" - engine_disable sword25 -fi - # # Check for Theora Decoder # -- cgit v1.2.3 From e3a487702abb7c6f09aae8b0bdf53d3089112af2 Mon Sep 17 00:00:00 2001 From: md5 Date: Fri, 13 May 2011 20:35:39 +0300 Subject: CONFIGURE: Don't enable the sword25 engine if Zlib is not enabled --- configure | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'configure') diff --git a/configure b/configure index 91461f340b..46e6eb8b8f 100755 --- a/configure +++ b/configure @@ -2654,6 +2654,11 @@ fi define_in_config_if_yes "$_zlib" 'USE_ZLIB' echo "$_zlib" +if test `get_engine_build sword25` = yes && test ! "$_zlib" = yes ; then + echo "...disabling Broken Sword 2.5 engine. ZLib is required" + engine_disable sword25 +fi + # # Check for LibMPEG2 # -- cgit v1.2.3 From 6db6d69eedeb74d4863b2dd964407ca8bca1c4a8 Mon Sep 17 00:00:00 2001 From: CeRiAl Date: Thu, 28 Apr 2011 06:40:54 +0800 Subject: WINCE: Enable building of plugins with normal configure/make Enables building of plugin .dlls without a custom Makefile. Also removes generation of scummvm.exe.map from configure script. --- configure | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) mode change 100755 => 100644 configure (limited to 'configure') diff --git a/configure b/configure old mode 100755 new mode 100644 index 46e6eb8b8f..bdbda1a8c9 --- a/configure +++ b/configure @@ -1697,8 +1697,8 @@ case $_host_os in fi ;; wince) - CXXFLAGS="$CXXFLAGS -O3 -fno-inline-functions -march=armv4 -mtune=xscale" - DEFINES="$DEFINES -D_WIN32_WCE=300 -D__ARM__ -D_ARM_ -DUNICODE -DFPM_DEFAULT -DNONSTANDARD_PORT" + CXXFLAGS="$CXXFLAGS -O3 -fno-inline-functions -march=armv4 -mtune=xscale -D_WIN32_WCE=300 " + DEFINES="$DEFINES -D__ARM__ -D_ARM_ -DUNICODE -DFPM_DEFAULT -DNONSTANDARD_PORT" DEFINES="$DEFINES -DWIN32 -Dcdecl= -D__cdecl__=" ;; # given this is a shell script assume some type of unix @@ -2054,7 +2054,7 @@ if test -n "$_host"; then add_line_to_config_h "#define USE_WII_KBD" ;; wince) - LDFLAGS="$LDFLAGS -Wl,-Map,scummvm.exe.map -Wl,--stack,65536" + LDFLAGS="$LDFLAGS -Wl,--stack,65536" _need_memalign=yes _arm_asm=yes _tremolo=yes @@ -2317,6 +2317,24 @@ CXXFLAGS += -DDYNAMIC_MODULES PLUGIN_LDFLAGS := -Wl,--enable-auto-import -shared ./libscummvm.a PRE_OBJS_FLAGS := -Wl,--whole-archive POST_OBJS_FLAGS := -Wl,--export-all-symbols -Wl,--no-whole-archive -Wl,--out-implib,./libscummvm.a +' + ;; + wince) + DEFINES="$DEFINES -DUNCACHED_PLUGINS" + HOSTEXEEXT=".dll" +_def_plugin=' +#define PLUGIN_PREFIX "" +#define PLUGIN_SUFFIX ".dll" +' +_mak_plugins=' +DYNAMIC_MODULES := 1 +PLUGIN_PREFIX := +PLUGIN_SUFFIX := .dll +PLUGIN_EXTRA_DEPS = $(EXECUTABLE) +CXXFLAGS += -DDYNAMIC_MODULES +PLUGIN_LDFLAGS := -shared -lscummvm -L. +PRE_OBJS_FLAGS := -Wl,--whole-archive +POST_OBJS_FLAGS := -Wl,--export-all-symbols -Wl,--no-whole-archive -Wl,--out-implib,./libscummvm.a -shared ' ;; ps2) -- cgit v1.2.3 From a47d2aaa6f38f4d413b5ebc7688ade7c515f6d64 Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Wed, 18 May 2011 00:07:46 +0200 Subject: BUILD: Reset executable flag of configure --- configure | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 configure (limited to 'configure') diff --git a/configure b/configure old mode 100644 new mode 100755 -- cgit v1.2.3 From e27dd8ac4ea487d388c59db53d7d7ee1ce24e9c9 Mon Sep 17 00:00:00 2001 From: CeRiAl Date: Fri, 20 May 2011 06:20:52 +0800 Subject: WINCE: Change plugin extensions from .dll to .plugin - fixes erroneous loading of runtime-dlls --- configure | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'configure') diff --git a/configure b/configure index bdbda1a8c9..c4243e1784 100755 --- a/configure +++ b/configure @@ -2324,12 +2324,12 @@ POST_OBJS_FLAGS := -Wl,--export-all-symbols -Wl,--no-whole-archive -Wl,--out-im HOSTEXEEXT=".dll" _def_plugin=' #define PLUGIN_PREFIX "" -#define PLUGIN_SUFFIX ".dll" +#define PLUGIN_SUFFIX ".plugin" ' _mak_plugins=' DYNAMIC_MODULES := 1 PLUGIN_PREFIX := -PLUGIN_SUFFIX := .dll +PLUGIN_SUFFIX := .plugin PLUGIN_EXTRA_DEPS = $(EXECUTABLE) CXXFLAGS += -DDYNAMIC_MODULES PLUGIN_LDFLAGS := -shared -lscummvm -L. -- cgit v1.2.3 From 1b248cd9362e7201b209eb0bc2a099c4b7cbca27 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Wed, 4 May 2011 16:30:10 +0200 Subject: BUILD: Reorder parts of configure --- configure | 392 +++++++++++++++++++++++++++++++------------------------------- 1 file changed, 196 insertions(+), 196 deletions(-) (limited to 'configure') diff --git a/configure b/configure index c4243e1784..e8390385bc 100755 --- a/configure +++ b/configure @@ -1431,16 +1431,57 @@ if test "$_global_constructors" = yes; then fi echo $_global_constructors +# +# Do CXXFLAGS now that we know the compiler version +# +if test "$have_gcc" = yes ; then + if test "$_cxx_major" -ge "3" ; then + case $_host_os in + # newlib-based system include files suppress non-C89 function + # declarations under __STRICT_ANSI__ + amigaos* | android | dreamcast | ds | gamecube | mingw* | n64 | psp | ps2 | wii | wince ) + CXXFLAGS="$CXXFLAGS -W -Wno-unused-parameter" + ;; + *) + CXXFLAGS="$CXXFLAGS -ansi -W -Wno-unused-parameter" + ;; + esac + add_line_to_config_mk 'HAVE_GCC3 = 1' + add_line_to_config_mk 'CXX_UPDATE_DEP_FLAG = -MMD -MF "$(*D)/$(DEPDIR)/$(*F).d" -MQ "$@" -MP' + fi; + + if test "$_cxx_major" -eq 4 && test "$_cxx_minor" -ge 3 || \ + test "$_cxx_major" -gt 4 ; then + CXXFLAGS="$CXXFLAGS -Wno-empty-body" + else + CXXFLAGS="$CXXFLAGS -Wconversion" + fi; +elif test "$have_icc" = yes ; then + add_line_to_config_mk 'CXX_UPDATE_DEP_FLAG = -MMD -MF "$(*D)/$(DEPDIR)/$(*F).d" -MQ "$@" -MP' +fi; + +# Some platforms use certain GNU extensions in header files +case $_host_os in +android | gamecube | psp | wii) + ;; +*) + # ICC does not support pedantic + if test "$have_icc" = no ; then + CXXFLAGS="$CXXFLAGS -pedantic" + fi + ;; +esac + # # Check for endianness # echo_n "Checking endianness... " cat > tmp_endianness_check.cpp << EOF -short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; -short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; +unsigned short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; +unsigned short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; void _ascii() { char* s = (char*) ascii_mm; s = (char*) ascii_ii; } -short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; -short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; +unsigned short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; +unsigned short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; void _ebcdic() { char* s = (char*) ebcdic_mm; s = (char*) ebcdic_ii; } int main() { _ascii (); _ebcdic (); return 0; } EOF @@ -2116,6 +2157,157 @@ EOF echo "$_need_memalign" fi +# +# Backend related stuff +# +case $_backend in + android) + # ssp at this point so the cxxtests link + if test "$_debug_build" = yes; then + CXXFLAGS="$CXXFLAGS -fstack-protector" + else + CXXFLAGS="$CXXFLAGS -fno-stack-protector" + fi + CXXFLAGS="$CXXFLAGS -Wa,--noexecstack" + LDFLAGS="$LDFLAGS -Wl,-z,noexecstack" + + static_libs='' + system_libs='' + for lib in $LIBS; do + case $lib in + -lz|-lm) + system_libs="$system_libs $lib" + ;; + *) + static_libs="$static_libs $lib" + ;; + esac + done + + # -lgcc is carefully placed here - we want to catch + # all toolchain symbols in *our* libraries rather + # than pick up anything unhygenic from the Android libs. + LIBS="-Wl,-Bstatic $static_libs" + LIBS="$LIBS -Wl,-Bdynamic -lgcc $system_libs -llog -lGLESv1_CM" + DEFINES="$DEFINES -DREDUCE_MEMORY_USAGE" + ;; + dc) + INCLUDES="$INCLUDES "'-I$(srcdir)/backends/platform/dc -isystem $(ronindir)/include' + LDFLAGS="$LDFLAGS -Wl,-Ttext,0x8c010000 -nostartfiles "'$(ronindir)/lib/crt0.o -L$(ronindir)/lib' + LIBS="$LIBS -lronin -lm" + ;; + dingux) + find_sdlconfig + INCLUDES="$INCLUDES `$_sdlconfig --prefix="$_sdlpath" --cflags`" + LIBS="$LIBS `$_sdlconfig --prefix="$_sdlpath" --libs`" + DEFINES="$DEFINES -DSDL_BACKEND -DDINGUX" + LDFLAGS="$LDFLAGS " + MODULES="$MODULES backends/platform/sdl" + ;; + ds) + # TODO ds + INCLUDES="$INCLUDES "'-I$(srcdir)/backends/platform/ds/arm9/source' + INCLUDES="$INCLUDES "'-I$(srcdir)/backends/platform/ds/commoninclude' + INCLUDES="$INCLUDES "'-Ibackends/platform/ds/arm9/data' + ;; + gp2x) + find_sdlconfig + INCLUDES="$INCLUDES `$_sdlconfig --prefix="$_sdlpath" --cflags`" + LIBS="$LIBS `$_sdlconfig --prefix="$_sdlpath" --libs`" + LDFLAGS="$LDFLAGS" + DEFINES="$DEFINES -DSDL_BACKEND" + ;; + gph) + find_sdlconfig + INCLUDES="$INCLUDES `$_sdlconfig --prefix="$_sdlpath" --cflags`" + LIBS="$LIBS `$_sdlconfig --prefix="$_sdlpath" --libs`" + LDFLAGS="$LDFLAGS" + DEFINES="$DEFINES -DSDL_BACKEND" + ;; + iphone) + OBJCFLAGS="$OBJCFLAGS --std=c99" + LIBS="$LIBS -lobjc -framework UIKit -framework CoreGraphics -framework OpenGLES -framework QuartzCore -framework GraphicsServices -framework CoreFoundation -framework Foundation -framework AudioToolbox -framework CoreAudio" + ;; + linuxmoto) + find_sdlconfig + INCLUDES="$INCLUDES `$_sdlconfig --prefix="$_sdlpath" --cflags`" + LIBS="$LIBS `$_sdlconfig --prefix="$_sdlpath" --libs`" + DEFINES="$DEFINES -DSDL_BACKEND -DLINUXMOTO" + ;; + n64) + INCLUDES="$INCLUDES "'-I$(N64SDK)/include' + INCLUDES="$INCLUDES "'-I$(N64SDK)/mips64/include' + INCLUDES="$INCLUDES "'-I$(N64SDK)/hkz-libn64' + INCLUDES="$INCLUDES "'-I$(srcdir)/backends/platform/n64' + LIBS="$LIBS -lpakfs -lframfs -ln64 -ln64utils -lromfs -lm -lstdc++ -lc -lgcc -lz -lnosys" + ;; + null) + DEFINES="$DEFINES -DUSE_NULL_DRIVER" + ;; + openpandora) + find_sdlconfig + INCLUDES="$INCLUDES `$_sdlconfig --prefix="$_sdlpath" --cflags`" + LIBS="$LIBS `$_sdlconfig --prefix="$_sdlpath" --libs`" + LDFLAGS="$LDFLAGS" + DEFINES="$DEFINES -DSDL_BACKEND" + ;; + ps2) + # TODO ps2 + DEFINES="$DEFINES -D_EE -DFORCE_RTL" + INCLUDES="$INCLUDES -I$PS2SDK/ee/include -I$PS2SDK/common/include -I$PS2SDK/ports/include" + if test "$_dynamic_modules" = no ; then + LDFLAGS="$LDFLAGS -mno-crt0 $PS2SDK/ee/startup/crt0.o -T $PS2SDK/ee/startup/linkfile" + fi + LDFLAGS="$LDFLAGS -L$PS2SDK/ee/lib -L$PS2SDK/ports/lib" + LIBS="$LIBS -lmc -lpad -lmouse -lhdd -lpoweroff -lsjpcm -lm -lc -lfileXio -lkernel -lstdc++ " + ;; + psp) + DEFINES="$DEFINES -D__PSP__ -DDISABLE_COMMAND_LINE -DDISABLE_DOSBOX_OPL" + LIBS="$LIBS -lpng -Wl,-Map,mapfile.txt" + ;; + samsungtv) + find_sdlconfig + INCLUDES="$INCLUDES `$_sdlconfig --prefix="$_sdlpath" --cflags`" + LIBS="$LIBS `$_sdlconfig --prefix="$_sdlpath" --libs`" + DEFINES="$DEFINES -DSDL_BACKEND -DSAMSUNGTV" + LDFLAGS="$LDFLAGS -shared -fpic" + MODULES="$MODULES backends/platform/sdl" + ;; + sdl) + find_sdlconfig + INCLUDES="$INCLUDES `$_sdlconfig --prefix="$_sdlpath" --cflags`" + LIBS="$LIBS `$_sdlconfig --prefix="$_sdlpath" --libs`" + DEFINES="$DEFINES -DSDL_BACKEND" + ;; + webos) + # There is no sdl-config in the WebOS PDK so we don't use find_sdlconfig here. + LIBS="$LIBS -lSDL" + DEFINES="$DEFINES -DSDL_BACKEND -DWEBOS" + MODULES="$MODULES backends/platform/sdl" + ;; + wii) + DEFINES="$DEFINES -D__WII__ -DGEKKO" + case $_host_os in + gamecube) + LIBS="$LIBS -lgxflux -liso9660 -lfat -logc -ldb" + ;; + *) + LIBS="$LIBS -lgxflux -ldi -liso9660 -ltinysmb -lfat -lwiiuse -lbte -logc -lwiikeyboard -ldb" + ;; + esac + ;; + wince) + INCLUDES="$INCLUDES "'-I$(srcdir) -I$(srcdir)/backends/platform/wince -I$(srcdir)/engines -I$(srcdir)/backends/platform/wince/missing/gcc -I$(srcdir)/backends/platform/wince/CEgui -I$(srcdir)/backends/platform/wince/CEkeys' + LIBS="$LIBS -static -lSDL" + DEFINES="$DEFINES -DSDL_BACKEND" + ;; + *) + echo "support for $_backend backend not implemented in configure script yet" + exit 1 + ;; +esac +MODULES="$MODULES backends/platform/$_backend" + # # Enable 16bit support only for backends which support it # @@ -3034,198 +3226,6 @@ else echo fi -# -# Backend related stuff -# -case $_backend in - android) - # ssp at this point so the cxxtests link - if test "$_debug_build" = yes; then - CXXFLAGS="$CXXFLAGS -fstack-protector" - else - CXXFLAGS="$CXXFLAGS -fno-stack-protector" - fi - CXXFLAGS="$CXXFLAGS -Wa,--noexecstack" - LDFLAGS="$LDFLAGS -Wl,-z,noexecstack" - - static_libs='' - system_libs='' - for lib in $LIBS; do - case $lib in - -lz|-lm) - system_libs="$system_libs $lib" - ;; - *) - static_libs="$static_libs $lib" - ;; - esac - done - - # -lgcc is carefully placed here - we want to catch - # all toolchain symbols in *our* libraries rather - # than pick up anything unhygenic from the Android libs. - LIBS="-Wl,-Bstatic $static_libs" - LIBS="$LIBS -Wl,-Bdynamic -lgcc $system_libs -llog -lGLESv1_CM" - DEFINES="$DEFINES -DREDUCE_MEMORY_USAGE" - ;; - dc) - INCLUDES="$INCLUDES "'-I$(srcdir)/backends/platform/dc -isystem $(ronindir)/include' - LDFLAGS="$LDFLAGS -Wl,-Ttext,0x8c010000 -nostartfiles "'$(ronindir)/lib/crt0.o -L$(ronindir)/lib' - LIBS="$LIBS -lronin -lm" - ;; - dingux) - find_sdlconfig - INCLUDES="$INCLUDES `$_sdlconfig --prefix="$_sdlpath" --cflags`" - LIBS="$LIBS `$_sdlconfig --prefix="$_sdlpath" --libs`" - DEFINES="$DEFINES -DSDL_BACKEND -DDINGUX" - LDFLAGS="$LDFLAGS " - MODULES="$MODULES backends/platform/sdl" - ;; - ds) - # TODO ds - INCLUDES="$INCLUDES "'-I$(srcdir)/backends/platform/ds/arm9/source' - INCLUDES="$INCLUDES "'-I$(srcdir)/backends/platform/ds/commoninclude' - INCLUDES="$INCLUDES "'-Ibackends/platform/ds/arm9/data' - ;; - gp2x) - find_sdlconfig - INCLUDES="$INCLUDES `$_sdlconfig --prefix="$_sdlpath" --cflags`" - LIBS="$LIBS `$_sdlconfig --prefix="$_sdlpath" --libs`" - LDFLAGS="$LDFLAGS" - DEFINES="$DEFINES -DSDL_BACKEND" - ;; - gph) - find_sdlconfig - INCLUDES="$INCLUDES `$_sdlconfig --prefix="$_sdlpath" --cflags`" - LIBS="$LIBS `$_sdlconfig --prefix="$_sdlpath" --libs`" - LDFLAGS="$LDFLAGS" - DEFINES="$DEFINES -DSDL_BACKEND" - ;; - iphone) - OBJCFLAGS="$OBJCFLAGS --std=c99" - LIBS="$LIBS -lobjc -framework UIKit -framework CoreGraphics -framework OpenGLES -framework QuartzCore -framework GraphicsServices -framework CoreFoundation -framework Foundation -framework AudioToolbox -framework CoreAudio" - ;; - linuxmoto) - find_sdlconfig - INCLUDES="$INCLUDES `$_sdlconfig --prefix="$_sdlpath" --cflags`" - LIBS="$LIBS `$_sdlconfig --prefix="$_sdlpath" --libs`" - DEFINES="$DEFINES -DSDL_BACKEND -DLINUXMOTO" - ;; - n64) - INCLUDES="$INCLUDES "'-I$(N64SDK)/include' - INCLUDES="$INCLUDES "'-I$(N64SDK)/mips64/include' - INCLUDES="$INCLUDES "'-I$(N64SDK)/hkz-libn64' - INCLUDES="$INCLUDES "'-I$(srcdir)/backends/platform/n64' - LIBS="$LIBS -lpakfs -lframfs -ln64 -ln64utils -lromfs -lm -lstdc++ -lc -lgcc -lz -lnosys" - ;; - null) - DEFINES="$DEFINES -DUSE_NULL_DRIVER" - ;; - openpandora) - find_sdlconfig - INCLUDES="$INCLUDES `$_sdlconfig --prefix="$_sdlpath" --cflags`" - LIBS="$LIBS `$_sdlconfig --prefix="$_sdlpath" --libs`" - LDFLAGS="$LDFLAGS" - DEFINES="$DEFINES -DSDL_BACKEND" - ;; - ps2) - # TODO ps2 - DEFINES="$DEFINES -D_EE -DFORCE_RTL" - INCLUDES="$INCLUDES -I$PS2SDK/ee/include -I$PS2SDK/common/include -I$PS2SDK/ports/include" - if test "$_dynamic_modules" = no ; then - LDFLAGS="$LDFLAGS -mno-crt0 $PS2SDK/ee/startup/crt0.o -T $PS2SDK/ee/startup/linkfile" - fi - LDFLAGS="$LDFLAGS -L$PS2SDK/ee/lib -L$PS2SDK/ports/lib" - LIBS="$LIBS -lmc -lpad -lmouse -lhdd -lpoweroff -lsjpcm -lm -lc -lfileXio -lkernel -lstdc++ " - ;; - psp) - DEFINES="$DEFINES -D__PSP__ -DDISABLE_COMMAND_LINE -DDISABLE_DOSBOX_OPL" - LIBS="$LIBS -lpng -Wl,-Map,mapfile.txt" - ;; - samsungtv) - find_sdlconfig - INCLUDES="$INCLUDES `$_sdlconfig --prefix="$_sdlpath" --cflags`" - LIBS="$LIBS `$_sdlconfig --prefix="$_sdlpath" --libs`" - DEFINES="$DEFINES -DSDL_BACKEND -DSAMSUNGTV" - LDFLAGS="$LDFLAGS -shared -fpic" - MODULES="$MODULES backends/platform/sdl" - ;; - sdl) - find_sdlconfig - INCLUDES="$INCLUDES `$_sdlconfig --prefix="$_sdlpath" --cflags`" - LIBS="$LIBS `$_sdlconfig --prefix="$_sdlpath" --libs`" - DEFINES="$DEFINES -DSDL_BACKEND" - ;; - webos) - # There is no sdl-config in the WebOS PDK so we don't use find_sdlconfig here. - LIBS="$LIBS -lSDL" - DEFINES="$DEFINES -DSDL_BACKEND -DWEBOS" - MODULES="$MODULES backends/platform/sdl" - ;; - wii) - DEFINES="$DEFINES -D__WII__ -DGEKKO" - case $_host_os in - gamecube) - LIBS="$LIBS -lgxflux -liso9660 -lfat -logc -ldb" - ;; - *) - LIBS="$LIBS -lgxflux -ldi -liso9660 -ltinysmb -lfat -lwiiuse -lbte -logc -lwiikeyboard -ldb" - ;; - esac - ;; - wince) - INCLUDES="$INCLUDES "'-I$(srcdir) -I$(srcdir)/backends/platform/wince -I$(srcdir)/engines -I$(srcdir)/backends/platform/wince/missing/gcc -I$(srcdir)/backends/platform/wince/CEgui -I$(srcdir)/backends/platform/wince/CEkeys' - LIBS="$LIBS -static -lSDL" - DEFINES="$DEFINES -DSDL_BACKEND" - ;; - *) - echo "support for $_backend backend not implemented in configure script yet" - exit 1 - ;; -esac -MODULES="$MODULES backends/platform/$_backend" - -# -# Do CXXFLAGS now that we know the compiler version -# -if test "$have_gcc" = yes ; then - if test "$_cxx_major" -ge "3" ; then - case $_host_os in - # newlib-based system include files suppress non-C89 function - # declarations under __STRICT_ANSI__ - amigaos* | android | dreamcast | ds | gamecube | mingw* | n64 | psp | ps2 | wii | wince ) - CXXFLAGS="$CXXFLAGS -W -Wno-unused-parameter" - ;; - *) - CXXFLAGS="$CXXFLAGS -ansi -W -Wno-unused-parameter" - ;; - esac - add_line_to_config_mk 'HAVE_GCC3 = 1' - add_line_to_config_mk 'CXX_UPDATE_DEP_FLAG = -MMD -MF "$(*D)/$(DEPDIR)/$(*F).d" -MQ "$@" -MP' - fi; - - if test "$_cxx_major" -eq 4 && test "$_cxx_minor" -ge 3 || \ - test "$_cxx_major" -gt 4 ; then - CXXFLAGS="$CXXFLAGS -Wno-empty-body" - else - CXXFLAGS="$CXXFLAGS -Wconversion" - fi; -elif test "$have_icc" = yes ; then - add_line_to_config_mk 'CXX_UPDATE_DEP_FLAG = -MMD -MF "$(*D)/$(DEPDIR)/$(*F).d" -MQ "$@" -MP' -fi; - -# Some platforms use certain GNU extensions in header files -case $_host_os in -android | gamecube | psp | wii) - ;; -*) - # ICC does not support pedantic - if test "$have_icc" = no ; then - CXXFLAGS="$CXXFLAGS -pedantic" - fi - ;; -esac - # # Engine selection # -- cgit v1.2.3 From 7585303c06fbac525b8e24404c79b673fa1be9c5 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Wed, 4 May 2011 23:02:31 +0200 Subject: BUILD: Do not manually set endianess If for some reason the endianess is not detected right, then this should be reported as a bug; and any (hopefully temporary) specification of the endianess should be accompanied by an explanatory comment. --- configure | 5 ----- 1 file changed, 5 deletions(-) (limited to 'configure') diff --git a/configure b/configure index e8390385bc..5519a0a862 100755 --- a/configure +++ b/configure @@ -1851,7 +1851,6 @@ if test -n "$_host"; then _port_mk="backends/platform/ds/ds.mk" ;; gamecube) - _endian=big _need_memalign=yes _backend="wii" _build_scalers=no @@ -1918,7 +1917,6 @@ if test -n "$_host"; then m68k-atari-mint) DEFINES="$DEFINES -DSYSTEM_NOT_SUPPORTING_D_TYPE" _unix=yes - _endian=big _need_memalign=yes _ranlib=m68k-atari-mint-ranlib _ar="m68k-atari-mint-ar cru" @@ -1933,7 +1931,6 @@ if test -n "$_host"; then mips-sgi*) LDFLAGS="$LDFLAGS -static-libgcc" LIBS="$LIBS -laudio" - _endian=big _need_memalign=yes ;; motoezx) @@ -2014,7 +2011,6 @@ if test -n "$_host"; then _port_mk="backends/platform/openpandora/op-bundle.mk" ;; ppc-amigaos) - _endian=big # AmigaOS exec allocates memory always in an aligned way _need_memalign=yes ;; @@ -2080,7 +2076,6 @@ if test -n "$_host"; then _keymapper=yes ;; wii) - _endian=big _need_memalign=yes _backend="wii" _build_scalers=no -- cgit v1.2.3 From ecb8618cb723bed6eb054f25c4ee1d2822adabb5 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Wed, 4 May 2011 23:19:22 +0200 Subject: BUILD: Unify build & configure rules for SDL based backends --- configure | 54 ++++++++++++++++++------------------------------------ 1 file changed, 18 insertions(+), 36 deletions(-) (limited to 'configure') diff --git a/configure b/configure index 5519a0a862..367289ee12 100755 --- a/configure +++ b/configure @@ -2192,12 +2192,7 @@ case $_backend in LIBS="$LIBS -lronin -lm" ;; dingux) - find_sdlconfig - INCLUDES="$INCLUDES `$_sdlconfig --prefix="$_sdlpath" --cflags`" - LIBS="$LIBS `$_sdlconfig --prefix="$_sdlpath" --libs`" - DEFINES="$DEFINES -DSDL_BACKEND -DDINGUX" - LDFLAGS="$LDFLAGS " - MODULES="$MODULES backends/platform/sdl" + DEFINES="$DEFINES -DDINGUX" ;; ds) # TODO ds @@ -2206,28 +2201,15 @@ case $_backend in INCLUDES="$INCLUDES "'-Ibackends/platform/ds/arm9/data' ;; gp2x) - find_sdlconfig - INCLUDES="$INCLUDES `$_sdlconfig --prefix="$_sdlpath" --cflags`" - LIBS="$LIBS `$_sdlconfig --prefix="$_sdlpath" --libs`" - LDFLAGS="$LDFLAGS" - DEFINES="$DEFINES -DSDL_BACKEND" ;; gph) - find_sdlconfig - INCLUDES="$INCLUDES `$_sdlconfig --prefix="$_sdlpath" --cflags`" - LIBS="$LIBS `$_sdlconfig --prefix="$_sdlpath" --libs`" - LDFLAGS="$LDFLAGS" - DEFINES="$DEFINES -DSDL_BACKEND" ;; iphone) OBJCFLAGS="$OBJCFLAGS --std=c99" LIBS="$LIBS -lobjc -framework UIKit -framework CoreGraphics -framework OpenGLES -framework QuartzCore -framework GraphicsServices -framework CoreFoundation -framework Foundation -framework AudioToolbox -framework CoreAudio" ;; linuxmoto) - find_sdlconfig - INCLUDES="$INCLUDES `$_sdlconfig --prefix="$_sdlpath" --cflags`" - LIBS="$LIBS `$_sdlconfig --prefix="$_sdlpath" --libs`" - DEFINES="$DEFINES -DSDL_BACKEND -DLINUXMOTO" + DEFINES="$DEFINES -DLINUXMOTO" ;; n64) INCLUDES="$INCLUDES "'-I$(N64SDK)/include' @@ -2240,11 +2222,6 @@ case $_backend in DEFINES="$DEFINES -DUSE_NULL_DRIVER" ;; openpandora) - find_sdlconfig - INCLUDES="$INCLUDES `$_sdlconfig --prefix="$_sdlpath" --cflags`" - LIBS="$LIBS `$_sdlconfig --prefix="$_sdlpath" --libs`" - LDFLAGS="$LDFLAGS" - DEFINES="$DEFINES -DSDL_BACKEND" ;; ps2) # TODO ps2 @@ -2261,18 +2238,8 @@ case $_backend in LIBS="$LIBS -lpng -Wl,-Map,mapfile.txt" ;; samsungtv) - find_sdlconfig - INCLUDES="$INCLUDES `$_sdlconfig --prefix="$_sdlpath" --cflags`" - LIBS="$LIBS `$_sdlconfig --prefix="$_sdlpath" --libs`" - DEFINES="$DEFINES -DSDL_BACKEND -DSAMSUNGTV" + DEFINES="$DEFINES -DSAMSUNGTV" LDFLAGS="$LDFLAGS -shared -fpic" - MODULES="$MODULES backends/platform/sdl" - ;; - sdl) - find_sdlconfig - INCLUDES="$INCLUDES `$_sdlconfig --prefix="$_sdlpath" --cflags`" - LIBS="$LIBS `$_sdlconfig --prefix="$_sdlpath" --libs`" - DEFINES="$DEFINES -DSDL_BACKEND" ;; webos) # There is no sdl-config in the WebOS PDK so we don't use find_sdlconfig here. @@ -2296,6 +2263,8 @@ case $_backend in LIBS="$LIBS -static -lSDL" DEFINES="$DEFINES -DSDL_BACKEND" ;; + sdl) + ;; *) echo "support for $_backend backend not implemented in configure script yet" exit 1 @@ -2303,6 +2272,19 @@ case $_backend in esac MODULES="$MODULES backends/platform/$_backend" +# +# Setup SDL specifics for SDL based backends +# +case $_backend in + dingux | gp2x | gph | linuxmoto | openpandora | samsungtv | sdl) + find_sdlconfig + INCLUDES="$INCLUDES `$_sdlconfig --prefix="$_sdlpath" --cflags`" + LIBS="$LIBS `$_sdlconfig --prefix="$_sdlpath" --libs`" + DEFINES="$DEFINES -DSDL_BACKEND" + ;; +esac + + # # Enable 16bit support only for backends which support it # -- cgit v1.2.3 From e013a516041b56e2c0f94b7c967de5cad615d12d Mon Sep 17 00:00:00 2001 From: Max Horn Date: Thu, 5 May 2011 12:19:47 +0200 Subject: BUILD: Enable ARM asm only based on _host_cpu Also moved x86 and ARM recognition code in configure to be next to each other; and print whether ARM specific code is going to be used or not. --- configure | 74 +++++++++++++++++++++++++++++++-------------------------------- 1 file changed, 36 insertions(+), 38 deletions(-) (limited to 'configure') diff --git a/configure b/configure index 367289ee12..1528015402 100755 --- a/configure +++ b/configure @@ -145,7 +145,6 @@ _text_console=no _mt32emu=yes _build_scalers=yes _build_hq_scalers=yes -_arm_asm=no _indeo3=auto _enable_prof=no _unix=no @@ -161,6 +160,7 @@ _backend=sdl _endian=unknown _need_memalign=no _have_x86=no +_arm_asm=no _verbose_build=no _dynamic_modules=no _plugins_default=static @@ -1542,20 +1542,6 @@ TMPR="$?" echo "$type_4_byte" test $TMPR -eq 0 || exit 1 # check exit code of subshell -# -# Check whether we can use x86 asm routines -# -echo_n "Compiling for x86... " -case $_host_cpu in - i386|i486|i586|i686) - _have_x86=yes - ;; - *) - _have_x86=no - ;; -esac -echo "$_have_x86" - # # Determine build settings # @@ -1762,7 +1748,6 @@ if test -n "$_host"; then HOSTEXEEXT=.so _backend="android" _port_mk="backends/platform/android/android.mk" - _arm_asm=yes _build_scalers=no _seq_midi=no _mt32emu=no @@ -1771,7 +1756,6 @@ if test -n "$_host"; then arm-linux|arm*-linux-gnueabi|arm-*-linux) _unix=yes _need_memalign=yes - _arm_asm=yes ;; arm-riscos|linupy) DEFINES="$DEFINES -DLINUPY" @@ -1795,7 +1779,6 @@ if test -n "$_host"; then ASFLAGS="$ASFLAGS" _unix=yes _need_memalign=yes - _arm_asm=yes _backend="gph" _build_hq_scalers=no _vkeybd=yes @@ -1843,7 +1826,6 @@ if test -n "$_host"; then DEFINES="$DEFINES -DDISABLE_DOSBOX_OPL -DDISABLE_SID -DDISABLE_NES_APU" DEFINES="$DEFINES -DDISABLE_COMMAND_LINE" _need_memalign=yes - _arm_asm=yes add_line_to_config_h '#define DISABLE_TEXT_CONSOLE' _backend="ds" _build_scalers=no @@ -1876,7 +1858,6 @@ if test -n "$_host"; then LDFLAGS="$LDFLAGS -static" _unix=yes _need_memalign=yes - _arm_asm=yes _backend="gph" _build_hq_scalers=no _vkeybd=yes @@ -1896,7 +1877,6 @@ if test -n "$_host"; then ASFLAGS="$ASFLAGS -mfloat-abi=soft" _unix=yes _need_memalign=yes - _arm_asm=yes _backend="gph" _build_hq_scalers=no _vkeybd=yes @@ -1909,7 +1889,6 @@ if test -n "$_host"; then DEFINES="$DEFINES -DIPHONE" _unix=yes _need_memalign=yes - _arm_asm=yes _backend="iphone" _build_hq_scalers=no _seq_midi=no @@ -1938,7 +1917,6 @@ if test -n "$_host"; then ASFLAGS="$ASFLAGS -mfpu=vfp" _unix=yes _need_memalign=yes - _arm_asm=yes _backend="linuxmoto" _build_hq_scalers=no _mt32emu=no @@ -1951,7 +1929,6 @@ if test -n "$_host"; then ASFLAGS="$ASFLAGS -mfpu=vfp" _unix=yes _need_memalign=yes - _arm_asm=yes _backend="linuxmoto" _build_hq_scalers=no _mt32emu=no @@ -2002,7 +1979,6 @@ if test -n "$_host"; then ASFLAGS="$ASFLAGS -mfloat-abi=soft" _unix=yes _need_memalign=yes - _arm_asm=yes _backend="openpandora" _build_hq_scalers=yes _vkeybd=no @@ -2057,7 +2033,6 @@ if test -n "$_host"; then HOSTEXEEXT=".so" _unix=yes _need_memalign=yes - _arm_asm=yes _backend="samsungtv" _mt32emu=no _vkeybd=yes @@ -2065,7 +2040,6 @@ if test -n "$_host"; then webos) _unix=yes _need_memalign=yes - _arm_asm=yes _backend="webos" _port_mk="backends/platform/webos/webos.mk" _build_scalers=no @@ -2092,7 +2066,6 @@ if test -n "$_host"; then wince) LDFLAGS="$LDFLAGS -Wl,--stack,65536" _need_memalign=yes - _arm_asm=yes _tremolo=yes _backend="wince" _mt32emu=no @@ -2319,7 +2292,6 @@ case $_endian in ;; esac -define_in_config_h_if_yes $_have_x86 'HAVE_X86' define_in_config_h_if_yes $_need_memalign 'SCUMM_NEED_ALIGNMENT' @@ -2591,15 +2563,6 @@ define_in_config_if_yes "$_build_scalers" 'USE_SCALERS' define_in_config_if_yes "$_build_hq_scalers" 'USE_HQ_SCALERS' -# -# Check whether to use optimized ARM asm -# -define_in_config_if_yes "$_arm_asm" 'USE_ARM_SCALER_ASM' -define_in_config_if_yes "$_arm_asm" 'USE_ARM_SOUND_ASM' -define_in_config_if_yes "$_arm_asm" 'USE_ARM_SMUSH_ASM' -define_in_config_if_yes "$_arm_asm" 'USE_ARM_GFX_ASM' -define_in_config_if_yes "$_arm_asm" 'USE_ARM_COSTUME_ASM' - # # Check whether to compile the Indeo3 decoder # @@ -3037,6 +3000,41 @@ fi define_in_config_if_yes "$_opengl" "USE_OPENGL" define_in_config_if_yes "$_opengles" "USE_GLES" + +# +# Check whether we can use x86 asm routines +# +echo_n "Compiling for x86... " +case $_host_cpu in + i386|i486|i586|i686) + _have_x86=yes + ;; + *) + _have_x86=no + ;; +esac +echo "$_have_x86" +define_in_config_h_if_yes $_have_x86 'HAVE_X86' + +# +# Check whether to use optimized ARM asm +# +echo_n "Compiling for ARM... " +case $_host_cpu in + arm*) + _arm_asm=yes + ;; + *) + _arm_asm=no + ;; +esac +echo "$_arm_asm" +define_in_config_if_yes "$_arm_asm" 'USE_ARM_SCALER_ASM' +define_in_config_if_yes "$_arm_asm" 'USE_ARM_SOUND_ASM' +define_in_config_if_yes "$_arm_asm" 'USE_ARM_SMUSH_ASM' +define_in_config_if_yes "$_arm_asm" 'USE_ARM_GFX_ASM' +define_in_config_if_yes "$_arm_asm" 'USE_ARM_COSTUME_ASM' + # # Check for nasm # -- cgit v1.2.3 From 63a69b4f1e3356c1bfbfbfdc77dbb58e26b85d7e Mon Sep 17 00:00:00 2001 From: Max Horn Date: Thu, 5 May 2011 13:43:30 +0200 Subject: BUILD: Overhaul how we determine the need for aligned mem access Also add some comments explaining what is going on and why. --- configure | 104 +++++++++++++++++++++++++------------------------------------- 1 file changed, 42 insertions(+), 62 deletions(-) (limited to 'configure') diff --git a/configure b/configure index 1528015402..4bbc829d99 100755 --- a/configure +++ b/configure @@ -158,7 +158,7 @@ _translation=yes # Default platform settings _backend=sdl _endian=unknown -_need_memalign=no +_need_memalign=yes _have_x86=no _arm_asm=no _verbose_build=no @@ -1741,7 +1741,6 @@ if test -n "$_host"; then case "$_host" in android | android-v7a) _unix=yes - _need_memalign=yes # we link a .so as default LDFLAGS="$LDFLAGS -shared -Wl,-Bsymbolic,--no-undefined" HOSTEXEPRE=lib @@ -1755,15 +1754,12 @@ if test -n "$_host"; then ;; arm-linux|arm*-linux-gnueabi|arm-*-linux) _unix=yes - _need_memalign=yes ;; arm-riscos|linupy) DEFINES="$DEFINES -DLINUPY" _unix=yes - _need_memalign=yes ;; bfin*) - _need_memalign=yes ;; caanoo) # This uses the GPH backend. @@ -1778,7 +1774,6 @@ if test -n "$_host"; then CXXFLAGS="$CXXFLAGS -mcpu=arm926ej-s -mtune=arm926ej-s" ASFLAGS="$ASFLAGS" _unix=yes - _need_memalign=yes _backend="gph" _build_hq_scalers=no _vkeybd=yes @@ -1795,7 +1790,6 @@ if test -n "$_host"; then DEFINES="$DEFINES -DUNIX -DDINGUX -DDISABLE_DOSBOX_OPL -DREDUCE_MEMORY_USAGE" ASFLAGS="$ASFLAGS" CXXFLAGS="$CXXFLAGS -msoft-float -mips32" - _need_memalign=yes _backend="dingux" _mt32emu=no _vkeybd=yes @@ -1810,7 +1804,6 @@ if test -n "$_host"; then dreamcast) DEFINES="$DEFINES -DDISABLE_DEFAULT_SAVEFILEMANAGER -DDISABLE_TEXT_CONSOLE -DDISABLE_COMMAND_LINE" CXXFLAGS="$CXXFLAGS -O3 -funroll-loops -fschedule-insns2 -fomit-frame-pointer -fdelete-null-pointer-checks" - _need_memalign=yes _backend="dc" _build_scalers=no _mad=yes @@ -1825,7 +1818,6 @@ if test -n "$_host"; then DEFINES="$DEFINES -DREDUCE_MEMORY_USAGE -DSTREAM_AUDIO_FROM_DISK" DEFINES="$DEFINES -DDISABLE_DOSBOX_OPL -DDISABLE_SID -DDISABLE_NES_APU" DEFINES="$DEFINES -DDISABLE_COMMAND_LINE" - _need_memalign=yes add_line_to_config_h '#define DISABLE_TEXT_CONSOLE' _backend="ds" _build_scalers=no @@ -1833,7 +1825,6 @@ if test -n "$_host"; then _port_mk="backends/platform/ds/ds.mk" ;; gamecube) - _need_memalign=yes _backend="wii" _build_scalers=no _mt32emu=no @@ -1857,7 +1848,6 @@ if test -n "$_host"; then ASFLAGS="$ASFLAGS -mfloat-abi=soft" LDFLAGS="$LDFLAGS -static" _unix=yes - _need_memalign=yes _backend="gph" _build_hq_scalers=no _vkeybd=yes @@ -1876,7 +1866,6 @@ if test -n "$_host"; then CXXFLAGS="$CXXFLAGS -mcpu=arm926ej-s -mtune=arm926ej-s" ASFLAGS="$ASFLAGS -mfloat-abi=soft" _unix=yes - _need_memalign=yes _backend="gph" _build_hq_scalers=no _vkeybd=yes @@ -1888,7 +1877,6 @@ if test -n "$_host"; then iphone) DEFINES="$DEFINES -DIPHONE" _unix=yes - _need_memalign=yes _backend="iphone" _build_hq_scalers=no _seq_midi=no @@ -1896,7 +1884,6 @@ if test -n "$_host"; then m68k-atari-mint) DEFINES="$DEFINES -DSYSTEM_NOT_SUPPORTING_D_TYPE" _unix=yes - _need_memalign=yes _ranlib=m68k-atari-mint-ranlib _ar="m68k-atari-mint-ar cru" _seq_midi=no @@ -1910,13 +1897,11 @@ if test -n "$_host"; then mips-sgi*) LDFLAGS="$LDFLAGS -static-libgcc" LIBS="$LIBS -laudio" - _need_memalign=yes ;; motoezx) DEFINES="$DEFINES -DMOTOEZX" ASFLAGS="$ASFLAGS -mfpu=vfp" _unix=yes - _need_memalign=yes _backend="linuxmoto" _build_hq_scalers=no _mt32emu=no @@ -1928,7 +1913,6 @@ if test -n "$_host"; then DEFINES="$DEFINES -DMOTOMAGX" ASFLAGS="$ASFLAGS -mfpu=vfp" _unix=yes - _need_memalign=yes _backend="linuxmoto" _build_hq_scalers=no _mt32emu=no @@ -1943,7 +1927,6 @@ if test -n "$_host"; then LDFLAGS="$LDFLAGS -L$N64SDK/hkz-libn64 -L$N64SDK/lib" LDFLAGS="$LDFLAGS -T n64ld_cpp.x -Xlinker -Map -Xlinker scummvm.map" _backend="n64" - _need_memalign=yes _mt32emu=no _build_scalers=no _indeo3=no @@ -1962,7 +1945,6 @@ if test -n "$_host"; then neuros) DEFINES="$DEFINES -DNEUROS" _unix=yes - _need_memalign=yes _backend='null' _build_hq_scalers=no _mt32emu=no @@ -1978,7 +1960,6 @@ if test -n "$_host"; then CXXFLAGS="$CXXFLAGS -march=armv7-a -mtune=cortex-a8 -mfpu=neon" ASFLAGS="$ASFLAGS -mfloat-abi=soft" _unix=yes - _need_memalign=yes _backend="openpandora" _build_hq_scalers=yes _vkeybd=no @@ -1987,14 +1968,11 @@ if test -n "$_host"; then _port_mk="backends/platform/openpandora/op-bundle.mk" ;; ppc-amigaos) - # AmigaOS exec allocates memory always in an aligned way - _need_memalign=yes ;; ps2) # TODO: complete this DEFINES="$DEFINES -DDISABLE_TEXT_CONSOLE -DDISABLE_COMMAND_LINE -DDISABLE_DOSBOX_OPL" DEFINES="$DEFINES -DDISABLE_SID -DDISABLE_NES_APU" - _need_memalign=yes _backend="ps2" _build_scalers=no _mt32emu=no @@ -2021,7 +1999,6 @@ if test -n "$_host"; then fi ;; psp) - _need_memalign=yes _backend="psp" _build_scalers=no _mt32emu=no @@ -2032,14 +2009,12 @@ if test -n "$_host"; then ASFLAGS="$ASFLAGS -mfpu=vfp" HOSTEXEEXT=".so" _unix=yes - _need_memalign=yes _backend="samsungtv" _mt32emu=no _vkeybd=yes ;; webos) _unix=yes - _need_memalign=yes _backend="webos" _port_mk="backends/platform/webos/webos.mk" _build_scalers=no @@ -2050,7 +2025,6 @@ if test -n "$_host"; then _keymapper=yes ;; wii) - _need_memalign=yes _backend="wii" _build_scalers=no _port_mk="backends/platform/wii/wii.mk" @@ -2065,7 +2039,6 @@ if test -n "$_host"; then ;; wince) LDFLAGS="$LDFLAGS -Wl,--stack,65536" - _need_memalign=yes _tremolo=yes _backend="wince" _mt32emu=no @@ -2075,33 +2048,42 @@ if test -n "$_host"; then echo "WARNING: Unknown target, continuing with auto-detected values" ;; esac +fi -else - # - # Check whether memory alignment is required - # - echo_n "Alignment required... " - case $_host_cpu in - alpha*) - # Hardcode alignment requirements for Alpha processsors - _need_memalign=yes - ;; - arm*) - _need_memalign=yes - ;; - mips*) - # Hardcode alignment requirements for MIPS processsors. - # While these can emulate unaligned memory access, this - # emulation is rather slow. - _need_memalign=yes - ;; - sh*) - # Hardcode alignment requirements for SH processsors. - # While these can emulate unaligned memory access, this - # emulation is rather slow. - _need_memalign=yes - ;; - *) +# +# Check whether memory alignment is required +# +# For some CPU types, unaligned memory access is either not supported at +# all (and so leads to a crash), requires a super-slow emulation via an +# exception handler, or just results in incorrect results. +# On the other hand, accessing data in a manner that works regardless of +# alignment can be a lot slower than regular access, so we don't want +# to use it if we don't have to. +# +# So we do the following: First, for CPU families where we know whether +# unaligned access is safe & fast, we enable / disable unaligned access +# accordingly. +# Otherwise, for cross compiled builds we just disable memory alignment. +# For native builds, we run some test code that detects whether unaligned +# access is supported (and is supported without an exception handler). +# +# NOTE: The only kinds of unaligned access we allow are for 2 byte and +# 4 byte loads / stores. No promises are made for bigger sizes, such as +# 8 or 16 byte loads, for which various architectures (e.g. x86 and PowerPC) +# behave differently than for the smaller sizes). +echo_n "Alignment required... " +case $_host_cpu in + alpha* | arm* | bfin* | hp* | mips* | sh* | sparc* | ia64 | nv1*) + # Unaligned access is not supported or extremely slow. + _need_memalign=yes + ;; + i[3-6]86 | x86_64 | ppc*) + # Unaligned access should work reasonably well + _need_memalign=no + ;; + *) + if test -z "$_host"; then + # NOT in cross-compiling mode: # Try to auto-detect.... cat > $TMPC << EOF #include @@ -2117,13 +2099,14 @@ int main(int argc, char **argv) { return 0; } EOF - _need_memalign=yes cc_check_no_clean && $TMPO$HOSTEXEEXT && _need_memalign=no cc_check_clean - ;; - esac - echo "$_need_memalign" -fi + fi + ;; +esac +echo "$_need_memalign" + +define_in_config_h_if_yes $_need_memalign 'SCUMM_NEED_ALIGNMENT' # # Backend related stuff @@ -2292,9 +2275,6 @@ case $_endian in ;; esac - -define_in_config_h_if_yes $_need_memalign 'SCUMM_NEED_ALIGNMENT' - if test "$_unix" = yes ; then DEFINES="$DEFINES -DUNIX" add_line_to_config_mk 'UNIX = 1' -- cgit v1.2.3 From 9b14c50b774afe0d257534e261f412455d8ed93e Mon Sep 17 00:00:00 2001 From: Max Horn Date: Thu, 5 May 2011 14:02:18 +0200 Subject: BUILD: Unify how debug/release mode defaults are determined --- configure | 60 ++++++++++++++---------------------------------------------- 1 file changed, 14 insertions(+), 46 deletions(-) (limited to 'configure') diff --git a/configure b/configure index 4bbc829d99..833ee14413 100755 --- a/configure +++ b/configure @@ -990,15 +990,6 @@ caanoo) _host_os=gph-linux _host_cpu=arm _host_alias=arm-none-linux-gnueabi - if test "$_debug_build" = auto; then - # If you want to debug on the Caanoo use '--disable-release --enable-debug' - _debug_build=no - fi - - if test "$_release_build" = auto; then - # Enable release build by default. - _release_build=yes - fi ;; dingux) _host_os=linux @@ -1026,29 +1017,11 @@ gp2x) _host_os=gph-linux _host_cpu=arm _host_alias=arm-open2x-linux - if test "$_debug_build" = auto; then - # If you want to debug on the GP2X use '--disable-release --enable-debug' - _debug_build=no - fi - - if test "$_release_build" = auto; then - # Enable release build by default. - _release_build=yes - fi ;; gp2xwiz) _host_os=gph-linux _host_cpu=arm _host_alias=arm-open2x-linux - if test "$_debug_build" = auto; then - # If you want to debug on the GP2XWiz use '--disable-release --enable-debug' - _debug_build=no - fi - - if test "$_release_build" = auto; then - # Enable release build by default. - _release_build=yes - fi ;; i586-mingw32msvc) _host_os=mingw32msvc @@ -1086,15 +1059,6 @@ openpandora) _host_os=linux _host_cpu=arm _host_alias=arm-angstrom-linux-gnueabi - if test "$_debug_build" = auto; then - # If you want to debug on the OP use '--disable-release --enable-debug' - _debug_build=no - fi - - if test "$_release_build" = auto; then - # Enable release build by default. - _release_build=yes - fi ;; ppc-amigaos) _host_os=amigaos @@ -1104,16 +1068,6 @@ ps2) _host_os=ps2 _host_cpu=mips64r5900el _host_alias=ee - if test "$_debug_build" = auto; then - # Disable debug mode by default. The resulting binaries are far too big in general, - # and one has to disable multiple engines to make it usable. - _debug_build=no - fi - - if test "$_release_build" = auto; then - # Enable release build by default. - _release_build=yes - fi ;; psp) _host_os=psp @@ -1182,6 +1136,20 @@ fi # Determine extra build flags for debug and/or release builds # +case $_host in +caanoo | gp2x | gp2xwiz | openpandora | ps2) + if test "$_debug_build" = auto; then + # If you want to debug one of these platforms, use '--disable-release --enable-debug' + _debug_build=no + fi + + if test "$_release_build" = auto; then + # Enable release build by default. + _release_build=yes + fi + ;; +esac + if test "$_debug_build" != no; then # debug mode not explicitly disabled -> compile with -g CXXFLAGS="$CXXFLAGS -g" -- cgit v1.2.3 From d935c53cdf00a54d95714139046abc35bf5c2c6a Mon Sep 17 00:00:00 2001 From: Max Horn Date: Thu, 5 May 2011 14:14:21 +0200 Subject: BUILD: Rearrange some PSP stuff Cursory testing shows no regressions caused by this, but proper testing of this change is recommended. --- configure | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'configure') diff --git a/configure b/configure index 833ee14413..2bf6f99ba3 100755 --- a/configure +++ b/configure @@ -1073,13 +1073,6 @@ psp) _host_os=psp _host_cpu=mipsallegrexel _host_alias=psp - if test -z "$PSPDEV"; then - PSPDEV=`psp-config --pspdev-path` - fi - if test -d "$PSPDEV/psp/lib"; then - LDFLAGS="$LDFLAGS -L$PSPDEV/psp/lib" - fi - LDFLAGS="$LDFLAGS -L$PSPDEV/psp/sdk/lib -specs=$_srcdir/backends/platform/psp/psp.spec" ;; samsungtv) _host_os=linux @@ -1216,9 +1209,15 @@ ps2) fi ;; psp) - PSPSDK=`psp-config --pspsdk-path` + if test -z "$PSPDEV"; then + PSPDEV=`psp-config --pspdev-path` + fi + # TODO: Should we also insist on a valid PSPDEV value? if test -z "$PSPSDK"; then - echo "Please set the path to PSPSDK in your environment." + PSPSDK=`psp-config --pspsdk-path` + fi + if test -z "$PSPSDK"; then + echo "Please set PSPSDK in your environment. export PSPSDK=" exit 1 fi ;; @@ -1660,6 +1659,10 @@ case $_host_os in DEFINES="$DEFINES -D_EE -D__PLAYSTATION2__" ;; psp) + if test -d "$PSPDEV/psp/lib"; then + LDFLAGS="$LDFLAGS -L$PSPDEV/psp/lib" + fi + LDFLAGS="$LDFLAGS -L$PSPSDK/lib -specs=$_srcdir/backends/platform/psp/psp.spec" CXXFLAGS="$CXXFLAGS -O3 -I$PSPSDK/include -D_PSP_FW_VERSION=150" ;; solaris*) -- cgit v1.2.3 From 6639eacb3ae7189bd18e4267d0115caa0a05edb4 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Thu, 5 May 2011 14:21:17 +0200 Subject: BUILD: Move some Android 'hack' back to near end of configure --- configure | 45 +++++++++++++++++++++++++++------------------ 1 file changed, 27 insertions(+), 18 deletions(-) (limited to 'configure') diff --git a/configure b/configure index 2bf6f99ba3..828e990004 100755 --- a/configure +++ b/configure @@ -2093,24 +2093,6 @@ case $_backend in CXXFLAGS="$CXXFLAGS -Wa,--noexecstack" LDFLAGS="$LDFLAGS -Wl,-z,noexecstack" - static_libs='' - system_libs='' - for lib in $LIBS; do - case $lib in - -lz|-lm) - system_libs="$system_libs $lib" - ;; - *) - static_libs="$static_libs $lib" - ;; - esac - done - - # -lgcc is carefully placed here - we want to catch - # all toolchain symbols in *our* libraries rather - # than pick up anything unhygenic from the Android libs. - LIBS="-Wl,-Bstatic $static_libs" - LIBS="$LIBS -Wl,-Bdynamic -lgcc $system_libs -llog -lGLESv1_CM" DEFINES="$DEFINES -DREDUCE_MEMORY_USAGE" ;; dc) @@ -3152,6 +3134,33 @@ else echo fi +# +# Some last-minute backend specific stuff, executed +# after all of CXXFLAGS, LDFLAGS, LIBS etc. have been setup +# +case $_backend in + android) + static_libs='' + system_libs='' + for lib in $LIBS; do + case $lib in + -lz|-lm) + system_libs="$system_libs $lib" + ;; + *) + static_libs="$static_libs $lib" + ;; + esac + done + + # -lgcc is carefully placed here - we want to catch + # all toolchain symbols in *our* libraries rather + # than pick up anything unhygenic from the Android libs. + LIBS="-Wl,-Bstatic $static_libs -Wl,-Bdynamic -lgcc $system_libs -llog -lGLESv1_CM" + ;; +esac + + # # Engine selection # -- cgit v1.2.3 From 39076ef9722529d80feff94bdff25843beb4fc13 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Thu, 5 May 2011 15:38:54 +0200 Subject: BUILD: Rename UNIX #define to POSIX --- configure | 72 +++++++++++++++++++++++++++++++-------------------------------- 1 file changed, 36 insertions(+), 36 deletions(-) (limited to 'configure') diff --git a/configure b/configure index 828e990004..2fc8631f57 100755 --- a/configure +++ b/configure @@ -147,7 +147,7 @@ _build_scalers=yes _build_hq_scalers=yes _indeo3=auto _enable_prof=no -_unix=no +_posix=no _global_constructors=no _elf_loader=no # Default vkeybd/keymapper options @@ -1548,7 +1548,7 @@ case $_host_os in LDFLAGS="$LDFLAGS --sysroot=$ANDROID_NDK/platforms/android-4/arch-arm" LDFLAGS="$LDFLAGS -mthumb-interwork" add_line_to_config_mk "ANDROID_SDK = $ANDROID_SDK" - _unix=yes + _posix=yes _seq_midi=no ;; beos*) @@ -1558,11 +1558,11 @@ case $_host_os in CFLAGS="-I/boot/home/config/include" CXXFLAGS="$CXXFLAGS -fhuge-objects" LIBS="$LIBS -lbind -lsocket" - _unix=yes + _posix=yes _seq_midi=no ;; bsd* | hpux* | netbsd* | openbsd* | sunos*) - _unix=yes + _posix=yes ;; cygwin*) echo ERROR: Cygwin building is not supported by ScummVM anymore. Consider using MinGW. @@ -1572,7 +1572,7 @@ case $_host_os in DEFINES="$DEFINES -DMACOSX" LIBS="$LIBS -framework AudioUnit -framework AudioToolbox -framework Carbon -framework CoreMIDI" add_line_to_config_mk 'MACOSX = 1' - _unix=yes + _posix=yes ;; dreamcast) DEFINES="$DEFINES -D__DC__ -DNONSTANDARD_PORT" @@ -1598,7 +1598,7 @@ case $_host_os in freebsd*) LDFLAGS="$LDFLAGS -L/usr/local/lib" CXXFLAGS="$CXXFLAGS -I/usr/local/include" - _unix=yes + _posix=yes ;; gamecube) CXXFLAGS="$CXXFLAGS -Os -mogc -mcpu=750 -meabi -mhard-float" @@ -1616,14 +1616,14 @@ case $_host_os in DEFINES="$DEFINES -DSYSTEM_NOT_SUPPORTING_D_TYPE" # Needs -lnetwork for the timidity MIDI driver LIBS="$LIBS -lnetwork" - _unix=yes + _posix=yes _seq_midi=no ;; irix*) DEFINES="$DEFINES -DIRIX -DSYSTEM_NOT_SUPPORTING_D_TYPE" LIBS="$LIBS -lmd -lfastm -lm" _ranlib=: - _unix=yes + _posix=yes ;; linux* | uclinux*) # When not cross-compiling, enable large file support, but don't @@ -1631,7 +1631,7 @@ case $_host_os in if test -z "$_host"; then CXXFLAGS="$CXXFLAGS $(getconf LFS_CFLAGS 2>/dev/null)" fi - _unix=yes + _posix=yes DEFINES="$DEFINES -DLUA_USE_POSIX" ;; mingw*) @@ -1642,7 +1642,7 @@ case $_host_os in ;; mint*) DEFINES="$DEFINES -DSYSTEM_NOT_SUPPORTING_D_TYPE" - _unix=yes + _posix=yes ;; n64) DEFINES="$DEFINES -D__N64__ -DLIMIT_FPS -DNONSTANDARD_PORT" @@ -1651,7 +1651,7 @@ case $_host_os in DEFINES="$DEFINES -DREDUCE_MEMORY_USAGE" ;; os2-emx*) - _unix=yes # FIXME??? Why?? + _posix=yes # FIXME??? Why?? ;; ps2) # TODO ps2 @@ -1669,7 +1669,7 @@ case $_host_os in DEFINES="$DEFINES -DSOLARIS -DSYSTEM_NOT_SUPPORTING_D_TYPE" # Needs -lbind -lsocket for the timidity MIDI driver LIBS="$LIBS -lnsl -lsocket" - _unix=yes + _posix=yes ;; webos) CXXFLAGS="$CXXFLAGS -I$WEBOS_PDK/include -I$WEBOS_PDK/include/SDL -I$WEBOS_PDK/device/usr/include" @@ -1679,7 +1679,7 @@ case $_host_os in LDFLAGS="$LDFLAGS -Wl,--allow-shlib-undefined" LDFLAGS="$LDFLAGS --sysroot=$WEBOS_PDK/arm-gcc/sysroot" add_line_to_config_mk "WEBOS_SDK = $WEBOS_SDK" - _unix=yes + _posix=yes _seq_midi=no ;; wii) @@ -1699,10 +1699,10 @@ case $_host_os in DEFINES="$DEFINES -D__ARM__ -D_ARM_ -DUNICODE -DFPM_DEFAULT -DNONSTANDARD_PORT" DEFINES="$DEFINES -DWIN32 -Dcdecl= -D__cdecl__=" ;; - # given this is a shell script assume some type of unix + # given this is a shell script assume some type of posix *) echo "WARNING: could not establish system type, assuming unix like" - _unix=yes + _posix=yes ;; esac @@ -1711,7 +1711,7 @@ if test -n "$_host"; then echo "Cross-compiling to $_host" case "$_host" in android | android-v7a) - _unix=yes + _posix=yes # we link a .so as default LDFLAGS="$LDFLAGS -shared -Wl,-Bsymbolic,--no-undefined" HOSTEXEPRE=lib @@ -1724,11 +1724,11 @@ if test -n "$_host"; then _timidity=no ;; arm-linux|arm*-linux-gnueabi|arm-*-linux) - _unix=yes + _posix=yes ;; arm-riscos|linupy) DEFINES="$DEFINES -DLINUPY" - _unix=yes + _posix=yes ;; bfin*) ;; @@ -1744,7 +1744,7 @@ if test -n "$_host"; then fi CXXFLAGS="$CXXFLAGS -mcpu=arm926ej-s -mtune=arm926ej-s" ASFLAGS="$ASFLAGS" - _unix=yes + _posix=yes _backend="gph" _build_hq_scalers=no _vkeybd=yes @@ -1758,7 +1758,7 @@ if test -n "$_host"; then _strip=$_host-strip ;; dingux) - DEFINES="$DEFINES -DUNIX -DDINGUX -DDISABLE_DOSBOX_OPL -DREDUCE_MEMORY_USAGE" + DEFINES="$DEFINES -DDINGUX -DDISABLE_DOSBOX_OPL -DREDUCE_MEMORY_USAGE" ASFLAGS="$ASFLAGS" CXXFLAGS="$CXXFLAGS -msoft-float -mips32" _backend="dingux" @@ -1818,7 +1818,7 @@ if test -n "$_host"; then CXXFLAGS="$CXXFLAGS -march=armv4t" ASFLAGS="$ASFLAGS -mfloat-abi=soft" LDFLAGS="$LDFLAGS -static" - _unix=yes + _posix=yes _backend="gph" _build_hq_scalers=no _vkeybd=yes @@ -1836,7 +1836,7 @@ if test -n "$_host"; then fi CXXFLAGS="$CXXFLAGS -mcpu=arm926ej-s -mtune=arm926ej-s" ASFLAGS="$ASFLAGS -mfloat-abi=soft" - _unix=yes + _posix=yes _backend="gph" _build_hq_scalers=no _vkeybd=yes @@ -1847,14 +1847,14 @@ if test -n "$_host"; then ;; iphone) DEFINES="$DEFINES -DIPHONE" - _unix=yes + _posix=yes _backend="iphone" _build_hq_scalers=no _seq_midi=no ;; m68k-atari-mint) DEFINES="$DEFINES -DSYSTEM_NOT_SUPPORTING_D_TYPE" - _unix=yes + _posix=yes _ranlib=m68k-atari-mint-ranlib _ar="m68k-atari-mint-ar cru" _seq_midi=no @@ -1872,7 +1872,7 @@ if test -n "$_host"; then motoezx) DEFINES="$DEFINES -DMOTOEZX" ASFLAGS="$ASFLAGS -mfpu=vfp" - _unix=yes + _posix=yes _backend="linuxmoto" _build_hq_scalers=no _mt32emu=no @@ -1883,7 +1883,7 @@ if test -n "$_host"; then motomagx) DEFINES="$DEFINES -DMOTOMAGX" ASFLAGS="$ASFLAGS -mfpu=vfp" - _unix=yes + _posix=yes _backend="linuxmoto" _build_hq_scalers=no _mt32emu=no @@ -1915,7 +1915,7 @@ if test -n "$_host"; then ;; neuros) DEFINES="$DEFINES -DNEUROS" - _unix=yes + _posix=yes _backend='null' _build_hq_scalers=no _mt32emu=no @@ -1930,7 +1930,7 @@ if test -n "$_host"; then fi CXXFLAGS="$CXXFLAGS -march=armv7-a -mtune=cortex-a8 -mfpu=neon" ASFLAGS="$ASFLAGS -mfloat-abi=soft" - _unix=yes + _posix=yes _backend="openpandora" _build_hq_scalers=yes _vkeybd=no @@ -1979,13 +1979,13 @@ if test -n "$_host"; then DEFINES="$DEFINES -DSAMSUNGTV -DDISABLE_COMMAND_LINE" ASFLAGS="$ASFLAGS -mfpu=vfp" HOSTEXEEXT=".so" - _unix=yes + _posix=yes _backend="samsungtv" _mt32emu=no _vkeybd=yes ;; webos) - _unix=yes + _posix=yes _backend="webos" _port_mk="backends/platform/webos/webos.mk" _build_scalers=no @@ -2228,9 +2228,9 @@ case $_endian in ;; esac -if test "$_unix" = yes ; then - DEFINES="$DEFINES -DUNIX" - add_line_to_config_mk 'UNIX = 1' +if test "$_posix" = yes ; then + DEFINES="$DEFINES -DPOSIX" + add_line_to_config_mk 'POSIX = 1' fi # @@ -2697,9 +2697,9 @@ fi echocheck "SEQ MIDI" if test "$_seq_midi" = auto ; then # TODO: Test for /dev/sequencer presence? Or maybe just for /dev ? - # For now, we just always enable it when "unix" mode is on (backends + # For now, we just always enable it when "posix" mode is on (backends # that do not want it can disable it by setting _seq_midi=no). - _seq_midi="$_unix" + _seq_midi="$_posix" fi define_in_config_h_if_yes "$_seq_midi" 'USE_SEQ_MIDI' echo "$_seq_midi" @@ -2712,7 +2712,7 @@ if test "$_timidity" = auto ; then # TODO: Is there a good possibility of auto detecting whether we # should include TiMidity support? It can only be used on Unix # currently so we use that as "detection" for now. - _timidity="$_unix" + _timidity="$_posix" fi define_in_config_h_if_yes "$_timidity" 'USE_TIMIDITY' echo "$_timidity" -- cgit v1.2.3 From 38ff07589c8e6c3ecd2b2fcfbc8e1bc1b495eb78 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Thu, 5 May 2011 16:14:28 +0200 Subject: BUILD: Unify how _posix is computed However, the current approach of determining _posix based on _host_os is flawed and should be replaced by feature detection; added a TODO about this. --- configure | 60 +++++++++++++++++++++++++++--------------------------------- 1 file changed, 27 insertions(+), 33 deletions(-) (limited to 'configure') diff --git a/configure b/configure index 2fc8631f57..69fffc7eea 100755 --- a/configure +++ b/configure @@ -1548,7 +1548,6 @@ case $_host_os in LDFLAGS="$LDFLAGS --sysroot=$ANDROID_NDK/platforms/android-4/arch-arm" LDFLAGS="$LDFLAGS -mthumb-interwork" add_line_to_config_mk "ANDROID_SDK = $ANDROID_SDK" - _posix=yes _seq_midi=no ;; beos*) @@ -1558,12 +1557,8 @@ case $_host_os in CFLAGS="-I/boot/home/config/include" CXXFLAGS="$CXXFLAGS -fhuge-objects" LIBS="$LIBS -lbind -lsocket" - _posix=yes _seq_midi=no ;; - bsd* | hpux* | netbsd* | openbsd* | sunos*) - _posix=yes - ;; cygwin*) echo ERROR: Cygwin building is not supported by ScummVM anymore. Consider using MinGW. exit 1 @@ -1572,7 +1567,6 @@ case $_host_os in DEFINES="$DEFINES -DMACOSX" LIBS="$LIBS -framework AudioUnit -framework AudioToolbox -framework Carbon -framework CoreMIDI" add_line_to_config_mk 'MACOSX = 1' - _posix=yes ;; dreamcast) DEFINES="$DEFINES -D__DC__ -DNONSTANDARD_PORT" @@ -1598,7 +1592,6 @@ case $_host_os in freebsd*) LDFLAGS="$LDFLAGS -L/usr/local/lib" CXXFLAGS="$CXXFLAGS -I/usr/local/include" - _posix=yes ;; gamecube) CXXFLAGS="$CXXFLAGS -Os -mogc -mcpu=750 -meabi -mhard-float" @@ -1616,14 +1609,12 @@ case $_host_os in DEFINES="$DEFINES -DSYSTEM_NOT_SUPPORTING_D_TYPE" # Needs -lnetwork for the timidity MIDI driver LIBS="$LIBS -lnetwork" - _posix=yes _seq_midi=no ;; irix*) DEFINES="$DEFINES -DIRIX -DSYSTEM_NOT_SUPPORTING_D_TYPE" LIBS="$LIBS -lmd -lfastm -lm" _ranlib=: - _posix=yes ;; linux* | uclinux*) # When not cross-compiling, enable large file support, but don't @@ -1631,7 +1622,6 @@ case $_host_os in if test -z "$_host"; then CXXFLAGS="$CXXFLAGS $(getconf LFS_CFLAGS 2>/dev/null)" fi - _posix=yes DEFINES="$DEFINES -DLUA_USE_POSIX" ;; mingw*) @@ -1642,7 +1632,6 @@ case $_host_os in ;; mint*) DEFINES="$DEFINES -DSYSTEM_NOT_SUPPORTING_D_TYPE" - _posix=yes ;; n64) DEFINES="$DEFINES -D__N64__ -DLIMIT_FPS -DNONSTANDARD_PORT" @@ -1650,9 +1639,6 @@ case $_host_os in DEFINES="$DEFINES -DDISABLE_FANCY_THEMES -DDISABLE_DOSBOX_OPL -DDISABLE_SID -DDISABLE_NES_APU" DEFINES="$DEFINES -DREDUCE_MEMORY_USAGE" ;; - os2-emx*) - _posix=yes # FIXME??? Why?? - ;; ps2) # TODO ps2 CXXFLAGS="$CXXFLAGS -G2" @@ -1669,7 +1655,6 @@ case $_host_os in DEFINES="$DEFINES -DSOLARIS -DSYSTEM_NOT_SUPPORTING_D_TYPE" # Needs -lbind -lsocket for the timidity MIDI driver LIBS="$LIBS -lnsl -lsocket" - _posix=yes ;; webos) CXXFLAGS="$CXXFLAGS -I$WEBOS_PDK/include -I$WEBOS_PDK/include/SDL -I$WEBOS_PDK/device/usr/include" @@ -1679,7 +1664,6 @@ case $_host_os in LDFLAGS="$LDFLAGS -Wl,--allow-shlib-undefined" LDFLAGS="$LDFLAGS --sysroot=$WEBOS_PDK/arm-gcc/sysroot" add_line_to_config_mk "WEBOS_SDK = $WEBOS_SDK" - _posix=yes _seq_midi=no ;; wii) @@ -1699,19 +1683,42 @@ case $_host_os in DEFINES="$DEFINES -D__ARM__ -D_ARM_ -DUNICODE -DFPM_DEFAULT -DNONSTANDARD_PORT" DEFINES="$DEFINES -DWIN32 -Dcdecl= -D__cdecl__=" ;; - # given this is a shell script assume some type of posix - *) - echo "WARNING: could not establish system type, assuming unix like" +esac + +# +# Determine whether host is POSIX compliant, or at least POSIX +# compatible enough to support our POSIX code (including dlsym(), +# mkdir() and some other APIs). +# +# TODO: Instead of basing this on the host name, we should really base +# this on the presence of features (such as the dlsym and mkdir APIs). +# +echo_n "Checking if host is POSIX compliant... " +case $_host_os in + amigaos* | cygwin* | dreamcast | ds | gamecube | mingw* | n64 | ps2 | psp | wii | wince) + ;; + android | beos* | bsd* | darwin* | freebsd* | gph-linux | haiku* | hpux* | iphone | irix* | linux* | mint* | netbsd* | openbsd* | solaris* | sunos* | uclinux* | webos) _posix=yes ;; + os2-emx*) + _posix=yes # FIXME: Really??? + ;; + *) + # given this is a shell script, we might assume some type of posix. + # However, the host system might be a totally different one, so + # we can assume nothing about it. + # Indeed, as mentioned further above, we really should test for the + # presences of relevant APIs on the host anyway... + _posix=no + ;; esac +echo $_posix if test -n "$_host"; then # Cross-compiling mode - add your target here if needed echo "Cross-compiling to $_host" case "$_host" in android | android-v7a) - _posix=yes # we link a .so as default LDFLAGS="$LDFLAGS -shared -Wl,-Bsymbolic,--no-undefined" HOSTEXEPRE=lib @@ -1724,11 +1731,9 @@ if test -n "$_host"; then _timidity=no ;; arm-linux|arm*-linux-gnueabi|arm-*-linux) - _posix=yes ;; arm-riscos|linupy) DEFINES="$DEFINES -DLINUPY" - _posix=yes ;; bfin*) ;; @@ -1744,7 +1749,6 @@ if test -n "$_host"; then fi CXXFLAGS="$CXXFLAGS -mcpu=arm926ej-s -mtune=arm926ej-s" ASFLAGS="$ASFLAGS" - _posix=yes _backend="gph" _build_hq_scalers=no _vkeybd=yes @@ -1818,7 +1822,6 @@ if test -n "$_host"; then CXXFLAGS="$CXXFLAGS -march=armv4t" ASFLAGS="$ASFLAGS -mfloat-abi=soft" LDFLAGS="$LDFLAGS -static" - _posix=yes _backend="gph" _build_hq_scalers=no _vkeybd=yes @@ -1836,7 +1839,6 @@ if test -n "$_host"; then fi CXXFLAGS="$CXXFLAGS -mcpu=arm926ej-s -mtune=arm926ej-s" ASFLAGS="$ASFLAGS -mfloat-abi=soft" - _posix=yes _backend="gph" _build_hq_scalers=no _vkeybd=yes @@ -1847,14 +1849,12 @@ if test -n "$_host"; then ;; iphone) DEFINES="$DEFINES -DIPHONE" - _posix=yes _backend="iphone" _build_hq_scalers=no _seq_midi=no ;; m68k-atari-mint) DEFINES="$DEFINES -DSYSTEM_NOT_SUPPORTING_D_TYPE" - _posix=yes _ranlib=m68k-atari-mint-ranlib _ar="m68k-atari-mint-ar cru" _seq_midi=no @@ -1872,7 +1872,6 @@ if test -n "$_host"; then motoezx) DEFINES="$DEFINES -DMOTOEZX" ASFLAGS="$ASFLAGS -mfpu=vfp" - _posix=yes _backend="linuxmoto" _build_hq_scalers=no _mt32emu=no @@ -1883,7 +1882,6 @@ if test -n "$_host"; then motomagx) DEFINES="$DEFINES -DMOTOMAGX" ASFLAGS="$ASFLAGS -mfpu=vfp" - _posix=yes _backend="linuxmoto" _build_hq_scalers=no _mt32emu=no @@ -1915,7 +1913,6 @@ if test -n "$_host"; then ;; neuros) DEFINES="$DEFINES -DNEUROS" - _posix=yes _backend='null' _build_hq_scalers=no _mt32emu=no @@ -1930,7 +1927,6 @@ if test -n "$_host"; then fi CXXFLAGS="$CXXFLAGS -march=armv7-a -mtune=cortex-a8 -mfpu=neon" ASFLAGS="$ASFLAGS -mfloat-abi=soft" - _posix=yes _backend="openpandora" _build_hq_scalers=yes _vkeybd=no @@ -1979,13 +1975,11 @@ if test -n "$_host"; then DEFINES="$DEFINES -DSAMSUNGTV -DDISABLE_COMMAND_LINE" ASFLAGS="$ASFLAGS -mfpu=vfp" HOSTEXEEXT=".so" - _posix=yes _backend="samsungtv" _mt32emu=no _vkeybd=yes ;; webos) - _posix=yes _backend="webos" _port_mk="backends/platform/webos/webos.mk" _build_scalers=no -- cgit v1.2.3 From 8387b68c5758819789a0f555abadb089a7c500b1 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Thu, 5 May 2011 16:26:05 +0200 Subject: BUILD: Add only one -D to DEFINES per line; add FIXMEs to -D in CXXFLAGS --- configure | 109 ++++++++++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 78 insertions(+), 31 deletions(-) (limited to 'configure') diff --git a/configure b/configure index 69fffc7eea..a2542dac93 100755 --- a/configure +++ b/configure @@ -1153,7 +1153,9 @@ if test "$_release_build" = yes; then # makes it possible to use -Wuninitialized, so let's do that. # We will also add a define, which indicates we are doing # an build for a release version. - CXXFLAGS="$CXXFLAGS -O2 -Wuninitialized -DRELEASE_BUILD" + CXXFLAGS="$CXXFLAGS -O2 -Wuninitialized" + # FIXME: Why is the following in CXXFLAGS and not in DEFINES? Change or document this. + CXXFLAGS="$CXXFLAGS -DRELEASE_BUILD" fi @@ -1541,6 +1543,7 @@ case $_host_os in fi CXXFLAGS="$CXXFLAGS -finline-limit=300" CXXFLAGS="$CXXFLAGS -Os -mthumb-interwork" + # FIXME: Why is the following in CXXFLAGS and not in DEFINES? Change or document this. CXXFLAGS="$CXXFLAGS -D__ARM_ARCH_5__ -D__ARM_ARCH_5T__" CXXFLAGS="$CXXFLAGS -D__ARM_ARCH_5E__ -D__ARM_ARCH_5TE__" # supress 'mangling of 'va_list' has changed in GCC 4.4' @@ -1569,11 +1572,16 @@ case $_host_os in add_line_to_config_mk 'MACOSX = 1' ;; dreamcast) - DEFINES="$DEFINES -D__DC__ -DNONSTANDARD_PORT" + DEFINES="$DEFINES -D__DC__" + DEFINES="$DEFINES -DNONSTANDARD_PORT" ;; ds) # TODO Nintendo DS - DEFINES="$DEFINES -D__DS__ -DNDS -DARM9 -DARM -DNONSTANDARD_PORT" + DEFINES="$DEFINES -D__DS__" + DEFINES="$DEFINES -DNDS" + DEFINES="$DEFINES -DARM9" + DEFINES="$DEFINES -DARM" + DEFINES="$DEFINES -DNONSTANDARD_PORT" CXXFLAGS="$CXXFLAGS -isystem $DEVKITPRO/libnds/include -isystem $DEVKITPRO/devkitARM/arm-eabi/include" CXXFLAGS="$CXXFLAGS -mcpu=arm9tdmi -mtune=arm9tdmi -fomit-frame-pointer -mthumb-interwork" CXXFLAGS="$CXXFLAGS -ffunction-sections -fdata-sections -fno-strict-aliasing" @@ -1612,7 +1620,8 @@ case $_host_os in _seq_midi=no ;; irix*) - DEFINES="$DEFINES -DIRIX -DSYSTEM_NOT_SUPPORTING_D_TYPE" + DEFINES="$DEFINES -DIRIX" + DEFINES="$DEFINES -DSYSTEM_NOT_SUPPORTING_D_TYPE" LIBS="$LIBS -lmd -lfastm -lm" _ranlib=: ;; @@ -1625,7 +1634,8 @@ case $_host_os in DEFINES="$DEFINES -DLUA_USE_POSIX" ;; mingw*) - DEFINES="$DEFINES -DWIN32 -D__USE_MINGW_ANSI_STDIO=0" + DEFINES="$DEFINES -DWIN32" + DEFINES="$DEFINES -D__USE_MINGW_ANSI_STDIO=0" LIBS="$LIBS -lmingw32 -lwinmm" OBJS="$OBJS scummvmwinres.o" add_line_to_config_mk 'WIN32 = 1' @@ -1634,25 +1644,35 @@ case $_host_os in DEFINES="$DEFINES -DSYSTEM_NOT_SUPPORTING_D_TYPE" ;; n64) - DEFINES="$DEFINES -D__N64__ -DLIMIT_FPS -DNONSTANDARD_PORT" - DEFINES="$DEFINES -DDISABLE_DEFAULT_SAVEFILEMANAGER -DDISABLE_COMMAND_LINE" - DEFINES="$DEFINES -DDISABLE_FANCY_THEMES -DDISABLE_DOSBOX_OPL -DDISABLE_SID -DDISABLE_NES_APU" + DEFINES="$DEFINES -D__N64__" + DEFINES="$DEFINES -DLIMIT_FPS" + DEFINES="$DEFINES -DNONSTANDARD_PORT" + DEFINES="$DEFINES -DDISABLE_COMMAND_LINE" + DEFINES="$DEFINES -DDISABLE_DEFAULT_SAVEFILEMANAGER" + DEFINES="$DEFINES -DDISABLE_DOSBOX_OPL" + DEFINES="$DEFINES -DDISABLE_FANCY_THEMES" + DEFINES="$DEFINES -DDISABLE_NES_APU" + DEFINES="$DEFINES -DDISABLE_SID" DEFINES="$DEFINES -DREDUCE_MEMORY_USAGE" ;; ps2) # TODO ps2 CXXFLAGS="$CXXFLAGS -G2" - DEFINES="$DEFINES -D_EE -D__PLAYSTATION2__" + DEFINES="$DEFINES -D_EE" + DEFINES="$DEFINES -D__PLAYSTATION2__" ;; psp) if test -d "$PSPDEV/psp/lib"; then LDFLAGS="$LDFLAGS -L$PSPDEV/psp/lib" fi LDFLAGS="$LDFLAGS -L$PSPSDK/lib -specs=$_srcdir/backends/platform/psp/psp.spec" - CXXFLAGS="$CXXFLAGS -O3 -I$PSPSDK/include -D_PSP_FW_VERSION=150" + CXXFLAGS="$CXXFLAGS -O3 -I$PSPSDK/include" + # FIXME: Why is the following in CXXFLAGS and not in DEFINES? Change or document this. + CXXFLAGS="$CXXFLAGS -D_PSP_FW_VERSION=150" ;; solaris*) - DEFINES="$DEFINES -DSOLARIS -DSYSTEM_NOT_SUPPORTING_D_TYPE" + DEFINES="$DEFINES -DSOLARIS" + DEFINES="$DEFINES -DSYSTEM_NOT_SUPPORTING_D_TYPE" # Needs -lbind -lsocket for the timidity MIDI driver LIBS="$LIBS -lnsl -lsocket" ;; @@ -1679,9 +1699,16 @@ case $_host_os in fi ;; wince) - CXXFLAGS="$CXXFLAGS -O3 -fno-inline-functions -march=armv4 -mtune=xscale -D_WIN32_WCE=300 " - DEFINES="$DEFINES -D__ARM__ -D_ARM_ -DUNICODE -DFPM_DEFAULT -DNONSTANDARD_PORT" - DEFINES="$DEFINES -DWIN32 -Dcdecl= -D__cdecl__=" + CXXFLAGS="$CXXFLAGS -O3 -fno-inline-functions -march=armv4 -mtune=xscale" + DEFINES="$DEFINES -D_WIN32_WCE=300" + DEFINES="$DEFINES -D__ARM__" + DEFINES="$DEFINES -D_ARM_" + DEFINES="$DEFINES -DUNICODE" + DEFINES="$DEFINES -DFPM_DEFAULT" + DEFINES="$DEFINES -DNONSTANDARD_PORT" + DEFINES="$DEFINES -DWIN32" + DEFINES="$DEFINES -Dcdecl=" + DEFINES="$DEFINES -D__cdecl__=" ;; esac @@ -1740,7 +1767,8 @@ if test -n "$_host"; then caanoo) # This uses the GPH backend. DEFINES="$DEFINES -DGPH_DEVICE" - DEFINES="$DEFINES -DCAANOO -DREDUCE_MEMORY_USAGE" + DEFINES="$DEFINES -DCAANOO" + DEFINES="$DEFINES -DREDUCE_MEMORY_USAGE" if test "$_debug_build" = yes; then DEFINES="$DEFINES -DGPH_DEBUG" else @@ -1762,7 +1790,9 @@ if test -n "$_host"; then _strip=$_host-strip ;; dingux) - DEFINES="$DEFINES -DDINGUX -DDISABLE_DOSBOX_OPL -DREDUCE_MEMORY_USAGE" + DEFINES="$DEFINES -DDINGUX" + DEFINES="$DEFINES -DDISABLE_DOSBOX_OPL" + DEFINES="$DEFINES -DREDUCE_MEMORY_USAGE" ASFLAGS="$ASFLAGS" CXXFLAGS="$CXXFLAGS -msoft-float -mips32" _backend="dingux" @@ -1777,7 +1807,9 @@ if test -n "$_host"; then _port_mk="backends/platform/dingux/dingux.mk" ;; dreamcast) - DEFINES="$DEFINES -DDISABLE_DEFAULT_SAVEFILEMANAGER -DDISABLE_TEXT_CONSOLE -DDISABLE_COMMAND_LINE" + DEFINES="$DEFINES -DDISABLE_DEFAULT_SAVEFILEMANAGER" + DEFINES="$DEFINES -DDISABLE_TEXT_CONSOLE" + DEFINES="$DEFINES -DDISABLE_COMMAND_LINE" CXXFLAGS="$CXXFLAGS -O3 -funroll-loops -fschedule-insns2 -fomit-frame-pointer -fdelete-null-pointer-checks" _backend="dc" _build_scalers=no @@ -1788,11 +1820,14 @@ if test -n "$_host"; then ;; ds) # TODO: complete this - DEFINES="$DEFINES -DDISABLE_FANCY_THEMES -DVECTOR_RENDERER_FORMAT=1555" - DEFINES="$DEFINES -DDISABLE_DEFAULT_SAVEFILEMANAGER" - DEFINES="$DEFINES -DREDUCE_MEMORY_USAGE -DSTREAM_AUDIO_FROM_DISK" - DEFINES="$DEFINES -DDISABLE_DOSBOX_OPL -DDISABLE_SID -DDISABLE_NES_APU" DEFINES="$DEFINES -DDISABLE_COMMAND_LINE" + DEFINES="$DEFINES -DDISABLE_DEFAULT_SAVEFILEMANAGER" + DEFINES="$DEFINES -DDISABLE_DOSBOX_OPL" + DEFINES="$DEFINES -DDISABLE_FANCY_THEMES" + DEFINES="$DEFINES -DDISABLE_SID -DDISABLE_NES_APU" + DEFINES="$DEFINES -DREDUCE_MEMORY_USAGE" + DEFINES="$DEFINES -DSTREAM_AUDIO_FROM_DISK" + DEFINES="$DEFINES -DVECTOR_RENDERER_FORMAT=1555" add_line_to_config_h '#define DISABLE_TEXT_CONSOLE' _backend="ds" _build_scalers=no @@ -1815,7 +1850,8 @@ if test -n "$_host"; then gp2x) # This uses the GPH backend. DEFINES="$DEFINES -DGPH_DEVICE" - DEFINES="$DEFINES -DGP2X -DREDUCE_MEMORY_USAGE" + DEFINES="$DEFINES -DGP2X" + DEFINES="$DEFINES -DREDUCE_MEMORY_USAGE" if test "$_debug_build" = yes; then DEFINES="$DEFINES -DGPH_DEBUG" fi @@ -1833,7 +1869,8 @@ if test -n "$_host"; then gp2xwiz) # This uses the GPH backend. DEFINES="$DEFINES -DGPH_DEVICE" - DEFINES="$DEFINES -DGP2XWIZ -DREDUCE_MEMORY_USAGE" + DEFINES="$DEFINES -DGP2XWIZ" + DEFINES="$DEFINES -DREDUCE_MEMORY_USAGE" if test "$_debug_build" = yes; then DEFINES="$DEFINES -DGPH_DEBUG" fi @@ -1918,7 +1955,8 @@ if test -n "$_host"; then _mt32emu=no ;; openpandora) - DEFINES="$DEFINES -DOPENPANDORA -DREDUCE_MEMORY_USAGE" + DEFINES="$DEFINES -DOPENPANDORA" + DEFINES="$DEFINES -DREDUCE_MEMORY_USAGE" if test "$_release_build" = no; then DEFINES="$DEFINES -DOP_DEBUG" else @@ -1938,8 +1976,11 @@ if test -n "$_host"; then ;; ps2) # TODO: complete this - DEFINES="$DEFINES -DDISABLE_TEXT_CONSOLE -DDISABLE_COMMAND_LINE -DDISABLE_DOSBOX_OPL" - DEFINES="$DEFINES -DDISABLE_SID -DDISABLE_NES_APU" + DEFINES="$DEFINES -DDISABLE_TEXT_CONSOLE" + DEFINES="$DEFINES -DDISABLE_COMMAND_LINE" + DEFINES="$DEFINES -DDISABLE_DOSBOX_OPL" + DEFINES="$DEFINES -DDISABLE_SID" + DEFINES="$DEFINES -DDISABLE_NES_APU" _backend="ps2" _build_scalers=no _mt32emu=no @@ -1972,7 +2013,8 @@ if test -n "$_host"; then _port_mk="backends/platform/psp/psp.mk" ;; samsungtv) - DEFINES="$DEFINES -DSAMSUNGTV -DDISABLE_COMMAND_LINE" + DEFINES="$DEFINES -DSAMSUNGTV" + DEFINES="$DEFINES -DDISABLE_COMMAND_LINE" ASFLAGS="$ASFLAGS -mfpu=vfp" HOSTEXEEXT=".so" _backend="samsungtv" @@ -2128,7 +2170,8 @@ case $_backend in ;; ps2) # TODO ps2 - DEFINES="$DEFINES -D_EE -DFORCE_RTL" + DEFINES="$DEFINES -D_EE" + DEFINES="$DEFINES -DFORCE_RTL" INCLUDES="$INCLUDES -I$PS2SDK/ee/include -I$PS2SDK/common/include -I$PS2SDK/ports/include" if test "$_dynamic_modules" = no ; then LDFLAGS="$LDFLAGS -mno-crt0 $PS2SDK/ee/startup/crt0.o -T $PS2SDK/ee/startup/linkfile" @@ -2137,7 +2180,9 @@ case $_backend in LIBS="$LIBS -lmc -lpad -lmouse -lhdd -lpoweroff -lsjpcm -lm -lc -lfileXio -lkernel -lstdc++ " ;; psp) - DEFINES="$DEFINES -D__PSP__ -DDISABLE_COMMAND_LINE -DDISABLE_DOSBOX_OPL" + DEFINES="$DEFINES -D__PSP__" + DEFINES="$DEFINES -DDISABLE_COMMAND_LINE" + DEFINES="$DEFINES -DDISABLE_DOSBOX_OPL" LIBS="$LIBS -lpng -Wl,-Map,mapfile.txt" ;; samsungtv) @@ -2147,11 +2192,13 @@ case $_backend in webos) # There is no sdl-config in the WebOS PDK so we don't use find_sdlconfig here. LIBS="$LIBS -lSDL" - DEFINES="$DEFINES -DSDL_BACKEND -DWEBOS" + DEFINES="$DEFINES -DSDL_BACKEND" + DEFINES="$DEFINES -DWEBOS" MODULES="$MODULES backends/platform/sdl" ;; wii) - DEFINES="$DEFINES -D__WII__ -DGEKKO" + DEFINES="$DEFINES -D__WII__" + DEFINES="$DEFINES -DGEKKO" case $_host_os in gamecube) LIBS="$LIBS -lgxflux -liso9660 -lfat -logc -ldb" -- cgit v1.2.3 From 717a7accf5f4c58e4b4b9187ee349841163c3896 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Thu, 5 May 2011 16:34:17 +0200 Subject: BUILD: Always enable indeo3 codec --- configure | 23 ----------------------- 1 file changed, 23 deletions(-) (limited to 'configure') diff --git a/configure b/configure index a2542dac93..a86bff7734 100755 --- a/configure +++ b/configure @@ -145,7 +145,6 @@ _text_console=no _mt32emu=yes _build_scalers=yes _build_hq_scalers=yes -_indeo3=auto _enable_prof=no _posix=no _global_constructors=no @@ -746,8 +745,6 @@ Optional Libraries: --with-opengl-prefix=DIR Prefix where OpenGL (ES) is installed (optional) --disable-opengl disable OpenGL (ES) support [autodetect] - --disable-indeo3 disable Indeo3 decoder [autodetect] - --with-png-prefix=DIR Prefix where libpng is installed (optional) --disable-png disable PNG decoder [autodetect] @@ -806,8 +803,6 @@ for ac_option in $@; do --enable-nasm) _nasm=yes ;; --disable-nasm) _nasm=no ;; --enable-mpeg2) _mpeg2=yes ;; - --disable-indeo3) _indeo3=no ;; - --enable-indeo3) _indeo3=yes ;; --disable-png) _png=no ;; --enable-png) _png=yes ;; --disable-theoradec) _theoradec=no ;; @@ -1935,7 +1930,6 @@ if test -n "$_host"; then _backend="n64" _mt32emu=no _build_scalers=no - _indeo3=no _translation=no _keymapper=no _text_console=no @@ -2537,19 +2531,6 @@ define_in_config_if_yes "$_build_scalers" 'USE_SCALERS' define_in_config_if_yes "$_build_hq_scalers" 'USE_HQ_SCALERS' -# -# Check whether to compile the Indeo3 decoder -# -if test "$_indeo3" = auto ; then - # Autodetect. Build if either the gob engine or plugins are enabled - if test `get_engine_build gob` = yes || test "$_dynamic_modules" = yes ; then - _indeo3=yes - else - _indeo3=no - fi -fi -define_in_config_if_yes "$_indeo3" 'USE_INDEO3' - # # Check for math lib # @@ -3157,10 +3138,6 @@ if test "$_mt32emu" = yes ; then echo_n ", MT-32 emu" fi -if test "$_indeo3" = yes ; then - echo_n ", Indeo3 decoder" -fi - if test "$_text_console" = yes ; then echo_n ", text console" fi -- cgit v1.2.3 From 4b7f6dfa3c8ca3ee614810007728e49ba2fd9e6e Mon Sep 17 00:00:00 2001 From: Max Horn Date: Thu, 5 May 2011 17:32:31 +0200 Subject: BUILD: Rename USE_TEXT_CONSOLE -> USE_TEXT_CONSOLE_FOR_DEBUGGER This reduces the similarity in name to the otherwise mostly unrelated DISABLE_TEXT_CONSOLE #define. --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'configure') diff --git a/configure b/configure index a86bff7734..6697fcc5d1 100755 --- a/configure +++ b/configure @@ -2869,7 +2869,7 @@ if test "$_readline" = yes ; then fi define_in_config_h_if_yes "$_readline" 'USE_READLINE' -define_in_config_h_if_yes "$_text_console" 'USE_TEXT_CONSOLE' +define_in_config_h_if_yes "$_text_console" 'USE_TEXT_CONSOLE_FOR_DEBUGGER' # # Check for OpenGL (ES) -- cgit v1.2.3 From d2e778bf0b4692e957c74a7749a75d6fd5ed214d Mon Sep 17 00:00:00 2001 From: Max Horn Date: Fri, 6 May 2011 13:14:44 +0200 Subject: BUILD: Replace _need_memalign runtime test by hardcoded list According to a discussion on -devel, this test cannot work reliably in general: It cannot determine when unaligned access really works reliably in all situations, nor on all implementations of the target CPU arch; nor does it determine whether unaligned access is supported effectively (as opposed to say supported via super-slow fault handler mechanism). --- configure | 56 +++++++++++++++++++++----------------------------------- 1 file changed, 21 insertions(+), 35 deletions(-) (limited to 'configure') diff --git a/configure b/configure index 6697fcc5d1..d230d588df 100755 --- a/configure +++ b/configure @@ -2061,48 +2061,34 @@ fi # alignment can be a lot slower than regular access, so we don't want # to use it if we don't have to. # -# So we do the following: First, for CPU families where we know whether -# unaligned access is safe & fast, we enable / disable unaligned access -# accordingly. -# Otherwise, for cross compiled builds we just disable memory alignment. -# For native builds, we run some test code that detects whether unaligned -# access is supported (and is supported without an exception handler). -# -# NOTE: The only kinds of unaligned access we allow are for 2 byte and -# 4 byte loads / stores. No promises are made for bigger sizes, such as -# 8 or 16 byte loads, for which various architectures (e.g. x86 and PowerPC) -# behave differently than for the smaller sizes). +# So we do the following: For CPU families where we know whether unaligned +# access is safe & fast, we enable / disable unaligned access accordingly. +# Otherwise, we just disable memory alignment. +# +# NOTE: In the past, for non-cross compiled builds, we would also run some code +# which would try to test whether unaligned access worked or not. But this test +# could not reliably determine whether unaligned access really worked in all +# situations (and across different implementations of the target CPU arch), nor +# whether it was fast (as opposed to slowly emulated by fault handlers). Hence, +# we do not use this approach anymore. +# +# NOTE: The only kinds of unaligned access we allow are for 2 byte and 4 +# byte loads / stores. No promises are made for bigger sizes, such as 8 +# or 16 byte loads, for which architectures may behave differently than +# for the smaller sizes. echo_n "Alignment required... " case $_host_cpu in + i[3-6]86 | x86_64 | ppc*) + # Unaligned access should work + _need_memalign=no + ;; alpha* | arm* | bfin* | hp* | mips* | sh* | sparc* | ia64 | nv1*) # Unaligned access is not supported or extremely slow. _need_memalign=yes ;; - i[3-6]86 | x86_64 | ppc*) - # Unaligned access should work reasonably well - _need_memalign=no - ;; *) - if test -z "$_host"; then - # NOT in cross-compiling mode: - # Try to auto-detect.... - cat > $TMPC << EOF -#include -#include -int main(int argc, char **argv) { - unsigned char test[8] = { 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88 }; - signal(SIGBUS, exit); - signal(SIGABRT, exit); - signal(SIGSEGV, exit); - if (*((unsigned int *)(test + 1)) != 0x55443322 && *((unsigned int *)(test + 1)) != 0x22334455) { - return 1; - } - return 0; -} -EOF - cc_check_no_clean && $TMPO$HOSTEXEEXT && _need_memalign=no - cc_check_clean - fi + # Status of unaligned access is unknown, so assume the worst. + _need_memalign=yes ;; esac echo "$_need_memalign" -- cgit v1.2.3 From c439e08590f3e340d80c0c135f412893ddc0c8d5 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Mon, 9 May 2011 16:37:23 +0200 Subject: BUILD: Declare RELEASE_BUILD in DEFINES, not CXXFLAGS --- configure | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'configure') diff --git a/configure b/configure index d230d588df..16a4e4c2a2 100755 --- a/configure +++ b/configure @@ -1149,8 +1149,7 @@ if test "$_release_build" = yes; then # We will also add a define, which indicates we are doing # an build for a release version. CXXFLAGS="$CXXFLAGS -O2 -Wuninitialized" - # FIXME: Why is the following in CXXFLAGS and not in DEFINES? Change or document this. - CXXFLAGS="$CXXFLAGS -DRELEASE_BUILD" + DEFINES="$DEFINES -DRELEASE_BUILD" fi -- cgit v1.2.3 From 652bf358c25784fe84aed473b555cbe4c836b34d Mon Sep 17 00:00:00 2001 From: Max Horn Date: Wed, 25 May 2011 13:40:07 +0200 Subject: BUILD: Update comments --- configure | 44 ++++++++++++++++++++++++-------------------- 1 file changed, 24 insertions(+), 20 deletions(-) (limited to 'configure') diff --git a/configure b/configure index 16a4e4c2a2..4b86a8b643 100755 --- a/configure +++ b/configure @@ -1376,6 +1376,9 @@ fi echo "$cxx_version" +# +# Bail out now if now useable compiler was found. +# if test "$cxx_verc_fail" = yes ; then echo echo "The version of your compiler is not supported at this time" @@ -1383,19 +1386,10 @@ if test "$cxx_verc_fail" = yes ; then exit 1 fi -echocheck "whether -Wglobal-constructors work" -cat > $TMPC << EOF -int main() { return 0; } -EOF -cc_check -Wglobal-constructors && _global_constructors=yes - -if test "$_global_constructors" = yes; then - CXXFLAGS="$CXXFLAGS -Wglobal-constructors" -fi -echo $_global_constructors - # -# Do CXXFLAGS now that we know the compiler version +# Setup compiler specific CXXFLAGS now that we know the compiler version. +# Foremost, this means enabling various warnings. +# In addition, we set CXX_UPDATE_DEP_FLAG for GCC >= 3.0 and for ICC. # if test "$have_gcc" = yes ; then if test "$_cxx_major" -ge "3" ; then @@ -1423,18 +1417,34 @@ elif test "$have_icc" = yes ; then add_line_to_config_mk 'CXX_UPDATE_DEP_FLAG = -MMD -MF "$(*D)/$(DEPDIR)/$(*F).d" -MQ "$@" -MP' fi; -# Some platforms use certain GNU extensions in header files +# By default, we add -pedantic to the CXXFLAGS to catch some potentially +# non-portable constructs, like use of GNU extensions. +# However, some platforms use GNU extensions in system header files, so +# for these we must not use -pedantic. case $_host_os in android | gamecube | psp | wii) ;; *) - # ICC does not support pedantic + # ICC does not support pedantic, while GCC and clang do. if test "$have_icc" = no ; then CXXFLAGS="$CXXFLAGS -pedantic" fi ;; esac +# If possible, we want to use -Wglobal-constructors +# However, not all compilers support that, so check whether the active one does. +echocheck "whether -Wglobal-constructors work" +cat > $TMPC << EOF +int main() { return 0; } +EOF +cc_check -Wglobal-constructors && _global_constructors=yes + +if test "$_global_constructors" = yes; then + CXXFLAGS="$CXXFLAGS -Wglobal-constructors" +fi +echo $_global_constructors + # # Check for endianness # @@ -1570,7 +1580,6 @@ case $_host_os in DEFINES="$DEFINES -DNONSTANDARD_PORT" ;; ds) - # TODO Nintendo DS DEFINES="$DEFINES -D__DS__" DEFINES="$DEFINES -DNDS" DEFINES="$DEFINES -DARM9" @@ -1650,7 +1659,6 @@ case $_host_os in DEFINES="$DEFINES -DREDUCE_MEMORY_USAGE" ;; ps2) - # TODO ps2 CXXFLAGS="$CXXFLAGS -G2" DEFINES="$DEFINES -D_EE" DEFINES="$DEFINES -D__PLAYSTATION2__" @@ -1813,7 +1821,6 @@ if test -n "$_host"; then _port_mk="backends/platform/dc/dreamcast.mk" ;; ds) - # TODO: complete this DEFINES="$DEFINES -DDISABLE_COMMAND_LINE" DEFINES="$DEFINES -DDISABLE_DEFAULT_SAVEFILEMANAGER" DEFINES="$DEFINES -DDISABLE_DOSBOX_OPL" @@ -1968,7 +1975,6 @@ if test -n "$_host"; then ppc-amigaos) ;; ps2) - # TODO: complete this DEFINES="$DEFINES -DDISABLE_TEXT_CONSOLE" DEFINES="$DEFINES -DDISABLE_COMMAND_LINE" DEFINES="$DEFINES -DDISABLE_DOSBOX_OPL" @@ -2119,7 +2125,6 @@ case $_backend in DEFINES="$DEFINES -DDINGUX" ;; ds) - # TODO ds INCLUDES="$INCLUDES "'-I$(srcdir)/backends/platform/ds/arm9/source' INCLUDES="$INCLUDES "'-I$(srcdir)/backends/platform/ds/commoninclude' INCLUDES="$INCLUDES "'-Ibackends/platform/ds/arm9/data' @@ -2148,7 +2153,6 @@ case $_backend in openpandora) ;; ps2) - # TODO ps2 DEFINES="$DEFINES -D_EE" DEFINES="$DEFINES -DFORCE_RTL" INCLUDES="$INCLUDES -I$PS2SDK/ee/include -I$PS2SDK/common/include -I$PS2SDK/ports/include" -- cgit v1.2.3 From 6e157fd2d4ee1cc5de5b4950ca499ba28f1f153e Mon Sep 17 00:00:00 2001 From: Max Horn Date: Wed, 25 May 2011 13:40:45 +0200 Subject: BUILD: Do not define LUA_USE_POSIX It doesn't really do anything useful anymore anyway (except make linux builds use _setjmp instead of setjmp, but both are equally bad for us and need to replaced anyway). --- configure | 1 - 1 file changed, 1 deletion(-) (limited to 'configure') diff --git a/configure b/configure index 4b86a8b643..23eb329dfa 100755 --- a/configure +++ b/configure @@ -1634,7 +1634,6 @@ case $_host_os in if test -z "$_host"; then CXXFLAGS="$CXXFLAGS $(getconf LFS_CFLAGS 2>/dev/null)" fi - DEFINES="$DEFINES -DLUA_USE_POSIX" ;; mingw*) DEFINES="$DEFINES -DWIN32" -- cgit v1.2.3 From 4f34347485c0f7451987cd25ad69f4f3cb13b1ff Mon Sep 17 00:00:00 2001 From: Max Horn Date: Wed, 25 May 2011 14:39:56 +0200 Subject: BUILD: Minor configure cleanup --- configure | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'configure') diff --git a/configure b/configure index 23eb329dfa..0d742b5cc1 100755 --- a/configure +++ b/configure @@ -1824,11 +1824,12 @@ if test -n "$_host"; then DEFINES="$DEFINES -DDISABLE_DEFAULT_SAVEFILEMANAGER" DEFINES="$DEFINES -DDISABLE_DOSBOX_OPL" DEFINES="$DEFINES -DDISABLE_FANCY_THEMES" - DEFINES="$DEFINES -DDISABLE_SID -DDISABLE_NES_APU" + DEFINES="$DEFINES -DDISABLE_SID" + DEFINES="$DEFINES -DDISABLE_NES_APU" + DEFINES="$DEFINES -DDISABLE_TEXT_CONSOLE" DEFINES="$DEFINES -DREDUCE_MEMORY_USAGE" DEFINES="$DEFINES -DSTREAM_AUDIO_FROM_DISK" DEFINES="$DEFINES -DVECTOR_RENDERER_FORMAT=1555" - add_line_to_config_h '#define DISABLE_TEXT_CONSOLE' _backend="ds" _build_scalers=no _mt32emu=no -- cgit v1.2.3 From 7fcaac9408b920cd5bab21336140ded966e37f89 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Wed, 25 May 2011 14:55:36 +0200 Subject: BUILD: Unify plugin prefix/suffix handling, unify setting DYNAMIC_MODULES --- configure | 121 +++++++++++++++++++------------------------------------------- 1 file changed, 36 insertions(+), 85 deletions(-) (limited to 'configure') diff --git a/configure b/configure index 0d742b5cc1..3025c7b5f7 100755 --- a/configure +++ b/configure @@ -163,6 +163,8 @@ _arm_asm=no _verbose_build=no _dynamic_modules=no _plugins_default=static +_plugin_prefix= +_plugin_suffix= _nasm=auto # Default commands _ranlib=ranlib @@ -2270,16 +2272,13 @@ add_to_config_mk_if_yes "$_verbose_build" 'VERBOSE_BUILD = 1' echo_n "Checking whether building plugins was requested... " echo "$_dynamic_modules" _mak_plugins= -_def_plugin="/* -> plugins disabled */" if test "$_dynamic_modules" = yes ; then echo_n "Checking whether building plugins is supported... " case $_host_os in android) -_def_plugin=' -#define PLUGIN_PREFIX "lib" -#define PLUGIN_SUFFIX ".so" -' + _plugin_prefix="lib" + _plugin_suffix=".so" # Work around an Android 2.0+ run-time linker bug: # The linker doesn't actually look in previously # loaded libraries when trying to resolve symbols - @@ -2289,11 +2288,7 @@ _def_plugin=' # (otherwise unnecessary) dependency from plugins back # to the main libscummvm.so. _mak_plugins=' -DYNAMIC_MODULES := 1 -PLUGIN_PREFIX := lib -PLUGIN_SUFFIX := .so PLUGIN_EXTRA_DEPS = libscummvm.so -CXXFLAGS += -DDYNAMIC_MODULES CXXFLAGS += -fpic PLUGIN_LDFLAGS += $(LDFLAGS) -L. -lscummvm PRE_OBJS_FLAGS := -Wl,-export-dynamic -Wl,-whole-archive @@ -2302,16 +2297,10 @@ LIBS += -ldl ' ;; darwin*) -_def_plugin=' -#define PLUGIN_PREFIX "" -#define PLUGIN_SUFFIX ".plugin" -' + _plugin_prefix="" + _plugin_suffix=".plugin" _mak_plugins=' -DYNAMIC_MODULES := 1 -PLUGIN_PREFIX := -PLUGIN_SUFFIX := .plugin PLUGIN_EXTRA_DEPS = $(EXECUTABLE) -CXXFLAGS += -DDYNAMIC_MODULES PLUGIN_LDFLAGS += -bundle -bundle_loader $(EXECUTABLE) -exported_symbols_list "$(srcdir)/plugin.exp" PRE_OBJS_FLAGS := -all_load POST_OBJS_FLAGS := @@ -2319,16 +2308,10 @@ LIBS += -ldl ' ;; dreamcast) -_def_plugin=' -#define PLUGIN_PREFIX "" -#define PLUGIN_SUFFIX ".plg" -' + _plugin_prefix="" + _plugin_suffix=".plg" _mak_plugins=' -DYNAMIC_MODULES := 1 -PLUGIN_PREFIX := -PLUGIN_SUFFIX := .plg PLUGIN_EXTRA_DEPS = $(abspath $(srcdir)/backends/platform/dc/plugin.x $(srcdir)/backends/platform/dc/plugin.syms) $(EXECUTABLE) backends/platform/dc/plugin_head.o -CXXFLAGS += -DDYNAMIC_MODULES PLUGIN_LDFLAGS = -ml -m4-single-only -nostartfiles -Wl,-q,-T$(srcdir)/backends/platform/dc/plugin.x,--just-symbols,$(EXECUTABLE),--retain-symbols-file,$(srcdir)/backends/platform/dc/plugin.syms -L$(ronindir)/lib backends/platform/dc/plugin_head.o PRE_OBJS_FLAGS := -Wl,--whole-archive POST_OBJS_FLAGS := -Wl,--no-whole-archive @@ -2342,16 +2325,10 @@ PLUGIN_LDFLAGS += -Wl,-T$(srcdir)/backends/plugins/ds/plugin.ld -mthumb-interwo ' ;; freebsd*) -_def_plugin=' -#define PLUGIN_PREFIX "lib" -#define PLUGIN_SUFFIX ".so" -' + _plugin_prefix="lib" + _plugin_suffix=".so" _mak_plugins=' -DYNAMIC_MODULES := 1 -PLUGIN_PREFIX := lib -PLUGIN_SUFFIX := .so PLUGIN_EXTRA_DEPS = -CXXFLAGS += -DDYNAMIC_MODULES CXXFLAGS += -fpic PLUGIN_LDFLAGS += -shared PRE_OBJS_FLAGS := -Wl,-export-dynamic -Wl,-whole-archive @@ -2366,16 +2343,10 @@ PLUGIN_LDFLAGS += -Wl,-T$(srcdir)/backends/plugins/wii/plugin.ld ' ;; gph*) -_def_plugin=' -#define PLUGIN_PREFIX "" -#define PLUGIN_SUFFIX ".plugin" -' + _plugin_prefix="" + _plugin_suffix=".plugin" _mak_plugins=' -DYNAMIC_MODULES := 1 -PLUGIN_PREFIX := -PLUGIN_SUFFIX := .plugin PLUGIN_EXTRA_DEPS = $(EXECUTABLE) -CXXFLAGS += -DDYNAMIC_MODULES CXXFLAGS += -fpic PLUGIN_LDFLAGS += -shared PRE_OBJS_FLAGS := -Wl,-export-dynamic -Wl,-whole-archive @@ -2384,16 +2355,10 @@ LIBS += -ldl ' ;; linux*) -_def_plugin=' -#define PLUGIN_PREFIX "lib" -#define PLUGIN_SUFFIX ".so" -' + _plugin_prefix="lib" + _plugin_suffix=".so" _mak_plugins=' -DYNAMIC_MODULES := 1 -PLUGIN_PREFIX := lib -PLUGIN_SUFFIX := .so PLUGIN_EXTRA_DEPS = -CXXFLAGS += -DDYNAMIC_MODULES CXXFLAGS += -fpic PLUGIN_LDFLAGS += -shared PRE_OBJS_FLAGS := -Wl,-export-dynamic -Wl,-whole-archive @@ -2402,16 +2367,10 @@ LIBS += -ldl ' ;; *mingw32*) -_def_plugin=' -#define PLUGIN_PREFIX "" -#define PLUGIN_SUFFIX ".dll" -' + _plugin_prefix="" + _plugin_suffix=".dll" _mak_plugins=' -DYNAMIC_MODULES := 1 -PLUGIN_PREFIX := -PLUGIN_SUFFIX := .dll PLUGIN_EXTRA_DEPS = $(EXECUTABLE) -CXXFLAGS += -DDYNAMIC_MODULES PLUGIN_LDFLAGS := -Wl,--enable-auto-import -shared ./libscummvm.a PRE_OBJS_FLAGS := -Wl,--whole-archive POST_OBJS_FLAGS := -Wl,--export-all-symbols -Wl,--no-whole-archive -Wl,--out-implib,./libscummvm.a @@ -2420,16 +2379,10 @@ POST_OBJS_FLAGS := -Wl,--export-all-symbols -Wl,--no-whole-archive -Wl,--out-im wince) DEFINES="$DEFINES -DUNCACHED_PLUGINS" HOSTEXEEXT=".dll" -_def_plugin=' -#define PLUGIN_PREFIX "" -#define PLUGIN_SUFFIX ".plugin" -' + _plugin_prefix="" + _plugin_suffix=".plugin" _mak_plugins=' -DYNAMIC_MODULES := 1 -PLUGIN_PREFIX := -PLUGIN_SUFFIX := .plugin PLUGIN_EXTRA_DEPS = $(EXECUTABLE) -CXXFLAGS += -DDYNAMIC_MODULES PLUGIN_LDFLAGS := -shared -lscummvm -L. PRE_OBJS_FLAGS := -Wl,--whole-archive POST_OBJS_FLAGS := -Wl,--export-all-symbols -Wl,--no-whole-archive -Wl,--out-implib,./libscummvm.a -shared @@ -2452,16 +2405,10 @@ PLUGIN_LDFLAGS += -Wl,-T$(srcdir)/backends/plugins/psp/plugin.ld -lstdc++ -lc ' ;; webos) -_def_plugin=' -#define PLUGIN_PREFIX "lib" -#define PLUGIN_SUFFIX ".so" -' + _plugin_prefix="lib" + _plugin_suffix=".so" _mak_plugins=' -DYNAMIC_MODULES := 1 -PLUGIN_PREFIX := lib -PLUGIN_SUFFIX := .so PLUGIN_EXTRA_DEPS = -CXXFLAGS += -DDYNAMIC_MODULES CXXFLAGS += -fpic PLUGIN_LDFLAGS += -shared $(LDFLAGS) PRE_OBJS_FLAGS := -Wl,-export-dynamic -Wl,-whole-archive @@ -2472,7 +2419,6 @@ LIBS += -ldl *) _dynamic_modules=no _mak_plugins= - _def_plugin= ;; esac echo "$_dynamic_modules" @@ -2484,15 +2430,9 @@ fi define_in_config_if_yes "$_elf_loader" 'USE_ELF_LOADER' if test "$_elf_loader" = yes; then - CXXFLAGS="$CXXFLAGS -DDYNAMIC_MODULES" - _def_plugin=' -#define PLUGIN_PREFIX "" -#define PLUGIN_SUFFIX ".plg" -' + _plugin_prefix="" + _plugin_suffix=".plg" _mak_plugins=' -DYNAMIC_MODULES := 1 -PLUGIN_PREFIX := -PLUGIN_SUFFIX := .plg PLUGIN_EXTRA_DEPS = $(EXECUTABLE) PLUGIN_LDFLAGS = -nostartfiles backends/plugins/elf/version.o -Wl,-q,--just-symbols,$(EXECUTABLE),--retain-symbols-file,$(srcdir)/backends/plugins/elf/plugin.syms PRE_OBJS_FLAGS := -Wl,--whole-archive @@ -2500,6 +2440,20 @@ POST_OBJS_FLAGS := -Wl,--no-whole-archive '"$_mak_plugins" fi +# +# Set up some common plugin settings in config.h and config.mk, if enabled +# +if test "$_dynamic_modules" = yes ; then + add_line_to_config_h "#define PLUGIN_PREFIX \"$_plugin_prefix\"" + add_line_to_config_h "#define PLUGIN_SUFFIX \"$_plugin_suffix\"" + add_line_to_config_mk "PLUGIN_PREFIX := $_plugin_prefix" + add_line_to_config_mk "PLUGIN_SUFFIX := $_plugin_suffix" + + add_line_to_config_mk "DYNAMIC_MODULES := 1" + DEFINES="$DEFINES -DDYNAMIC_MODULES" +fi + + # # Check whether integrated MT-32 emulator support is requested # @@ -3269,9 +3223,6 @@ typedef signed $type_1_byte int8; typedef signed $type_2_byte int16; typedef signed $type_4_byte int32; -/* Plugin settings */ -$_def_plugin - #endif /* CONFIG_H */ EOF -- cgit v1.2.3 From bf490b4084d7d1fbec52fc2c6b47ae7a0156c7fc Mon Sep 17 00:00:00 2001 From: Max Horn Date: Thu, 26 May 2011 07:25:52 +0200 Subject: BUILD: Reorder plugin stuff in configure some more --- configure | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'configure') diff --git a/configure b/configure index 3025c7b5f7..736325926b 100755 --- a/configure +++ b/configure @@ -2279,6 +2279,8 @@ if test "$_dynamic_modules" = yes ; then android) _plugin_prefix="lib" _plugin_suffix=".so" + CXXFLAGS="$CXXFLAGS -fpic" + LIBS="$LIBS -ldl" # Work around an Android 2.0+ run-time linker bug: # The linker doesn't actually look in previously # loaded libraries when trying to resolve symbols - @@ -2289,22 +2291,20 @@ if test "$_dynamic_modules" = yes ; then # to the main libscummvm.so. _mak_plugins=' PLUGIN_EXTRA_DEPS = libscummvm.so -CXXFLAGS += -fpic PLUGIN_LDFLAGS += $(LDFLAGS) -L. -lscummvm PRE_OBJS_FLAGS := -Wl,-export-dynamic -Wl,-whole-archive POST_OBJS_FLAGS := -Wl,-no-whole-archive -LIBS += -ldl ' ;; darwin*) _plugin_prefix="" _plugin_suffix=".plugin" + LIBS="$LIBS -ldl" _mak_plugins=' PLUGIN_EXTRA_DEPS = $(EXECUTABLE) PLUGIN_LDFLAGS += -bundle -bundle_loader $(EXECUTABLE) -exported_symbols_list "$(srcdir)/plugin.exp" PRE_OBJS_FLAGS := -all_load POST_OBJS_FLAGS := -LIBS += -ldl ' ;; dreamcast) @@ -2327,9 +2327,9 @@ PLUGIN_LDFLAGS += -Wl,-T$(srcdir)/backends/plugins/ds/plugin.ld -mthumb-interwo freebsd*) _plugin_prefix="lib" _plugin_suffix=".so" + CXXFLAGS="$CXXFLAGS -fpic" _mak_plugins=' PLUGIN_EXTRA_DEPS = -CXXFLAGS += -fpic PLUGIN_LDFLAGS += -shared PRE_OBJS_FLAGS := -Wl,-export-dynamic -Wl,-whole-archive POST_OBJS_FLAGS := -Wl,-no-whole-archive @@ -2345,25 +2345,25 @@ PLUGIN_LDFLAGS += -Wl,-T$(srcdir)/backends/plugins/wii/plugin.ld gph*) _plugin_prefix="" _plugin_suffix=".plugin" + CXXFLAGS="$CXXFLAGS -fpic" + LIBS="$LIBS -ldl" _mak_plugins=' PLUGIN_EXTRA_DEPS = $(EXECUTABLE) -CXXFLAGS += -fpic PLUGIN_LDFLAGS += -shared PRE_OBJS_FLAGS := -Wl,-export-dynamic -Wl,-whole-archive POST_OBJS_FLAGS := -Wl,-no-whole-archive -LIBS += -ldl ' ;; linux*) _plugin_prefix="lib" _plugin_suffix=".so" + CXXFLAGS="$CXXFLAGS -fpic" + LIBS="$LIBS -ldl" _mak_plugins=' PLUGIN_EXTRA_DEPS = -CXXFLAGS += -fpic PLUGIN_LDFLAGS += -shared PRE_OBJS_FLAGS := -Wl,-export-dynamic -Wl,-whole-archive POST_OBJS_FLAGS := -Wl,-no-whole-archive -LIBS += -ldl ' ;; *mingw32*) @@ -2392,7 +2392,7 @@ POST_OBJS_FLAGS := -Wl,--export-all-symbols -Wl,--no-whole-archive -Wl,--out-im _elf_loader=yes DEFINES="$DEFINES -DMIPS_TARGET" _mak_plugins=' -LDFLAGS += -mno-crt0 $(PS2SDK)/ee/startup/crt0.o -T$(srcdir)/backends/plugins/ps2/main_prog.ld +LDFLAGS += -mno-crt0 $(PS2SDK)/ee/startup/crt0.o -Wl,-T$(srcdir)/backends/plugins/ps2/main_prog.ld PLUGIN_LDFLAGS += -mno-crt0 $(PS2SDK)/ee/startup/crt0.o -Wl,-T$(srcdir)/backends/plugins/ps2/plugin.ld -lstdc++ -lc ' ;; @@ -2407,13 +2407,13 @@ PLUGIN_LDFLAGS += -Wl,-T$(srcdir)/backends/plugins/psp/plugin.ld -lstdc++ -lc webos) _plugin_prefix="lib" _plugin_suffix=".so" + CXXFLAGS="$CXXFLAGS -fpic" + LIBS="$LIBS -ldl" _mak_plugins=' PLUGIN_EXTRA_DEPS = -CXXFLAGS += -fpic PLUGIN_LDFLAGS += -shared $(LDFLAGS) PRE_OBJS_FLAGS := -Wl,-export-dynamic -Wl,-whole-archive POST_OBJS_FLAGS := -Wl,-no-whole-archive -LIBS += -ldl ' ;; *) -- cgit v1.2.3 From 7b51caedbaa3594736d8a4f28064de1b65816ca4 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Thu, 26 May 2011 08:25:28 +0200 Subject: ANDROID: Trying to fix the recent linker failures --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'configure') diff --git a/configure b/configure index 736325926b..c4536c02a9 100755 --- a/configure +++ b/configure @@ -3105,7 +3105,7 @@ case $_backend in system_libs='' for lib in $LIBS; do case $lib in - -lz|-lm) + -lz|-lm|-ldl) system_libs="$system_libs $lib" ;; *) -- cgit v1.2.3 From de8a44abfc221a4a173cbc1bab87f596379ab14c Mon Sep 17 00:00:00 2001 From: Max Horn Date: Thu, 26 May 2011 11:02:46 +0200 Subject: BUILD: Reorder configure some more --- configure | 251 +++++++++++++++++++++++++++++++------------------------------- 1 file changed, 127 insertions(+), 124 deletions(-) (limited to 'configure') diff --git a/configure b/configure index c4536c02a9..45b3121614 100755 --- a/configure +++ b/configure @@ -134,21 +134,19 @@ _mpeg2=no _png=auto _theoradec=auto _fluidsynth=auto -_16bit=auto _opengl=auto _opengles=auto _readline=auto # Default option behaviour yes/no _debug_build=auto _release_build=auto +_verbose_build=no _text_console=no _mt32emu=yes _build_scalers=yes _build_hq_scalers=yes _enable_prof=no -_posix=no _global_constructors=no -_elf_loader=no # Default vkeybd/keymapper options _vkeybd=no _keymapper=no @@ -156,12 +154,9 @@ _keymapper=no _translation=yes # Default platform settings _backend=sdl -_endian=unknown -_need_memalign=yes -_have_x86=no -_arm_asm=no -_verbose_build=no +_16bit=auto _dynamic_modules=no +_elf_loader=no _plugins_default=static _plugin_prefix= _plugin_suffix= @@ -180,6 +175,15 @@ _sdlpath="$PATH" _nasmpath="$PATH" NASMFLAGS="" NASM="" +# The following variables are automatically detected, and should not +# be modified otherwise. Consider them read-only. +_posix=no +_endian=unknown +_need_memalign=yes +_have_x86=no +_arm_asm=no + + # Directories for installing ScummVM. # This list is closely based on what GNU autoconf does, @@ -1469,6 +1473,20 @@ fi echo $_endian; cc_check_clean tmp_endianness_check.cpp +case $_endian in + big) + add_line_to_config_h '#undef SCUMM_LITTLE_ENDIAN' + add_line_to_config_h '#define SCUMM_BIG_ENDIAN' + ;; + little) + add_line_to_config_h '#define SCUMM_LITTLE_ENDIAN' + add_line_to_config_h '#undef SCUMM_BIG_ENDIAN' + ;; + *) + exit 1 + ;; +esac + # # Determine a data type with the given length # @@ -1517,6 +1535,85 @@ TMPR="$?" echo "$type_4_byte" test $TMPR -eq 0 || exit 1 # check exit code of subshell +# +# Check whether memory alignment is required +# +# For some CPU types, unaligned memory access is either not supported at +# all (and so leads to a crash), requires a super-slow emulation via an +# exception handler, or just results in incorrect results. +# On the other hand, accessing data in a manner that works regardless of +# alignment can be a lot slower than regular access, so we don't want +# to use it if we don't have to. +# +# So we do the following: For CPU families where we know whether unaligned +# access is safe & fast, we enable / disable unaligned access accordingly. +# Otherwise, we just disable memory alignment. +# +# NOTE: In the past, for non-cross compiled builds, we would also run some code +# which would try to test whether unaligned access worked or not. But this test +# could not reliably determine whether unaligned access really worked in all +# situations (and across different implementations of the target CPU arch), nor +# whether it was fast (as opposed to slowly emulated by fault handlers). Hence, +# we do not use this approach anymore. +# +# NOTE: The only kinds of unaligned access we allow are for 2 byte and 4 +# byte loads / stores. No promises are made for bigger sizes, such as 8 +# or 16 byte loads, for which architectures may behave differently than +# for the smaller sizes. +echo_n "Alignment required... " +case $_host_cpu in + i[3-6]86 | x86_64 | ppc*) + # Unaligned access should work + _need_memalign=no + ;; + alpha* | arm* | bfin* | hp* | mips* | sh* | sparc* | ia64 | nv1*) + # Unaligned access is not supported or extremely slow. + _need_memalign=yes + ;; + *) + # Status of unaligned access is unknown, so assume the worst. + _need_memalign=yes + ;; +esac +echo "$_need_memalign" + +define_in_config_h_if_yes $_need_memalign 'SCUMM_NEED_ALIGNMENT' + +# +# Check whether we can use x86 asm routines +# +echo_n "Compiling for x86... " +case $_host_cpu in + i386|i486|i586|i686) + _have_x86=yes + ;; + *) + _have_x86=no + ;; +esac +echo "$_have_x86" +define_in_config_h_if_yes $_have_x86 'HAVE_X86' + +# +# Check whether to use optimized ARM asm +# +echo_n "Compiling for ARM... " +case $_host_cpu in + arm*) + _arm_asm=yes + ;; + *) + _arm_asm=no + ;; +esac +echo "$_arm_asm" +define_in_config_if_yes "$_arm_asm" 'USE_ARM_SCALER_ASM' +define_in_config_if_yes "$_arm_asm" 'USE_ARM_SOUND_ASM' +define_in_config_if_yes "$_arm_asm" 'USE_ARM_SMUSH_ASM' +define_in_config_if_yes "$_arm_asm" 'USE_ARM_GFX_ASM' +define_in_config_if_yes "$_arm_asm" 'USE_ARM_COSTUME_ASM' + + # # Determine build settings # @@ -1715,35 +1812,6 @@ case $_host_os in ;; esac -# -# Determine whether host is POSIX compliant, or at least POSIX -# compatible enough to support our POSIX code (including dlsym(), -# mkdir() and some other APIs). -# -# TODO: Instead of basing this on the host name, we should really base -# this on the presence of features (such as the dlsym and mkdir APIs). -# -echo_n "Checking if host is POSIX compliant... " -case $_host_os in - amigaos* | cygwin* | dreamcast | ds | gamecube | mingw* | n64 | ps2 | psp | wii | wince) - ;; - android | beos* | bsd* | darwin* | freebsd* | gph-linux | haiku* | hpux* | iphone | irix* | linux* | mint* | netbsd* | openbsd* | solaris* | sunos* | uclinux* | webos) - _posix=yes - ;; - os2-emx*) - _posix=yes # FIXME: Really??? - ;; - *) - # given this is a shell script, we might assume some type of posix. - # However, the host system might be a totally different one, so - # we can assume nothing about it. - # Indeed, as mentioned further above, we really should test for the - # presences of relevant APIs on the host anyway... - _posix=no - ;; -esac -echo $_posix - if test -n "$_host"; then # Cross-compiling mode - add your target here if needed echo "Cross-compiling to $_host" @@ -2058,50 +2126,6 @@ if test -n "$_host"; then esac fi -# -# Check whether memory alignment is required -# -# For some CPU types, unaligned memory access is either not supported at -# all (and so leads to a crash), requires a super-slow emulation via an -# exception handler, or just results in incorrect results. -# On the other hand, accessing data in a manner that works regardless of -# alignment can be a lot slower than regular access, so we don't want -# to use it if we don't have to. -# -# So we do the following: For CPU families where we know whether unaligned -# access is safe & fast, we enable / disable unaligned access accordingly. -# Otherwise, we just disable memory alignment. -# -# NOTE: In the past, for non-cross compiled builds, we would also run some code -# which would try to test whether unaligned access worked or not. But this test -# could not reliably determine whether unaligned access really worked in all -# situations (and across different implementations of the target CPU arch), nor -# whether it was fast (as opposed to slowly emulated by fault handlers). Hence, -# we do not use this approach anymore. -# -# NOTE: The only kinds of unaligned access we allow are for 2 byte and 4 -# byte loads / stores. No promises are made for bigger sizes, such as 8 -# or 16 byte loads, for which architectures may behave differently than -# for the smaller sizes. -echo_n "Alignment required... " -case $_host_cpu in - i[3-6]86 | x86_64 | ppc*) - # Unaligned access should work - _need_memalign=no - ;; - alpha* | arm* | bfin* | hp* | mips* | sh* | sparc* | ia64 | nv1*) - # Unaligned access is not supported or extremely slow. - _need_memalign=yes - ;; - *) - # Status of unaligned access is unknown, so assume the worst. - _need_memalign=yes - ;; -esac -echo "$_need_memalign" - -define_in_config_h_if_yes $_need_memalign 'SCUMM_NEED_ALIGNMENT' - # # Backend related stuff # @@ -2238,21 +2262,34 @@ esac # -# Add the results of the above checks to config.h +# Determine whether host is POSIX compliant, or at least POSIX +# compatible enough to support our POSIX code (including dlsym(), +# mkdir() and some other APIs). +# +# TODO: Instead of basing this on the host name, we should really base +# this on the presence of features (such as the dlsym and mkdir APIs). # -case $_endian in - big) - add_line_to_config_h '#undef SCUMM_LITTLE_ENDIAN' - add_line_to_config_h '#define SCUMM_BIG_ENDIAN' +echo_n "Checking if host is POSIX compliant... " +case $_host_os in + amigaos* | cygwin* | dreamcast | ds | gamecube | mingw* | n64 | ps2 | psp | wii | wince) + _posix=no ;; - little) - add_line_to_config_h '#define SCUMM_LITTLE_ENDIAN' - add_line_to_config_h '#undef SCUMM_BIG_ENDIAN' + android | beos* | bsd* | darwin* | freebsd* | gph-linux | haiku* | hpux* | iphone | irix* | linux* | mint* | netbsd* | openbsd* | solaris* | sunos* | uclinux* | webos) + _posix=yes + ;; + os2-emx*) + _posix=yes # FIXME: Really??? ;; *) - exit 1 + # given this is a shell script, we might assume some type of posix. + # However, the host system might be a totally different one, so + # we can assume nothing about it. + # Indeed, as mentioned further above, we really should test for the + # presences of relevant APIs on the host anyway... + _posix=no ;; esac +echo $_posix if test "$_posix" = yes ; then DEFINES="$DEFINES -DPOSIX" @@ -2899,40 +2936,6 @@ define_in_config_if_yes "$_opengl" "USE_OPENGL" define_in_config_if_yes "$_opengles" "USE_GLES" -# -# Check whether we can use x86 asm routines -# -echo_n "Compiling for x86... " -case $_host_cpu in - i386|i486|i586|i686) - _have_x86=yes - ;; - *) - _have_x86=no - ;; -esac -echo "$_have_x86" -define_in_config_h_if_yes $_have_x86 'HAVE_X86' - -# -# Check whether to use optimized ARM asm -# -echo_n "Compiling for ARM... " -case $_host_cpu in - arm*) - _arm_asm=yes - ;; - *) - _arm_asm=no - ;; -esac -echo "$_arm_asm" -define_in_config_if_yes "$_arm_asm" 'USE_ARM_SCALER_ASM' -define_in_config_if_yes "$_arm_asm" 'USE_ARM_SOUND_ASM' -define_in_config_if_yes "$_arm_asm" 'USE_ARM_SMUSH_ASM' -define_in_config_if_yes "$_arm_asm" 'USE_ARM_GFX_ASM' -define_in_config_if_yes "$_arm_asm" 'USE_ARM_COSTUME_ASM' - # # Check for nasm # -- cgit v1.2.3 From a654115f1a9a1497ee7d73a3c861e4f37ab1e081 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Thu, 26 May 2011 11:03:00 +0200 Subject: BUILD: Make endianess check stricter --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'configure') diff --git a/configure b/configure index 45b3121614..9073232823 100755 --- a/configure +++ b/configure @@ -1467,7 +1467,7 @@ EOF $CXX $CXXFLAGS -c -o $TMPO.o tmp_endianness_check.cpp if strings $TMPO.o | grep BIGenDianSyS >/dev/null; then _endian=big -else +elif strings $TMPO.o | grep LiTTleEnDian >/dev/null; then _endian=little fi echo $_endian; -- cgit v1.2.3 From 09ba2ad438d1316792861b25e68e19594eb26c7f Mon Sep 17 00:00:00 2001 From: Max Horn Date: Thu, 26 May 2011 13:29:09 +0200 Subject: DC: Don't set a lib search path for plugins Plugins may not rely on external libs, so there is no point in specifying a custom library search path for them. --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'configure') diff --git a/configure b/configure index 9073232823..00679c9a22 100755 --- a/configure +++ b/configure @@ -2349,7 +2349,7 @@ POST_OBJS_FLAGS := _plugin_suffix=".plg" _mak_plugins=' PLUGIN_EXTRA_DEPS = $(abspath $(srcdir)/backends/platform/dc/plugin.x $(srcdir)/backends/platform/dc/plugin.syms) $(EXECUTABLE) backends/platform/dc/plugin_head.o -PLUGIN_LDFLAGS = -ml -m4-single-only -nostartfiles -Wl,-q,-T$(srcdir)/backends/platform/dc/plugin.x,--just-symbols,$(EXECUTABLE),--retain-symbols-file,$(srcdir)/backends/platform/dc/plugin.syms -L$(ronindir)/lib backends/platform/dc/plugin_head.o +PLUGIN_LDFLAGS = -ml -m4-single-only -nostartfiles -Wl,-q,-T$(srcdir)/backends/platform/dc/plugin.x,--just-symbols,$(EXECUTABLE),--retain-symbols-file,$(srcdir)/backends/platform/dc/plugin.syms backends/platform/dc/plugin_head.o PRE_OBJS_FLAGS := -Wl,--whole-archive POST_OBJS_FLAGS := -Wl,--no-whole-archive ' -- cgit v1.2.3 From 22e02b0aa221058e04ba117a63ac71b6099f0190 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Thu, 26 May 2011 14:03:39 +0200 Subject: BUILD: Only add one option per line to INCLUDES/CXXFLAGS/LDFLAGS This improves (IMHO) readability, and makes it easier to diff for changes in compiler options. --- configure | 191 ++++++++++++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 141 insertions(+), 50 deletions(-) (limited to 'configure') diff --git a/configure b/configure index 00679c9a22..48216b62b1 100755 --- a/configure +++ b/configure @@ -1154,7 +1154,8 @@ if test "$_release_build" = yes; then # makes it possible to use -Wuninitialized, so let's do that. # We will also add a define, which indicates we are doing # an build for a release version. - CXXFLAGS="$CXXFLAGS -O2 -Wuninitialized" + CXXFLAGS="$CXXFLAGS -O2" + CXXFLAGS="$CXXFLAGS -Wuninitialized" DEFINES="$DEFINES -DRELEASE_BUILD" fi @@ -1403,12 +1404,12 @@ if test "$have_gcc" = yes ; then # newlib-based system include files suppress non-C89 function # declarations under __STRICT_ANSI__ amigaos* | android | dreamcast | ds | gamecube | mingw* | n64 | psp | ps2 | wii | wince ) - CXXFLAGS="$CXXFLAGS -W -Wno-unused-parameter" ;; *) - CXXFLAGS="$CXXFLAGS -ansi -W -Wno-unused-parameter" + CXXFLAGS="$CXXFLAGS -ansi" ;; esac + CXXFLAGS="$CXXFLAGS -W -Wno-unused-parameter" add_line_to_config_mk 'HAVE_GCC3 = 1' add_line_to_config_mk 'CXX_UPDATE_DEP_FLAG = -MMD -MF "$(*D)/$(DEPDIR)/$(*F).d" -MQ "$@" -MP' fi; @@ -1621,7 +1622,8 @@ echo_n "Checking hosttype... " echo $_host_os case $_host_os in amigaos*) - LDFLAGS="$LDFLAGS -use-dynld -L/sdk/local/newlib/lib" + LDFLAGS="$LDFLAGS -use-dynld" + LDFLAGS="$LDFLAGS -L/sdk/local/newlib/lib" # We have to use 'long' for our 4 byte typedef because AmigaOS already typedefs (u)int32 # as (unsigned) long, and consequently we'd get a compiler error otherwise. type_4_byte='long' @@ -1630,25 +1632,36 @@ case $_host_os in android) case $_host in android) - CXXFLAGS="$CXXFLAGS -march=armv5te -mtune=xscale -msoft-float" + CXXFLAGS="$CXXFLAGS -march=armv5te" + CXXFLAGS="$CXXFLAGS -mtune=xscale" + CXXFLAGS="$CXXFLAGS -msoft-float" ;; android-v7a) - CXXFLAGS="$CXXFLAGS -march=armv7-a -mfloat-abi=softfp -mfpu=vfp" + CXXFLAGS="$CXXFLAGS -march=armv7-a" + CXXFLAGS="$CXXFLAGS -mfloat-abi=softfp" + CXXFLAGS="$CXXFLAGS -mfpu=vfp" LDFLAGS="$LDFLAGS -Wl,--fix-cortex-a8" ;; esac CXXFLAGS="$CXXFLAGS --sysroot=$ANDROID_NDK/platforms/android-4/arch-arm" - CXXFLAGS="$CXXFLAGS -fpic -ffunction-sections -funwind-tables" + CXXFLAGS="$CXXFLAGS -fpic" + CXXFLAGS="$CXXFLAGS -ffunction-sections" + CXXFLAGS="$CXXFLAGS -funwind-tables" if test "$_debug_build" = yes; then - CXXFLAGS="$CXXFLAGS -fno-omit-frame-pointer -fno-strict-aliasing" + CXXFLAGS="$CXXFLAGS -fno-omit-frame-pointer" + CXXFLAGS="$CXXFLAGS -fno-strict-aliasing" else - CXXFLAGS="$CXXFLAGS -fomit-frame-pointer -fstrict-aliasing" + CXXFLAGS="$CXXFLAGS -fomit-frame-pointer" + CXXFLAGS="$CXXFLAGS -fstrict-aliasing" fi CXXFLAGS="$CXXFLAGS -finline-limit=300" - CXXFLAGS="$CXXFLAGS -Os -mthumb-interwork" + CXXFLAGS="$CXXFLAGS -Os" + CXXFLAGS="$CXXFLAGS -mthumb-interwork" # FIXME: Why is the following in CXXFLAGS and not in DEFINES? Change or document this. - CXXFLAGS="$CXXFLAGS -D__ARM_ARCH_5__ -D__ARM_ARCH_5T__" - CXXFLAGS="$CXXFLAGS -D__ARM_ARCH_5E__ -D__ARM_ARCH_5TE__" + CXXFLAGS="$CXXFLAGS -D__ARM_ARCH_5__" + CXXFLAGS="$CXXFLAGS -D__ARM_ARCH_5T__" + CXXFLAGS="$CXXFLAGS -D__ARM_ARCH_5E__" + CXXFLAGS="$CXXFLAGS -D__ARM_ARCH_5TE__" # supress 'mangling of 'va_list' has changed in GCC 4.4' CXXFLAGS="$CXXFLAGS -Wno-psabi" LDFLAGS="$LDFLAGS --sysroot=$ANDROID_NDK/platforms/android-4/arch-arm" @@ -1684,11 +1697,20 @@ case $_host_os in DEFINES="$DEFINES -DARM9" DEFINES="$DEFINES -DARM" DEFINES="$DEFINES -DNONSTANDARD_PORT" - CXXFLAGS="$CXXFLAGS -isystem $DEVKITPRO/libnds/include -isystem $DEVKITPRO/devkitARM/arm-eabi/include" - CXXFLAGS="$CXXFLAGS -mcpu=arm9tdmi -mtune=arm9tdmi -fomit-frame-pointer -mthumb-interwork" - CXXFLAGS="$CXXFLAGS -ffunction-sections -fdata-sections -fno-strict-aliasing" + CXXFLAGS="$CXXFLAGS -isystem $DEVKITPRO/libnds/include" + CXXFLAGS="$CXXFLAGS -isystem $DEVKITPRO/devkitARM/arm-eabi/include" + CXXFLAGS="$CXXFLAGS -mcpu=arm9tdmi" + CXXFLAGS="$CXXFLAGS -mtune=arm9tdmi" + CXXFLAGS="$CXXFLAGS -fomit-frame-pointer" + CXXFLAGS="$CXXFLAGS -mthumb-interwork" + CXXFLAGS="$CXXFLAGS -ffunction-sections" + CXXFLAGS="$CXXFLAGS -fdata-sections" + CXXFLAGS="$CXXFLAGS -fno-strict-aliasing" CXXFLAGS="$CXXFLAGS -fuse-cxa-atexit" - LDFLAGS="$LDFLAGS -specs=ds_arm9.specs -mthumb-interwork -mno-fpu -Wl,-Map,map.txt" + LDFLAGS="$LDFLAGS -specs=ds_arm9.specs" + LDFLAGS="$LDFLAGS -mthumb-interwork" + LDFLAGS="$LDFLAGS -mno-fpu" + LDFLAGS="$LDFLAGS -Wl,-Map,map.txt" if test "$_dynamic_modules" = no ; then LDFLAGS="$LDFLAGS -Wl,--gc-sections" else @@ -1704,12 +1726,21 @@ case $_host_os in CXXFLAGS="$CXXFLAGS -I/usr/local/include" ;; gamecube) - CXXFLAGS="$CXXFLAGS -Os -mogc -mcpu=750 -meabi -mhard-float" - CXXFLAGS="$CXXFLAGS -ffunction-sections -fdata-sections -fmodulo-sched" + CXXFLAGS="$CXXFLAGS -Os" + CXXFLAGS="$CXXFLAGS -mogc" + CXXFLAGS="$CXXFLAGS -mcpu=750" + CXXFLAGS="$CXXFLAGS -meabi" + CXXFLAGS="$CXXFLAGS -mhard-float" + CXXFLAGS="$CXXFLAGS -ffunction-sections" + CXXFLAGS="$CXXFLAGS -fdata-sections" + CXXFLAGS="$CXXFLAGS -fmodulo-sched" CXXFLAGS="$CXXFLAGS -fuse-cxa-atexit" CXXFLAGS="$CXXFLAGS -I$DEVKITPRO/libogc/include" # libogc is required to link the cc tests (includes _start()) - LDFLAGS="$LDFLAGS -mogc -mcpu=750 -L$DEVKITPRO/libogc/lib/cube -logc" + LDFLAGS="$LDFLAGS -mogc" + LDFLAGS="$LDFLAGS -mcpu=750" + LDFLAGS="$LDFLAGS -L$DEVKITPRO/libogc/lib/cube" + LDFLAGS="$LDFLAGS -logc" if test "$_dynamic_modules" = "yes" ; then # retarded toolchain patch forces --gc-sections, overwrite it LDFLAGS="$LDFLAGS -Wl,--no-gc-sections" @@ -1765,8 +1796,10 @@ case $_host_os in if test -d "$PSPDEV/psp/lib"; then LDFLAGS="$LDFLAGS -L$PSPDEV/psp/lib" fi - LDFLAGS="$LDFLAGS -L$PSPSDK/lib -specs=$_srcdir/backends/platform/psp/psp.spec" - CXXFLAGS="$CXXFLAGS -O3 -I$PSPSDK/include" + LDFLAGS="$LDFLAGS -L$PSPSDK/lib" + LDFLAGS="$LDFLAGS -specs=$_srcdir/backends/platform/psp/psp.spec" + CXXFLAGS="$CXXFLAGS -O3" + CXXFLAGS="$CXXFLAGS -I$PSPSDK/include" # FIXME: Why is the following in CXXFLAGS and not in DEFINES? Change or document this. CXXFLAGS="$CXXFLAGS -D_PSP_FW_VERSION=150" ;; @@ -1777,29 +1810,46 @@ case $_host_os in LIBS="$LIBS -lnsl -lsocket" ;; webos) - CXXFLAGS="$CXXFLAGS -I$WEBOS_PDK/include -I$WEBOS_PDK/include/SDL -I$WEBOS_PDK/device/usr/include" + CXXFLAGS="$CXXFLAGS -I$WEBOS_PDK/include" + CXXFLAGS="$CXXFLAGS -I$WEBOS_PDK/include/SDL" + CXXFLAGS="$CXXFLAGS -I$WEBOS_PDK/device/usr/include" # These compiler options are needed to support the Palm Pixi - CXXFLAGS="$CXXFLAGS -mcpu=arm1136jf-s -mfpu=vfp -mfloat-abi=softfp" - LDFLAGS="$LDFLAGS -L$WEBOS_PDK/device/lib -L$WEBOS_PDK/device/usr/lib" + CXXFLAGS="$CXXFLAGS -mcpu=arm1136jf-s" + CXXFLAGS="$CXXFLAGS -mfpu=vfp " + CXXFLAGS="$CXXFLAGS mfloat-abi=softfp" + LDFLAGS="$LDFLAGS -L$WEBOS_PDK/device/lib" + LDFLAGS="$LDFLAGS -L$WEBOS_PDK/device/usr/lib" LDFLAGS="$LDFLAGS -Wl,--allow-shlib-undefined" LDFLAGS="$LDFLAGS --sysroot=$WEBOS_PDK/arm-gcc/sysroot" add_line_to_config_mk "WEBOS_SDK = $WEBOS_SDK" _seq_midi=no ;; wii) - CXXFLAGS="$CXXFLAGS -Os -mrvl -mcpu=750 -meabi -mhard-float" - CXXFLAGS="$CXXFLAGS -ffunction-sections -fdata-sections -fmodulo-sched" + CXXFLAGS="$CXXFLAGS -Os" + CXXFLAGS="$CXXFLAGS -mrvl" + CXXFLAGS="$CXXFLAGS -mcpu=750" + CXXFLAGS="$CXXFLAGS -meabi" + CXXFLAGS="$CXXFLAGS -mhard-float" + CXXFLAGS="$CXXFLAGS -ffunction-sections" + CXXFLAGS="$CXXFLAGS -fdata-sections" + CXXFLAGS="$CXXFLAGS -fmodulo-sched" CXXFLAGS="$CXXFLAGS -fuse-cxa-atexit" CXXFLAGS="$CXXFLAGS -I$DEVKITPRO/libogc/include" # libogc is required to link the cc tests (includes _start()) - LDFLAGS="$LDFLAGS -mrvl -mcpu=750 -L$DEVKITPRO/libogc/lib/wii -logc" + LDFLAGS="$LDFLAGS -mrvl" + LDFLAGS="$LDFLAGS -mcpu=750" + LDFLAGS="$LDFLAGS -L$DEVKITPRO/libogc/lib/wii" + LDFLAGS="$LDFLAGS -logc" if test "$_dynamic_modules" = "yes" ; then # retarded toolchain patch forces --gc-sections, overwrite it LDFLAGS="$LDFLAGS -Wl,--no-gc-sections" fi ;; wince) - CXXFLAGS="$CXXFLAGS -O3 -fno-inline-functions -march=armv4 -mtune=xscale" + CXXFLAGS="$CXXFLAGS -O3" + CXXFLAGS="$CXXFLAGS -fno-inline-functions" + CXXFLAGS="$CXXFLAGS -march=armv4" + CXXFLAGS="$CXXFLAGS -mtune=xscale" DEFINES="$DEFINES -D_WIN32_WCE=300" DEFINES="$DEFINES -D__ARM__" DEFINES="$DEFINES -D_ARM_" @@ -1818,7 +1868,8 @@ if test -n "$_host"; then case "$_host" in android | android-v7a) # we link a .so as default - LDFLAGS="$LDFLAGS -shared -Wl,-Bsymbolic,--no-undefined" + LDFLAGS="$LDFLAGS -shared" + LDFLAGS="$LDFLAGS -Wl,-Bsymbolic,--no-undefined" HOSTEXEPRE=lib HOSTEXEEXT=.so _backend="android" @@ -1846,7 +1897,8 @@ if test -n "$_host"; then # Use -O3 on the Caanoo for non-debug builds. CXXFLAGS="$CXXFLAGS -O3" fi - CXXFLAGS="$CXXFLAGS -mcpu=arm926ej-s -mtune=arm926ej-s" + CXXFLAGS="$CXXFLAGS -mcpu=arm926ej-s" + CXXFLAGS="$CXXFLAGS -mtune=arm926ej-s" ASFLAGS="$ASFLAGS" _backend="gph" _build_hq_scalers=no @@ -1865,7 +1917,8 @@ if test -n "$_host"; then DEFINES="$DEFINES -DDISABLE_DOSBOX_OPL" DEFINES="$DEFINES -DREDUCE_MEMORY_USAGE" ASFLAGS="$ASFLAGS" - CXXFLAGS="$CXXFLAGS -msoft-float -mips32" + CXXFLAGS="$CXXFLAGS -msoft-float" + CXXFLAGS="$CXXFLAGS -mips32" _backend="dingux" _mt32emu=no _vkeybd=yes @@ -1881,7 +1934,11 @@ if test -n "$_host"; then DEFINES="$DEFINES -DDISABLE_DEFAULT_SAVEFILEMANAGER" DEFINES="$DEFINES -DDISABLE_TEXT_CONSOLE" DEFINES="$DEFINES -DDISABLE_COMMAND_LINE" - CXXFLAGS="$CXXFLAGS -O3 -funroll-loops -fschedule-insns2 -fomit-frame-pointer -fdelete-null-pointer-checks" + CXXFLAGS="$CXXFLAGS -O3" + CXXFLAGS="$CXXFLAGS -funroll-loops" + CXXFLAGS="$CXXFLAGS -fschedule-insns2" + CXXFLAGS="$CXXFLAGS -fomit-frame-pointer" + CXXFLAGS="$CXXFLAGS -fdelete-null-pointer-checks" _backend="dc" _build_scalers=no _mad=yes @@ -1945,7 +2002,8 @@ if test -n "$_host"; then if test "$_debug_build" = yes; then DEFINES="$DEFINES -DGPH_DEBUG" fi - CXXFLAGS="$CXXFLAGS -mcpu=arm926ej-s -mtune=arm926ej-s" + CXXFLAGS="$CXXFLAGS -mcpu=arm926ej-s" + CXXFLAGS="$CXXFLAGS -mtune=arm926ej-s" ASFLAGS="$ASFLAGS -mfloat-abi=soft" _backend="gph" _build_hq_scalers=no @@ -1998,10 +2056,19 @@ if test -n "$_host"; then _port_mk="backends/platform/linuxmoto/linuxmoto.mk" ;; n64) - CXXFLAGS="$CXXFLAGS -mno-extern-sdata --param max-inline-insns-auto=20 -fomit-frame-pointer" - CXXFLAGS="$CXXFLAGS -march=vr4300 -mtune=vr4300 -mhard-float" - LDFLAGS="$LDFLAGS -march=vr4300 -mtune=vr4300 -nodefaultlibs -nostartfiles -mno-crt0" - LDFLAGS="$LDFLAGS -L$N64SDK/hkz-libn64 -L$N64SDK/lib" + CXXFLAGS="$CXXFLAGS -mno-extern-sdata" + CXXFLAGS="$CXXFLAGS --param max-inline-insns-auto=20" + CXXFLAGS="$CXXFLAGS -fomit-frame-pointer" + CXXFLAGS="$CXXFLAGS -march=vr4300" + CXXFLAGS="$CXXFLAGS -mtune=vr4300" + CXXFLAGS="$CXXFLAGS -mhard-float" + LDFLAGS="$LDFLAGS -march=vr4300" + LDFLAGS="$LDFLAGS -mtune=vr4300" + LDFLAGS="$LDFLAGS -nodefaultlibs" + LDFLAGS="$LDFLAGS -nostartfiles" + LDFLAGS="$LDFLAGS -mno-crt0" + LDFLAGS="$LDFLAGS -L$N64SDK/hkz-libn64" + LDFLAGS="$LDFLAGS -L$N64SDK/lib" LDFLAGS="$LDFLAGS -T n64ld_cpp.x -Xlinker -Map -Xlinker scummvm.map" _backend="n64" _mt32emu=no @@ -2033,7 +2100,9 @@ if test -n "$_host"; then # Use -O3 on the OpenPandora for non-debug builds. CXXFLAGS="$CXXFLAGS -O3" fi - CXXFLAGS="$CXXFLAGS -march=armv7-a -mtune=cortex-a8 -mfpu=neon" + CXXFLAGS="$CXXFLAGS -march=armv7-a" + CXXFLAGS="$CXXFLAGS -mtune=cortex-a8" + CXXFLAGS="$CXXFLAGS -mfpu=neon" ASFLAGS="$ASFLAGS -mfloat-abi=soft" _backend="openpandora" _build_hq_scalers=yes @@ -2069,7 +2138,9 @@ if test -n "$_host"; then DEFINES="$DEFINES -D__PS2_DEBUG__" #INCLUDES="$INCLUDES -I$(PS2GDB)/ee" #LDFLAGS="$LDFLAGS -L$(PS2GDB)/lib" - LDFLAGS="$LDFLAGS -lps2gdbStub -lps2ip -ldebug" + LDFLAGS="$LDFLAGS -lps2gdbStub" + LDFLAGS="$LDFLAGS -lps2ip" + LDFLAGS="$LDFLAGS -ldebug" else # If not building for debug mode, strip binaries. CXXFLAGS="$CXXFLAGS -s" @@ -2143,8 +2214,12 @@ case $_backend in DEFINES="$DEFINES -DREDUCE_MEMORY_USAGE" ;; dc) - INCLUDES="$INCLUDES "'-I$(srcdir)/backends/platform/dc -isystem $(ronindir)/include' - LDFLAGS="$LDFLAGS -Wl,-Ttext,0x8c010000 -nostartfiles "'$(ronindir)/lib/crt0.o -L$(ronindir)/lib' + INCLUDES="$INCLUDES "'-I$(srcdir)/backends/platform/dc' + INCLUDES="$INCLUDES "'-isystem $(ronindir)/include' + LDFLAGS="$LDFLAGS -Wl,-Ttext,0x8c010000" + LDFLAGS="$LDFLAGS -nostartfiles" + LDFLAGS="$LDFLAGS "'$(ronindir)/lib/crt0.o' + LDFLAGS="$LDFLAGS "'-L$(ronindir)/lib' LIBS="$LIBS -lronin -lm" ;; dingux) @@ -2161,7 +2236,9 @@ case $_backend in ;; iphone) OBJCFLAGS="$OBJCFLAGS --std=c99" - LIBS="$LIBS -lobjc -framework UIKit -framework CoreGraphics -framework OpenGLES -framework QuartzCore -framework GraphicsServices -framework CoreFoundation -framework Foundation -framework AudioToolbox -framework CoreAudio" + LIBS="$LIBS -lobjc -framework UIKit -framework CoreGraphics -framework OpenGLES" + LIBS="$LIBS -framework QuartzCore -framework GraphicsServices -framework CoreFoundation" + LIBS="$LIBS -framework Foundation -framework AudioToolbox -framework CoreAudio" ;; linuxmoto) DEFINES="$DEFINES -DLINUXMOTO" @@ -2171,7 +2248,8 @@ case $_backend in INCLUDES="$INCLUDES "'-I$(N64SDK)/mips64/include' INCLUDES="$INCLUDES "'-I$(N64SDK)/hkz-libn64' INCLUDES="$INCLUDES "'-I$(srcdir)/backends/platform/n64' - LIBS="$LIBS -lpakfs -lframfs -ln64 -ln64utils -lromfs -lm -lstdc++ -lc -lgcc -lz -lnosys" + LIBS="$LIBS -lpakfs -lframfs -ln64 -ln64utils -lromfs" + LIBS="$LIBS -lm -lstdc++ -lc -lgcc -lz -lnosys" ;; null) DEFINES="$DEFINES -DUSE_NULL_DRIVER" @@ -2181,22 +2259,30 @@ case $_backend in ps2) DEFINES="$DEFINES -D_EE" DEFINES="$DEFINES -DFORCE_RTL" - INCLUDES="$INCLUDES -I$PS2SDK/ee/include -I$PS2SDK/common/include -I$PS2SDK/ports/include" + INCLUDES="$INCLUDES -I$PS2SDK/ee/include" + INCLUDES="$INCLUDES -I$PS2SDK/common/include" + INCLUDES="$INCLUDES -I$PS2SDK/ports/include" if test "$_dynamic_modules" = no ; then - LDFLAGS="$LDFLAGS -mno-crt0 $PS2SDK/ee/startup/crt0.o -T $PS2SDK/ee/startup/linkfile" + LDFLAGS="$LDFLAGS -mno-crt0" + LDFLAGS="$LDFLAGS $PS2SDK/ee/startup/crt0.o" + LDFLAGS="$LDFLAGS -T $PS2SDK/ee/startup/linkfile" fi - LDFLAGS="$LDFLAGS -L$PS2SDK/ee/lib -L$PS2SDK/ports/lib" - LIBS="$LIBS -lmc -lpad -lmouse -lhdd -lpoweroff -lsjpcm -lm -lc -lfileXio -lkernel -lstdc++ " + LDFLAGS="$LDFLAGS -L$PS2SDK/ee/lib" + LDFLAGS="$LDFLAGS -L$PS2SDK/ports/lib" + LIBS="$LIBS -lmc -lpad -lmouse -lhdd -lpoweroff -lsjpcm" + LIBS="$LIBS -lm -lc -lfileXio -lkernel -lstdc++" ;; psp) DEFINES="$DEFINES -D__PSP__" DEFINES="$DEFINES -DDISABLE_COMMAND_LINE" DEFINES="$DEFINES -DDISABLE_DOSBOX_OPL" - LIBS="$LIBS -lpng -Wl,-Map,mapfile.txt" + LIBS="$LIBS -lpng" + LIBS="$LIBS -Wl,-Map,mapfile.txt" ;; samsungtv) DEFINES="$DEFINES -DSAMSUNGTV" - LDFLAGS="$LDFLAGS -shared -fpic" + LDFLAGS="$LDFLAGS -shared" + LDFLAGS="$LDFLAGS -fpic" ;; webos) # There is no sdl-config in the WebOS PDK so we don't use find_sdlconfig here. @@ -2218,7 +2304,12 @@ case $_backend in esac ;; wince) - INCLUDES="$INCLUDES "'-I$(srcdir) -I$(srcdir)/backends/platform/wince -I$(srcdir)/engines -I$(srcdir)/backends/platform/wince/missing/gcc -I$(srcdir)/backends/platform/wince/CEgui -I$(srcdir)/backends/platform/wince/CEkeys' + INCLUDES="$INCLUDES "'-I$(srcdir)' + INCLUDES="$INCLUDES "'-I$(srcdir)/backends/platform/wince' + INCLUDES="$INCLUDES "'-I$(srcdir)/engines' + INCLUDES="$INCLUDES "'-I$(srcdir)/backends/platform/wince/missing/gcc' + INCLUDES="$INCLUDES "'-I$(srcdir)/backends/platform/wince/CEgui' + INCLUDES="$INCLUDES "'-I$(srcdir)/backends/platform/wince/CEkeys' LIBS="$LIBS -static -lSDL" DEFINES="$DEFINES -DSDL_BACKEND" ;; -- cgit v1.2.3 From f7e94e90b67dd21058ede1ae69283592a88bed7d Mon Sep 17 00:00:00 2001 From: Max Horn Date: Mon, 30 May 2011 23:58:45 +0200 Subject: WINCE: Remove unnecessary -I flags --- configure | 3 --- 1 file changed, 3 deletions(-) (limited to 'configure') diff --git a/configure b/configure index 48216b62b1..299e9927aa 100755 --- a/configure +++ b/configure @@ -2304,10 +2304,7 @@ case $_backend in esac ;; wince) - INCLUDES="$INCLUDES "'-I$(srcdir)' INCLUDES="$INCLUDES "'-I$(srcdir)/backends/platform/wince' - INCLUDES="$INCLUDES "'-I$(srcdir)/engines' - INCLUDES="$INCLUDES "'-I$(srcdir)/backends/platform/wince/missing/gcc' INCLUDES="$INCLUDES "'-I$(srcdir)/backends/platform/wince/CEgui' INCLUDES="$INCLUDES "'-I$(srcdir)/backends/platform/wince/CEkeys' LIBS="$LIBS -static -lSDL" -- cgit v1.2.3 From 127a6f920a649e4f981ba6d3333dac516dfbb258 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Tue, 31 May 2011 00:25:40 +0200 Subject: BUILD: Add SDL_BACKEND=1 to config.mk for all SDL based backends --- configure | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'configure') diff --git a/configure b/configure index 299e9927aa..6ae3cce8b6 100755 --- a/configure +++ b/configure @@ -2287,8 +2287,9 @@ case $_backend in webos) # There is no sdl-config in the WebOS PDK so we don't use find_sdlconfig here. LIBS="$LIBS -lSDL" - DEFINES="$DEFINES -DSDL_BACKEND" DEFINES="$DEFINES -DWEBOS" + DEFINES="$DEFINES -DSDL_BACKEND" + add_line_to_config_mk "SDL_BACKEND = 1" MODULES="$MODULES backends/platform/sdl" ;; wii) @@ -2309,6 +2310,7 @@ case $_backend in INCLUDES="$INCLUDES "'-I$(srcdir)/backends/platform/wince/CEkeys' LIBS="$LIBS -static -lSDL" DEFINES="$DEFINES -DSDL_BACKEND" + add_line_to_config_mk "SDL_BACKEND = 1" ;; sdl) ;; @@ -2328,6 +2330,7 @@ case $_backend in INCLUDES="$INCLUDES `$_sdlconfig --prefix="$_sdlpath" --cflags`" LIBS="$LIBS `$_sdlconfig --prefix="$_sdlpath" --libs`" DEFINES="$DEFINES -DSDL_BACKEND" + add_line_to_config_mk "SDL_BACKEND = 1" ;; esac -- cgit v1.2.3 From 9c3a8cd3b5de4281167e4becb0846eebe23efee9 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Tue, 31 May 2011 00:35:27 +0200 Subject: BUILD: Compile more files only when necessary --- configure | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'configure') diff --git a/configure b/configure index 6ae3cce8b6..230db7bc6a 100755 --- a/configure +++ b/configure @@ -2571,14 +2571,13 @@ fi # # Set up some common plugin settings in config.h and config.mk, if enabled # +define_in_config_if_yes "$_dynamic_modules" 'DYNAMIC_MODULES' + if test "$_dynamic_modules" = yes ; then add_line_to_config_h "#define PLUGIN_PREFIX \"$_plugin_prefix\"" add_line_to_config_h "#define PLUGIN_SUFFIX \"$_plugin_suffix\"" add_line_to_config_mk "PLUGIN_PREFIX := $_plugin_prefix" add_line_to_config_mk "PLUGIN_SUFFIX := $_plugin_suffix" - - add_line_to_config_mk "DYNAMIC_MODULES := 1" - DEFINES="$DEFINES -DDYNAMIC_MODULES" fi @@ -3088,12 +3087,8 @@ define_in_config_if_yes $_nasm 'USE_NASM' # # Enable vkeybd / keymapper # -if test "$_vkeybd" = yes ; then - DEFINES="$DEFINES -DENABLE_VKEYBD" -fi -if test "$_keymapper" = yes ; then - DEFINES="$DEFINES -DENABLE_KEYMAPPER" -fi +define_in_config_if_yes $_vkeybd 'ENABLE_VKEYBD' +define_in_config_if_yes $_keymapper 'ENABLE_KEYMAPPER' # Check whether to build translation support # -- cgit v1.2.3 From c30904b48a1320ccc73fabea616a60ac314bc9f6 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Tue, 31 May 2011 12:22:26 +0200 Subject: BUILD: Fix typo which broke WebOS builds --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'configure') diff --git a/configure b/configure index 230db7bc6a..c8cb45554d 100755 --- a/configure +++ b/configure @@ -1816,7 +1816,7 @@ case $_host_os in # These compiler options are needed to support the Palm Pixi CXXFLAGS="$CXXFLAGS -mcpu=arm1136jf-s" CXXFLAGS="$CXXFLAGS -mfpu=vfp " - CXXFLAGS="$CXXFLAGS mfloat-abi=softfp" + CXXFLAGS="$CXXFLAGS -mfloat-abi=softfp" LDFLAGS="$LDFLAGS -L$WEBOS_PDK/device/lib" LDFLAGS="$LDFLAGS -L$WEBOS_PDK/device/usr/lib" LDFLAGS="$LDFLAGS -Wl,--allow-shlib-undefined" -- cgit v1.2.3 From 42fa23ff1626e3232ce6ec240dc93b119c079c60 Mon Sep 17 00:00:00 2001 From: Fabio Battaglia Date: Tue, 31 May 2011 15:15:19 +0200 Subject: CONFIGURE: move some libs required by n64 port Some system libs weren't found during link stage, this should fix it --- configure | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'configure') diff --git a/configure b/configure index c8cb45554d..fe5784caed 100755 --- a/configure +++ b/configure @@ -2249,7 +2249,7 @@ case $_backend in INCLUDES="$INCLUDES "'-I$(N64SDK)/hkz-libn64' INCLUDES="$INCLUDES "'-I$(srcdir)/backends/platform/n64' LIBS="$LIBS -lpakfs -lframfs -ln64 -ln64utils -lromfs" - LIBS="$LIBS -lm -lstdc++ -lc -lgcc -lz -lnosys" + LIBS="$LIBS -lm -lstdc++ -lz" ;; null) DEFINES="$DEFINES -DUSE_NULL_DRIVER" @@ -3208,6 +3208,11 @@ case $_backend in # than pick up anything unhygenic from the Android libs. LIBS="-Wl,-Bstatic $static_libs -Wl,-Bdynamic -lgcc $system_libs -llog -lGLESv1_CM" ;; + n64) + # Move some libs down here, otherwise some symbols requires by libvorbis aren't found + # during linking stage + LIBS="$LIBS -lc -lgcc -lnosys" + ;; esac -- cgit v1.2.3