[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [MiNT] gcc-4.2.2-mint-20080127
Finally, I added the patches provided by MiKRO for compiling GCC 4.2.2
natively with GCC 2.95.3. I didn't include the patch for libstdc++-v3 about
strtof() and strtold(), because it works well with the cross-compiler, and I
wasn't able to reproduce the problem natively because of big memory problems.
Of course, I will include it if it is really necessary.
I think the patch is needed when bootstrapping from native GCC 2.95.3, and
thats the only time.
Keith, you said recently that the "thunk" problem was still here. Could you
tell me how to reproduce it ?
Other than building pieces of the ScummVM source tree, I lack the C++
knowledge to really know how to reproduce this problem. In my own version
of GCC 4.1.2, I fixed the problem in mint.h with:
/* This is the assembler directive to equate two values. */
/* Fix for setlTHUNK ?
#undef SET_ASM_OP
#define SET_ASM_OP ".set"
*/
The assembly that was being created was incorrect, and that solved the
problem. It was a basic hack. From a very quick test, that does not
solve the problem this time.
Here is a sample of an error:
sound/libsound.a(ym2612.o): In function
`MidiDriver_Emulated::MidiDriver_Emulated(Audio::Mixer*)':
/home/Keith/scummvm-build/../scummvm/sound/softsynth/emumidi.h:60:
multiple definition of `non-virtual thunk to MidiDriver_Emulated::open()'
sound/libsound.a(adlib.o):
/home/Keith/scummvm-build/../scummvm/sound/softsynth/emumidi.h:60: first defined here
From that it looks like there is unhappiness with the fact that both
'Adlib' and 'YM2612' (both ScummVM sound drivers) are using the include
emumidi.h to define a common open for the class? (method?)
MidiDriver_emulated::open(). My limited understanding of C++is that this
is fine because in both instances MidiDriver_emulated::open() would be
created as a subclass under Adlib and also under YM2612.
I can see if I can deconstruct the code enough (and get enough
understanding) to create a test case. Now, this code does compile with
GCC 3.3.6, my 4.1.2, and is happy with 2.95.3 (but ScummVM overall is no
longer buildable with the older GCC). Does any of this make sense?
On a side note, I have gotten Maelstrom (another game written in C++ and
using SDL) to work with the new (previous patch) utilities. It runs in
MiNT, and crashes (with error message) in TOS, but its a porting problem
(can't locate files correctly, still working on that), so the binary is
executing! Previously it just always crashed in TOS with error 35, or
froze the machine.
Keith