[Scummvm-devel] ScummVM goes buildbot

Max Horn max at quendi.de
Wed Mar 18 22:36:43 CET 2009


Hi Marcus, hi Andrea,


Am 18.03.2009 um 14:15 schrieb Marcus Comstedt:

>
> Max Horn <max at quendi.de> writes:
>
>> Actually, you can just set _host to sh-elf, and it should find your
>> compiler: We do look for $_host-g++, too.
>
> Yes, but I would prefer $_host to be "dreamcast", since
>
> ./configure --host=dreamcast
>
> makes much more sense than
>
> ./configure --host=sh-elf

Agreed. Same for the wii & gamecube.

[...]

>>
>> If it makes you feel better, we can rename _host_os to  
>> _host_sys. :-).
>
> Well, the name of the variable isn't really the issue.  The issue
> is that the same variable is used to determine both the name of the
> compiler, and e.g. dynamic plugin configuration (which depends on the
> port rather than on the compiler).

The idea is that the plugin system depends on the "host_os", and I  
think that is a valid assumption. The name of the compiler does not  
just depend on the same variable, though -- rather, we provide a  
default list of "typical" compiler names, and it just so happens that  
CPU-OS-g++ is a typical name for GCC variants ;).

So, we could allow adding more compiler names to the list of compiler  
candidates. E.g. by adding a new _host_compiler variable (better name  
pending), defaulting to empty, and then replace

	compilers="$CXX $_host_cpu-$_host_os-g++ $_host_cpu-$_host_os-c++  
$_host-g++ $_host-c++"

by

	compilers="$CXX $_host_cpu-$_host_os-g++ $_host_cpu-$_host_os-c++  
$_host-g++ $_host-c++ $_host_compiler"


> However, instead of griping about it, I guess I should suggest a
> solution.  :-)

*g*


> How about we introduce a new variable $_host_alias which is used
> instead of $_host_cpu-$_host_os in $compilers, but which is initially
> set to $_host_cpu-$_host_os?  Then I can modify $_host_alias to be
> "sh-elf", while still using a more specific value for $_host_os (or
> $_host_sys or whatever it should be called :).

I could live with it, although I find "host_alias" not much less  
confusing. I guess I'd prefer the approach above; or alternatively  
(resp. in addition, this is not mutually exclusive) this approach:  
Introduce a new _host_desc / _host_name variable. Set that to whatever  
you want, defaulting to the value of _host. Then, in the "case"  
statement in line 820ff, have code like this:

case $_host in
dreamcast)
	_host=sh-elf
	_host_desc=dreamcast
	_host_os=dreamcast
	_host_cpu=sh
	;;

and later on, whenever we print _host to the user, print _host_desc  
instead.


This is still not ideal, all in all the whole configure script could  
stand some cleanup (mostly reordering and regrouping stuff in a more  
logical fashion, and sprinkling in some comments).


Cheers,
Max





More information about the Scummvm-devel mailing list