[Scummvm-cvs-logs] SF.net SVN: scummvm:[39309] scummvm/trunk/sound/softsynth/mt32
dhewg at users.sourceforge.net
dhewg at users.sourceforge.net
Tue Mar 10 20:32:38 CET 2009
Revision: 39309
http://scummvm.svn.sourceforge.net/scummvm/?rev=39309&view=rev
Author: dhewg
Date: 2009-03-10 19:32:38 +0000 (Tue, 10 Mar 2009)
Log Message:
-----------
Use pow() instead of powf() when compiling with MinGW32 to work around a libstdc++ cross-compile bug, see #2673362
Modified Paths:
--------------
scummvm/trunk/sound/softsynth/mt32/partial.cpp
scummvm/trunk/sound/softsynth/mt32/synth.cpp
scummvm/trunk/sound/softsynth/mt32/tables.cpp
Modified: scummvm/trunk/sound/softsynth/mt32/partial.cpp
===================================================================
--- scummvm/trunk/sound/softsynth/mt32/partial.cpp 2009-03-10 19:20:32 UTC (rev 39308)
+++ scummvm/trunk/sound/softsynth/mt32/partial.cpp 2009-03-10 19:32:38 UTC (rev 39309)
@@ -25,11 +25,14 @@
#include "mt32emu.h"
-#if defined(MACOSX) || defined(SOLARIS)
+#if defined(MACOSX) || defined(SOLARIS) || defined(__MINGW32__)
// Older versions of Mac OS X didn't supply a powf function, so using it
// will cause a binary incompatibility when trying to run a binary built
// on a newer OS X release on an olderr one. And Solaris 8 doesn't provide
// powf, floorf, fabsf etc. at all.
+// Cross-compiled MinGW32 toolchains suffer from a cross-compile bug in
+// libstdc++. math/stubs.o should be empty, but it comes with a symbol for
+// powf, resulting in a linker error because of multiple definitions.
// Hence we re-define them here. The only potential drawback is that it
// might be a little bit slower this way.
#define powf pow
Modified: scummvm/trunk/sound/softsynth/mt32/synth.cpp
===================================================================
--- scummvm/trunk/sound/softsynth/mt32/synth.cpp 2009-03-10 19:20:32 UTC (rev 39308)
+++ scummvm/trunk/sound/softsynth/mt32/synth.cpp 2009-03-10 19:32:38 UTC (rev 39309)
@@ -25,11 +25,14 @@
#include "mt32emu.h"
-#if defined(MACOSX) || defined(SOLARIS)
+#if defined(MACOSX) || defined(SOLARIS) || defined(__MINGW32__)
// Older versions of Mac OS X didn't supply a powf function, so using it
// will cause a binary incompatibility when trying to run a binary built
// on a newer OS X release on an olderr one. And Solaris 8 doesn't provide
// powf, floorf, fabsf etc. at all.
+// Cross-compiled MinGW32 toolchains suffer from a cross-compile bug in
+// libstdc++. math/stubs.o should be empty, but it comes with a symbol for
+// powf, resulting in a linker error because of multiple definitions.
// Hence we re-define them here. The only potential drawback is that it
// might be a little bit slower this way.
#define powf pow
Modified: scummvm/trunk/sound/softsynth/mt32/tables.cpp
===================================================================
--- scummvm/trunk/sound/softsynth/mt32/tables.cpp 2009-03-10 19:20:32 UTC (rev 39308)
+++ scummvm/trunk/sound/softsynth/mt32/tables.cpp 2009-03-10 19:32:38 UTC (rev 39309)
@@ -25,11 +25,14 @@
#include "mt32emu.h"
-#if defined(MACOSX) || defined(SOLARIS)
+#if defined(MACOSX) || defined(SOLARIS) || defined(__MINGW32__)
// Older versions of Mac OS X didn't supply a powf function, so using it
// will cause a binary incompatibility when trying to run a binary built
// on a newer OS X release on an olderr one. And Solaris 8 doesn't provide
// powf, floorf, fabsf etc. at all.
+// Cross-compiled MinGW32 toolchains suffer from a cross-compile bug in
+// libstdc++. math/stubs.o should be empty, but it comes with a symbol for
+// powf, resulting in a linker error because of multiple definitions.
// Hence we re-define them here. The only potential drawback is that it
// might be a little bit slower this way.
#define powf pow
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