[Scummvm-cvs-logs] SF.net SVN: scummvm:[45037] scummvm/trunk/configure

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Tue Oct 13 20:51:14 CEST 2009


Revision: 45037
          http://scummvm.svn.sourceforge.net/scummvm/?rev=45037&view=rev
Author:   fingolfin
Date:     2009-10-13 18:51:14 +0000 (Tue, 13 Oct 2009)

Log Message:
-----------
BUILD: Don't set endianes & data types explicitly, rely on auto-detection

The auto-detection code *does* work for cross compilers, too. So it
should never be necessary to explicitly set _endian or type_1_byte etc..
But if for some reason this does not work correctly on your port, and
you have to re-add the explicit settings, please make sure to clearly
document this with a comment.

Note: Several ports set type_4_byte='long'. I added FIXME comments to
each code, asking porters to document the reason why 'long' must be used
instead 'int' resp. instead of the auto-detected type.

Modified Paths:
--------------
    scummvm/trunk/configure

Modified: scummvm/trunk/configure
===================================================================
--- scummvm/trunk/configure	2009-10-13 18:50:46 UTC (rev 45036)
+++ scummvm/trunk/configure	2009-10-13 18:51:14 UTC (rev 45037)
@@ -1230,8 +1230,7 @@
 		CFLAGS="-I/boot/home/config/include"
 		CXXFLAGS="$CXXFLAGS -fhuge-objects"
 		LIBS="$LIBS -lbind -lsocket"
-		type_1_byte='char'
-		type_2_byte='short'
+		# FIXME: Please document why 'long' has to be used instead of int
 		type_4_byte='long'
 		;;
 	haiku*)
@@ -1239,8 +1238,7 @@
 		# Needs -lnetwork for the timidity MIDI driver
 		LIBS="$LIBS -lnetwork"
 		CXXFLAGS="$CXXFLAGS -fhuge-objects"
-		type_1_byte='char'
-		type_2_byte='short'
+		# FIXME: Please document why 'long' has to be used instead of int
 		type_4_byte='long'
 		;;
 	solaris*)
@@ -1275,8 +1273,7 @@
 	amigaos*)
 		CXXFLAGS="$CXXFLAGS -mcrt=newlib -mstrict-align -mcpu=750 -mtune=7400"
 		LDFLAGS="$LDFLAGS -mcrt=newlib -use-dynld -Lsobjs:"
-		type_1_byte='char'
-		type_2_byte='short'
+		# FIXME: Please document why 'long' has to be used instead of int
 		type_4_byte='long'
 		;;
 	dreamcast)
@@ -1322,34 +1319,20 @@
 		linupy|arm-riscos)
 			echo "Cross-compiling to $_host, forcing endianness, alignment and type sizes"
 			DEFINES="$DEFINES -DUNIX -DLINUPY"
-			_endian=little
 			_need_memalign=yes
-			type_1_byte='char'
-			type_2_byte='short'
-			type_4_byte='int'
 			;;
 		arm-linux|arm*-linux-gnueabi|arm-*-linux|*-angstrom-linux)
 			echo "Cross-compiling to $_host, forcing endianness, alignment and type sizes"
 			DEFINES="$DEFINES -DUNIX"
-			#not true for all ARM systems, but the interesting ones are all LE. Most (if not all) BE arm devices don't have a screen
-			_endian=little
 			_need_memalign=yes
-			type_1_byte='char'
-			type_2_byte='short'
-			type_4_byte='int'
 			add_line_to_config_mk 'USE_ARM_SOUND_ASM = 1'
 			add_line_to_config_mk 'USE_ARM_SMUSH_ASM = 1'
 			;;
 		motoezx)
 			echo "Cross-compiling to $_host, forcing endianness, alignment and type sizes"
 			DEFINES="$DEFINES -DUNIX -DMOTOEZX"
-			#not true for all ARM systems, but the interesting ones are all LE. Most (if not all) BE arm devices don't have a screen
 			ASFLAGS="$ASFLAGS -mfpu=vfp"
-			_endian=little
 			_need_memalign=yes
-			type_1_byte='char'
-			type_2_byte='short'
-			type_4_byte='int'
 			add_line_to_config_mk 'USE_ARM_SOUND_ASM = 1'
 			add_line_to_config_mk 'USE_ARM_SMUSH_ASM = 1'
 			add_line_to_config_mk 'USE_ARM_GFX_ASM = 1'
@@ -1363,13 +1346,8 @@
 		motomagx)
 			echo "Cross-compiling to $_host, forcing endianness, alignment and type sizes"
 			DEFINES="$DEFINES -DUNIX -DMOTOMAGX"
-			#not true for all ARM systems, but the interesting ones are all LE. Most (if not all) BE arm devices don't have a screen
 			ASFLAGS="$ASFLAGS -mfpu=vfp"
-			_endian=little
 			_need_memalign=yes
-			type_1_byte='char'
-			type_2_byte='short'
-			type_4_byte='int'
 			add_line_to_config_mk 'USE_ARM_SOUND_ASM = 1'
 			add_line_to_config_mk 'USE_ARM_SMUSH_ASM = 1'
 			add_line_to_config_mk 'USE_ARM_GFX_ASM = 1'
@@ -1392,11 +1370,7 @@
 			DEFINES="$DEFINES -DUNIX -DGP2XWIZ -DNDEBUG"
 			CXXFLAGS="$CXXFLAGS -mcpu=arm926ej-s -mtune=arm926ej-s"
 			LDFLAGS="$LDFLAGS"
-			_endian=little
 			_need_memalign=yes
-			type_1_byte='char'
-			type_2_byte='short'
-			type_4_byte='int'
 			add_line_to_config_mk 'USE_ARM_SOUND_ASM = 1'
 			add_line_to_config_mk 'USE_ARM_SMUSH_ASM = 1'
 			add_line_to_config_mk 'USE_ARM_GFX_ASM = 1'
@@ -1412,11 +1386,7 @@
 			CXXFLAGS="$CXXFLAGS -march=armv4t"
 			ASFLAGS="$ASFLAGS -mfloat-abi=soft"
 			LDFLAGS="$LDFLAGS -static"
-			_endian=little
 			_need_memalign=yes
-			type_1_byte='char'
-			type_2_byte='short'
-			type_4_byte='int'
 			add_line_to_config_mk 'USE_ARM_SOUND_ASM = 1'
 			add_line_to_config_mk 'USE_ARM_SMUSH_ASM = 1'
 			add_line_to_config_mk 'USE_ARM_GFX_ASM = 1'
@@ -1429,11 +1399,7 @@
 		neuros)
 			echo "Cross-compiling to $_host, forcing endianness, alignment and type sizes"
 			DEFINES="$DEFINES -DUNIX -DNEUROS"
-			_endian=little
 			_need_memalign=yes
-			type_1_byte='char'
-			type_2_byte='short'
-			type_4_byte='int'
 			_backend='null'
 			_build_hq_scalers="no"
 			_mt32emu="no"
@@ -1442,8 +1408,7 @@
 			echo "Cross-compiling to $_host, forcing endianness, alignment and type sizes"
 			_endian=big
 			_need_memalign=yes
-			type_1_byte='char'
-			type_2_byte='short'
+			# FIXME: Please document why 'long' has to be used instead of int
 			type_4_byte='long'
 			;;
 		m68k-atari-mint)
@@ -1451,18 +1416,13 @@
 			DEFINES="$DEFINES -DUNIX -DSYSTEM_NOT_SUPPORTING_D_TYPE"
 			_endian=big
 			_need_memalign=yes
-			type_1_byte='char'
-			type_2_byte='short'
+			# FIXME: Please document why 'long' has to be used instead of int
 			type_4_byte='long'
 			_ranlib=m68k-atari-mint-ranlib
 			_ar="m68k-atari-mint-ar cru"
 			;;
 		*mingw32*)
 			echo "Cross-compiling to $_host, forcing endianness, alignment and type sizes"
-			_endian=little
-			type_1_byte='char'
-			type_2_byte='short'
-			type_4_byte='int'
 			_sdlconfig=$_host-sdl-config
 			_windres=$_host-windres
 			_ar="$_host-ar cru"
@@ -1471,11 +1431,7 @@
 		iphone)
 			echo "Cross-compiling to $_host, forcing endianness, alignment and type sizes"
 			DEFINES="$DEFINES -DIPHONE -DUNIX"
-			_endian=little
 			_need_memalign=yes
-			type_1_byte='char'
-			type_2_byte='short'
-			type_4_byte='int'
 			add_line_to_config_mk 'USE_ARM_SOUND_ASM = 1'
 			add_line_to_config_mk 'USE_ARM_SMUSH_ASM = 1'
 			_backend="iphone"
@@ -1484,11 +1440,7 @@
 		wince)
 			echo "Cross-compiling to $_host, forcing endianness, alignment and type sizes"
 			LDFLAGS="$LDFLAGS -Wl,-Map,scummvm.exe.map -Wl,--stack,65536"
-			_endian=little
 			_need_memalign=yes
-			type_1_byte='char'
-			type_2_byte='short'
-			type_4_byte='int'
 			add_line_to_config_mk 'USE_TREMOLO = 1'
 			add_line_to_config_mk 'USE_ARM_SOUND_ASM = 1'
 			add_line_to_config_mk 'USE_ARM_SMUSH_ASM = 1'
@@ -1503,11 +1455,7 @@
 			echo "Cross-compiling to $_host, forcing endianness, alignment and type sizes"
 			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"
-			_endian=little
 			_need_memalign=yes
-			type_1_byte='char'
-			type_2_byte='short'
-			type_4_byte='int'
 			_backend="dc"
 			_build_scalers="no"
 			_build_hq_scalers="no"
@@ -1519,9 +1467,6 @@
 			echo "Cross-compiling to $_host, forcing endianness, alignment and type sizes"
 			_endian=big
 			_need_memalign=yes
-			type_1_byte='char'
-			type_2_byte='short'
-			type_4_byte='int'
 			_backend="wii"
 			_build_scalers="no"
 			_build_hq_scalers="no"
@@ -1538,9 +1483,6 @@
 			echo "Cross-compiling to $_host, forcing endianness, alignment and type sizes"
 			_endian=big
 			_need_memalign=yes
-			type_1_byte='char'
-			type_2_byte='short'
-			type_4_byte='int'
 			_backend="wii"
 			_build_scalers="no"
 			_build_hq_scalers="no"
@@ -1560,11 +1502,7 @@
 			DEFINES="$DEFINES -DDISABLE_DEFAULT_SAVEFILEMANAGER"
 			DEFINES="$DEFINES -DREDUCE_MEMORY_USAGE"
 			DEFINES="$DEFINES -DDISABLE_TEXT_CONSOLE -DDISABLE_COMMAND_LINE"
-			_endian=little
 			_need_memalign=yes
-			type_1_byte='char'
-			type_2_byte='short'
-			type_4_byte='int'
 			_backend="nds"
 			_build_hq_scalers="no"
 			_mt32emu="no"
@@ -1575,11 +1513,7 @@
 			;;
 		psp)
 			echo "Cross-compiling to $_host, forcing endianness, alignment and type sizes"
-			_endian=little
 			_need_memalign=yes
-			type_1_byte='char'
-			type_2_byte='short'
-			type_4_byte='int'
 			_backend="psp"
 			_build_scalers="no"
 			_build_hq_scalers="no"
@@ -1589,11 +1523,7 @@
 		ps2)
 			echo "Cross-compiling to $_host, forcing endianness, alignment and type sizes"
 			# TODO: complete this
-			_endian=little
 			_need_memalign=yes
-			type_1_byte='char'
-			type_2_byte='short'
-			type_4_byte='int'
 			_backend="ps2"
 			_build_scalers="no"
 			_build_hq_scalers="no"


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list