[Ffmpeg-devel] proposed configure patch for better detection of cross-platform compilers
Wed Mar 8 12:14:35 CET 2006
On Tue, Mar 07, 2006 at 12:37:47AM +0200, Panayotis Katsaloulis wrote:
> The idea is this:
> The script is trying originally to find out if the user wants to use a
> cross platform enviromnet. If it doesn't then the script checks if the
> current system is big endian or not.
> If it does it performs a wild guess whether the target environment is
> cross platform or not.
> Up to this point everyting is OK.
> The error is in the way the script tries to guess if a cross platform
> development environment is used. The method is "optimized" only for
> the mingw compiler (as much as I could understand). It only checks if
> there is a cross prefix or not.
> Unfortunately it ignores the more common argument "-arch" of GCC. So,
> if someone wants to build a cross platform executable in a
> endian-different environment, the build is succesfull but the produced
> binary is wrong.
> ** What I am proposing **
> Since this test only checks for the endianess of the target platform,
> if the target platform is different than the "required" one, then just
> go for the wild guess. Only if the cpu equals the current cpu perform
> the actual test.
> Since x86 is little endian and the default is little endian, I suspect
> this approach is somewhat safe.
> On the other hand I could have made a more sophisticated patch which
> deals more properly with this issue (checking if really a cross
> platform is used, with more variables dedicated for this issue or even
> a new config parameter) but this I thought might be less acceptable.
> What do you think about it?
I welcome a patch that fixes cross-compilation, I agree that it has
problems at the moment. What you suggested cannot work, though. I
invite you to come up with a more sophisticated patch, I will review it
and apply it if I believe it will work and is better than what we
More information about the ffmpeg-devel