[Scummvm-devel] Clarifying & cleaning configure's cross-compiling craziness

Max Horn max at quendi.de
Wed May 4 14:38:09 CEST 2011


Hi there,

recently I did a bunch of cross-compilations (on buildbot, with the already setup cross compiler chains there). In particular, to look at the WebOS port, and also to work on cleaning up the recent "forbidden symbols" compile regressions.

That lead me to once more look at (and edit) parts of our configure script, which made me realize (once more ;) how messy parts of that are these days (though overall, it is in a pretty good shape, IMHO, thanks to the great work of some people here :). Anyway, I went through the file and created this GIST in the process: <https://gist.github.com/955116>.


My main concern is that we have three major sections (and several minor ones) which are involved in setting CXXFLAGS, LDFLAGS, DEFINES, LIBS etc.. I dubbed these three sections A, B, and C, which in turn do stuff depending on the values of _host, _host_os resp. _backend. Looking at this and comparing what settings are placed where for each port, one quickly realizes that the placement seems to be mostly based on guessing / trial and error. In addition, section C comes way to the end, after libs have been detected, meaning that many settings must be set earlier (even if they logically depend on the backend, not the host os / host) in order to enable automated library detection.

Anyway, would be nice to address this as well as various other quirks in configure. Foremost, I would like to move section C up to right after section B (which in turn follows right after section A). Then come up with a guide on what kind of settings should be made where, and adapt all ports to that.

Some other things need to be addressed. E.g. some ports hardcode endian settings for no discernible reason -- specifically, gamecube, m68k-atari-mint, mips-sgi, ppc-amigaos, wii. My hope is that each of these can actually be removed -- but if some can't be, then the responsible porters really *must* report why the automated check fails; then we can either address this and fix it, *or* we hardcode the endianess, but then there *must* be a comment explaining the reasons. I will remove any hardcoded endianess assumptions which are not justified by a comment.


Well, there is more, but just take a glance at the gist <https://gist.github.com/955116>, search for "TODO", and then reply to this email if you like.


Cheers,
Max



More information about the Scummvm-devel mailing list