Skip to contentSkip to conversation

latest svn sparc-softmmu compile warnings

Qemu-devel Robert Reif 3 participants 9 messages Sep 29, 2008

lore
Share & tools
lore
#0 lore raw

gcc -I. -I.. -I/home/wine/qemu/target-sparc -I/home/wine/qemu -MMD -MT tcg/tcg-dyngen.o -MP -DNEED_CPU_H -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I/home/wine/qemu/tcg -I/home/wine/qemu/tcg/i386 -I/home/wine/qemu/fpu -I/home/wine/qemu/slirp -O2 -g -fno-strict-aliasing -Wall -Wundef -Wendif-labels -Wwrite-strings -m32 -c -o tcg/tcg-dyngen.o /home/wine/qemu/tcg/tcg-dyngen.c In file included from /home/wine/qemu/tcg/tcg.h:50,

                from /home/wine/qemu/tcg/tcg-dyngen.c:34:

/home/wine/qemu/tcg/tcg-opc.h:154:5: warning: "TARGET_LONG_BITS" is not defined
/home/wine/qemu/tcg/tcg-opc.h:164:5: warning: "TARGET_LONG_BITS" is not defined
/home/wine/qemu/tcg/tcg-opc.h:169:5: warning: "TARGET_LONG_BITS" is not defined
/home/wine/qemu/tcg/tcg-opc.h:174:5: warning: "TARGET_LONG_BITS" is not defined
/home/wine/qemu/tcg/tcg-opc.h:179:5: warning: "TARGET_LONG_BITS" is not defined
/home/wine/qemu/tcg/tcg-opc.h:184:5: warning: "TARGET_LONG_BITS" is not defined
/home/wine/qemu/tcg/tcg-opc.h:189:5: warning: "TARGET_LONG_BITS" is not defined
/home/wine/qemu/tcg/tcg-opc.h:194:5: warning: "TARGET_LONG_BITS" is not defined
/home/wine/qemu/tcg/tcg-opc.h:200:5: warning: "TARGET_LONG_BITS" is not defined
/home/wine/qemu/tcg/tcg-opc.h:205:5: warning: "TARGET_LONG_BITS" is not defined
/home/wine/qemu/tcg/tcg-opc.h:210:5: warning: "TARGET_LONG_BITS" is not defined
/home/wine/qemu/tcg/tcg-opc.h:215:5: warning: "TARGET_LONG_BITS" is not defined
gcc -I. -I.. -I/home/wine/qemu/target-sparc -I/home/wine/qemu -MMD -MT tcg/tcg-runtime.o -MP -DNEED_CPU_H -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I/home/wine/qemu/tcg -I/home/wine/qemu/tcg/i386 -I/home/wine/qemu/fpu -I/home/wine/qemu/slirp -O2 -g -fno-strict-aliasing -Wall -Wundef -Wendif-labels -Wwrite-strings -m32 -c -o tcg/tcg-runtime.o /home/wine/qemu/tcg/tcg-runtime.c In file included from /home/wine/qemu/tcg/tcg.h:50,

                from /home/wine/qemu/tcg/tcg-runtime.c:32:

/home/wine/qemu/tcg/tcg-opc.h:154:5: warning: "TARGET_LONG_BITS" is not defined /home/wine/qemu/tcg/tcg-opc.h:164:5: warning: "TARGET_LONG_BITS" is not defined /home/wine/qemu/tcg/tcg-opc.h:169:5: warning: "TARGET_LONG_BITS" is not defined /home/wine/qemu/tcg/tcg-opc.h:174:5: warning: "TARGET_LONG_BITS" is not defined /home/wine/qemu/tcg/tcg-opc.h:179:5: warning: "TARGET_LONG_BITS" is not defined /home/wine/qemu/tcg/tcg-opc.h:184:5: warning: "TARGET_LONG_BITS" is not defined /home/wine/qemu/tcg/tcg-opc.h:189:5: warning: "TARGET_LONG_BITS" is not defined /home/wine/qemu/tcg/tcg-opc.h:194:5: warning: "TARGET_LONG_BITS" is not defined /home/wine/qemu/tcg/tcg-opc.h:200:5: warning: "TARGET_LONG_BITS" is not defined /home/wine/qemu/tcg/tcg-opc.h:205:5: warning: "TARGET_LONG_BITS" is not defined /home/wine/qemu/tcg/tcg-opc.h:210:5: warning: "TARGET_LONG_BITS" is not defined /home/wine/qemu/tcg/tcg-opc.h:215:5: warning: "TARGET_LONG_BITS" is not defined

#1 lore raw

Never mind. Seems to be fixed in latest svn.

#2 lore raw
Quoted 4 lines · Robert Reif

Never mind. Seems to be fixed in latest svn.

Still get this on i586 host for tcg-dyngen.c on i586, arm, cris, m68k...

#3 lore raw
In reply to Robert Reif
Quoted 4 lines · Robert Reif

Never mind. Seems to be fixed in latest svn.

Still get this on i586 host for tcg-dyngen.c on i586, arm, cris, m68k.... Using svn trunk -r 5349 here. host os openSUSE 11.0, kernel headers host 2.6.25.

#4 lore raw
Quoted 3 lines · Martin Mohring

Still get this on i586 host for tcg-dyngen.c on i586, arm, cris, m68k.... Using svn trunk -r 5349 here. host os openSUSE 11.0, kernel headers host 2.6.25.

It turns out patch 5174 introduced this warning.

The following patch fixes it but I don't know if its the best way to fix it.

tcg.h +1 -0
Index: tcg/tcg.h
===================================================================
@@ -22,6 +22,7 @@
  * THE SOFTWARE.
  */
 #include "tcg-target.h"
+#include "cpu.h"
 
 #if TCG_TARGET_REG_BITS == 32
 typedef int32_t tcg_target_long;
#5 lore raw
Quoted 9 lines · Robert Reif
Quoted 5 lines · Martin Mohring

Still get this on i586 host for tcg-dyngen.c on i586, arm, cris, m68k.... Using svn trunk -r 5349 here. host os openSUSE 11.0, kernel headers host 2.6.25.

It turns out patch 5174 introduced this warning.
The following patch fixes it but I don't know if its the best way to fix it.

Yes, now on openSUSE 11.0 the warning is gone. But now I get a compilation error on Fedora 8/i586 host (I am doing both, Fedora 8 and openSUSE 11.0) with that fix:

gcc -I. -I.. -I/usr/src/packages/BUILD/qemu-0.9.2svn5349/target-ppc -I/usr/src/packages/BUILD/qemu-0.9.2svn5349 -MMD -MT tcg/tcg-dyngen.o -MP -DNEED_CPU_H -D_GNU_SOUR
CE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I/usr/src/packages/BUILD/qemu-0.9.2svn5349/tcg -I/usr/src/packages/BUILD/qemu-0.9.2svn5349/tcg/x86_64 -I/usr/src/packag es/BUILD/qemu-0.9.2svn5349/fpu -DHAS_AUDIO -DHAS_AUDIO_CHOICE -I/usr/src/packages/BUILD/qemu-0.9.2svn5349/slirp -fno-strict-aliasing -O2 -g -fno-strict-aliasing -Wal
l -Wundef -Wendif-labels -Wwrite-strings -m64 -c -o tcg/tcg-dyngen.o /usr/src/packages/BUILD/qemu-0.9.2svn5349/tcg/tcg-dyngen.c
In file included from /usr/src/packages/BUILD/qemu-0.9.2svn5349/tcg/tcg-dyngen.c:418:
./op.h: In function 'dyngen_op':
./op.h:701: error: expected identifier or '(' before '.' token ./op.h:703: error: expected expression before '.' token ./op.h:710: error: expected identifier or '(' before '.' token ./op.h:711: error: expected identifier or '(' before '.' token ./op.h:713: error: expected expression before '.' token ./op.h:714: error: expected expression before '.' token ./op.h:721: error: expected identifier or '(' before '.' token ./op.h:723: error: expected expression before '.' token ./op.h:1261: error: 'store_booke_tsr' redeclared as different kind of symbol /usr/src/packages/BUILD/qemu-0.9.2svn5349/target-ppc/cpu.h:765: error:
previous declaration of 'store_booke_tsr' was here
./op.h:1270: error: 'store_booke_tcr' redeclared as different kind of symbol /usr/src/packages/BUILD/qemu-0.9.2svn5349/target-ppc/cpu.h:764: error:
previous declaration of 'store_booke_tcr' was here
./op.h:1279: error: 'store_40x_sler' redeclared as different kind of symbol

Sorry..

#6 lore raw
Quoted 10 lines · Martin Mohring
Quoted 8 lines · Robert Reif
Quoted 6 lines · Martin Mohring

Still get this on i586 host for tcg-dyngen.c on i586, arm, cris, m68k.... Using svn trunk -r 5349 here. host os openSUSE 11.0, kernel headers host 2.6.25.

Quoted 8 lines
Quoted 4 lines

It turns out patch 5174 introduced this warning.
The following patch fixes it but I don't know if its the best way to fix it.

Yes, now on openSUSE 11.0 the warning is gone. But now I get a compilation error on Fedora 8/i586 host (I am doing both, Fedora 8 and openSUSE 11.0) with that fix:

Sorry, wrong log. Now the correct error log (for Fedora 8, i586 host):

gcc -I. -I.. -I/usr/src/redhat/BUILD/qemu-0.9.2svn5349/target-ppc -I/usr/src/redhat/BUILD/qemu-0.9.2svn5349 -MMD -MT tcg/tcg.o -MP -DNEED_CPU_H -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I/usr/src/redhat/BUILD/qemu-0.9.2svn5349/tcg -I/usr/src/redhat/BUILD/qemu-0.9.2svn5349/tcg/i386 -I/usr/src/redhat/BUILD/qemu-0.9.2svn5349/fpu -DHAS_AUDIO -DHAS_AUDIO_CHOICE -I/usr/src/redhat/BUILD/qemu-0.9.2svn5349/slirp -O2 -g -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -fno-strict-aliasing -O2 -g -fno-strict-aliasing -Wall -Wundef -Wendif-labels -Wwrite-strings -m32 -c -o tcg/tcg.o /usr/src/redhat/BUILD/qemu-0.9.2svn5349/tcg/tcg.c
gcc -I. -I.. -I/usr/src/redhat/BUILD/qemu-0.9.2svn5349/target-ppc -I/usr/src/redhat/BUILD/qemu-0.9.2svn5349 -MMD -MT tcg/tcg-dyngen.o -MP -DNEED_CPU_H -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I/usr/src/redhat/BUILD/qemu-0.9.2svn5349/tcg -I/usr/src/redhat/BUILD/qemu-0.9.2svn5349/tcg/i386 -I/usr/src/redhat/BUILD/qemu-0.9.2svn5349/fpu -DHAS_AUDIO -DHAS_AUDIO_CHOICE -I/usr/src/redhat/BUILD/qemu-0.9.2svn5349/slirp -O2 -g -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -fno-strict-aliasing -O2 -g -fno-strict-aliasing -Wall -Wundef -Wendif-labels -Wwrite-strings -m32 -c -o tcg/tcg-dyngen.o /usr/src/redhat/BUILD/qemu-0.9.2svn5349/tcg/tcg-dyngen.c
In file included from /usr/src/redhat/BUILD/qemu-0.9.2svn5349/tcg/tcg-dyngen.c:418:
./op.h: In function 'dyngen_op':
./op.h:988: error: 'store_booke_tsr' redeclared as different kind of symbol /usr/src/redhat/BUILD/qemu-0.9.2svn5349/target-ppc/cpu.h:765: error:
previous declaration of 'store_booke_tsr' was here
./op.h:997: error: 'store_booke_tcr' redeclared as different kind of symbol /usr/src/redhat/BUILD/qemu-0.9.2svn5349/target-ppc/cpu.h:764: error:
previous declaration of 'store_booke_tcr' was here
./op.h:1006: error: 'store_40x_sler' redeclared as different kind of symbol /usr/src/redhat/BUILD/qemu-0.9.2svn5349/target-ppc/cpu.h:763: error:
previous declaration of 'store_40x_sler' was here
./op.h:1015: error: 'store_40x_dbcr0' redeclared as different kind of symbol /usr/src/redhat/BUILD/qemu-0.9.2svn5349/target-ppc/cpu.h:762: error:
previous declaration of 'store_40x_dbcr0' was here
./op.h:1024: error: 'store_40x_pit' redeclared as different kind of symbol /usr/src/redhat/BUILD/qemu-0.9.2svn5349/target-ppc/cpu.h:761: error:
previous declaration of 'store_40x_pit' was here
./op.h:1033: error: 'load_40x_pit' redeclared as different kind of symbol /usr/src/redhat/BUILD/qemu-0.9.2svn5349/target-ppc/cpu.h:760: error:
previous declaration of 'load_40x_pit' was here
./op.h:1093: error: 'ppcemb_tlb_search' redeclared as different kind of symbol /usr/src/redhat/BUILD/qemu-0.9.2svn5349/target-ppc/cpu.h:772: error:
previous declaration of 'ppcemb_tlb_search' was here ./op.h:1388: error: 'do_store_ibatu_601' redeclared as different kind of symbol /usr/src/redhat/BUILD/qemu-0.9.2svn5349/target-ppc/cpu.h:713: error:
previous declaration of 'do_store_ibatu_601' was here ./op.h:1400: error: 'do_store_ibatl_601' redeclared as different kind of symbol /usr/src/redhat/BUILD/qemu-0.9.2svn5349/target-ppc/cpu.h:714: error:
previous declaration of 'do_store_ibatl_601' was here ./op.h:1420: error: 'cpu_ppc601_store_rtcu' redeclared as different kind of symbol

#7 lore raw
Quoted 76 lines · Martin Mohring
Quoted 13 lines · Martin Mohring
Quoted 10 lines · Robert Reif
Quoted 7 lines · Martin Mohring

Still get this on i586 host for tcg-dyngen.c on i586, arm, cris, m68k.... Using svn trunk -r 5349 here. host os openSUSE 11.0, kernel headers host 2.6.25.

Quoted 10 lines
Quoted 5 lines

It turns out patch 5174 introduced this warning.
The following patch fixes it but I don't know if its the best way to fix it.

Yes, now on openSUSE 11.0 the warning is gone. But now I get a compilation error on Fedora 8/i586 host (I am doing both, Fedora 8 and openSUSE 11.0) with that fix:

Sorry, wrong log. Now the correct error log (for Fedora 8, i586 host):

gcc -I. -I.. -I/usr/src/redhat/BUILD/qemu-0.9.2svn5349/target-ppc

(quoted diff) +0 -9
-I/usr/src/redhat/BUILD/qemu-0.9.2svn5349 -MMD -MT tcg/tcg.o -MP
-DNEED_CPU_H -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
-I/usr/src/redhat/BUILD/qemu-0.9.2svn5349/tcg
-I/usr/src/redhat/BUILD/qemu-0.9.2svn5349/tcg/i386
-I/usr/src/redhat/BUILD/qemu-0.9.2svn5349/fpu -DHAS_AUDIO
-DHAS_AUDIO_CHOICE -I/usr/src/redhat/BUILD/qemu-0.9.2svn5349/slirp -O2
-g -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables
-fno-strict-aliasing -O2 -g -fno-strict-aliasing -Wall -Wundef
-Wendif-labels -Wwrite-strings -m32 -c -o tcg/tcg.o

/usr/src/redhat/BUILD/qemu-0.9.2svn5349/tcg/tcg.c
gcc -I. -I.. -I/usr/src/redhat/BUILD/qemu-0.9.2svn5349/target-ppc

(quoted diff) +0 -9
-I/usr/src/redhat/BUILD/qemu-0.9.2svn5349 -MMD -MT tcg/tcg-dyngen.o -MP
-DNEED_CPU_H -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
-I/usr/src/redhat/BUILD/qemu-0.9.2svn5349/tcg
-I/usr/src/redhat/BUILD/qemu-0.9.2svn5349/tcg/i386
-I/usr/src/redhat/BUILD/qemu-0.9.2svn5349/fpu -DHAS_AUDIO
-DHAS_AUDIO_CHOICE -I/usr/src/redhat/BUILD/qemu-0.9.2svn5349/slirp -O2
-g -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables
-fno-strict-aliasing -O2 -g -fno-strict-aliasing -Wall -Wundef
-Wendif-labels -Wwrite-strings -m32 -c -o tcg/tcg-dyngen.o

/usr/src/redhat/BUILD/qemu-0.9.2svn5349/tcg/tcg-dyngen.c
In file included from /usr/src/redhat/BUILD/qemu-0.9.2svn5349/tcg/tcg-dyngen.c:418:
./op.h: In function 'dyngen_op':
./op.h:988: error: 'store_booke_tsr' redeclared as different kind of symbol /usr/src/redhat/BUILD/qemu-0.9.2svn5349/target-ppc/cpu.h:765: error:
previous declaration of 'store_booke_tsr' was here
./op.h:997: error: 'store_booke_tcr' redeclared as different kind of symbol /usr/src/redhat/BUILD/qemu-0.9.2svn5349/target-ppc/cpu.h:764: error:
previous declaration of 'store_booke_tcr' was here
./op.h:1006: error: 'store_40x_sler' redeclared as different kind of symbol /usr/src/redhat/BUILD/qemu-0.9.2svn5349/target-ppc/cpu.h:763: error:
previous declaration of 'store_40x_sler' was here
./op.h:1015: error: 'store_40x_dbcr0' redeclared as different kind of symbol /usr/src/redhat/BUILD/qemu-0.9.2svn5349/target-ppc/cpu.h:762: error:
previous declaration of 'store_40x_dbcr0' was here
./op.h:1024: error: 'store_40x_pit' redeclared as different kind of symbol /usr/src/redhat/BUILD/qemu-0.9.2svn5349/target-ppc/cpu.h:761: error:
previous declaration of 'store_40x_pit' was here
./op.h:1033: error: 'load_40x_pit' redeclared as different kind of symbol /usr/src/redhat/BUILD/qemu-0.9.2svn5349/target-ppc/cpu.h:760: error:
previous declaration of 'load_40x_pit' was here
./op.h:1093: error: 'ppcemb_tlb_search' redeclared as different kind of symbol /usr/src/redhat/BUILD/qemu-0.9.2svn5349/target-ppc/cpu.h:772: error:
previous declaration of 'ppcemb_tlb_search' was here ./op.h:1388: error: 'do_store_ibatu_601' redeclared as different kind of symbol

Quoted 10 lines

/usr/src/redhat/BUILD/qemu-0.9.2svn5349/target-ppc/cpu.h:713: error:
previous declaration of 'do_store_ibatu_601' was here ./op.h:1400: error: 'do_store_ibatl_601' redeclared as different kind of symbol /usr/src/redhat/BUILD/qemu-0.9.2svn5349/target-ppc/cpu.h:714: error:
previous declaration of 'do_store_ibatl_601' was here ./op.h:1420: error: 'cpu_ppc601_store_rtcu' redeclared as different kind of symbol

Looks like with this include, for all distros in can build for (openSUSE 10.2,10.3,11.0+Fedora 8,9 on host i586 x86_64, all combinations), I now get this double inclusion error.

#8 lore raw
In reply to Robert Reif
Quoted 11 lines · Robert Reif
Quoted 1 line · Martin Mohring

Still get this on i586 host for tcg-dyngen.c on i586, arm, cris, m68k....

Using svn trunk -r 5349 here. host os openSUSE 11.0, kernel headers host 2.6.25.

Quoted 3 lines

It turns out patch 5174 introduced this warning.
The following patch fixes it but I don't know if its the best way to fix
it.

Please see my comments from time before committing r5174:
http://lists.gnu.org/archive/html/qemu-devel/2008-08/msg01355.html

As the emulators worked fine before defining TARGET_LONG_BITS, the patch may or may not be correct. I don't know. If I did, the warning would be trivial to fix or suppress. Now the warning highlights a potential bug, much like the slirp pointer truncation warnings indicate a real bug.