Package: visualboyadvance
Severity: normal
Tags: patch
When building 'visualboyadvance' on amd64 with gcc-4.0,
I get the following error:
make[3]: Entering directory `/visualboyadvance-1.7.2/src/prof'
if g++ -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\"
-DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"VisualBoyAdvance\"
-DVERSION=\"1.7.2\" -DHAVE_LIBZ=1 -DHAVE_LIBPNG=1 -DHAVE_LIBPTHREAD=1
-DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1
-DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1
-DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_MALLOC_H=1 -DHAVE_STRINGS_H=1
-DHAVE_UNISTD_H=1 -DHAVE_ARPA_INET_H=1 -DHAVE_NETINET_IN_H=1 -I. -I. -g
-O2 -DC_CORE -DPROFILING -DDEV_VERSION -MT prof.o -MD -MP -MF ".deps/prof.Tpo" \
-c -o prof.o `test -f 'prof.cpp' || echo './'`prof.cpp; \
then mv -f ".deps/prof.Tpo" ".deps/prof.Po"; \
else rm -f ".deps/prof.Tpo"; exit 1; \
fi
prof.cpp: In function 'void profCleanup()':
prof.cpp:269: error: cast from 'char*' to 'u32' loses precision
make[3]: *** [prof.o] Error 1
make[3]: Leaving directory `/visualboyadvance-1.7.2/src/prof'
With the attached patch 'visualboyadvance' can be compiled
on amd64 using gcc-4.0.
Regards
Andreas Jochens
diff -urN ../tmp-orig/visualboyadvance-1.7.2/src/sdl/debugger.cpp
./src/sdl/debugger.cpp
--- ../tmp-orig/visualboyadvance-1.7.2/src/sdl/debugger.cpp 2004-05-13
16:13:14.000000000 +0200
+++ ./src/sdl/debugger.cpp 2005-03-21 21:57:06.000000000 +0100
@@ -950,9 +950,9 @@
{
u32 address = 0;
if(mem >= (u32*)&workRAM[0] && mem <= (u32*)&workRAM[0x3ffff])
- address = 0x2000000 + ((u32)mem - (u32)&workRAM[0]);
+ address = 0x2000000 + ((unsigned long)mem - (unsigned long)&workRAM[0]);
else
- address = 0x3000000 + ((u32)mem - (u32)&internalRAM[0]);
+ address = 0x3000000 + ((unsigned long)mem - (unsigned
long)&internalRAM[0]);
if(size == 2)
printf("Breakpoint (on write) address %08x old:%08x new:%08x\n",
diff -urN ../tmp-orig/visualboyadvance-1.7.2/src/prof/prof.cpp
./src/prof/prof.cpp
--- ../tmp-orig/visualboyadvance-1.7.2/src/prof/prof.cpp 2004-05-13
16:31:58.000000000 +0200
+++ ./src/prof/prof.cpp 2005-03-21 21:56:27.000000000 +0100
@@ -266,7 +266,7 @@
for (toindex=froms[fromindex]; toindex!=0; toindex=tos[toindex].link) {
if(profWrite8(fd, GMON_TAG_CG_ARC) ||
profWrite32(fd, (u32)frompc) ||
- profWrite32(fd, (u32)tos[toindex].selfpc) ||
+ profWrite32(fd, (unsigned long)tos[toindex].selfpc) ||
profWrite32(fd, tos[toindex].count)) {
systemMessage(0, "mcount: arc");
fclose(fd);
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]