Hi everyone,
When I build GDB following instructions from EAN2 at www.embecosm.com, the following errors occurred, it may be caused by "warnings being treated as errors" because of flag "-Werror", can anyone help to fix this? Thanks very much!
I build it in Ubuntu, using gcc 4.1.3
Regards.
Sigma HH
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
......................
config.status: creating gdb.threads/Makefile
config.status: creating gdb.trace/Makefile
config.status: creating gdb.xml/Makefile
make2: Entering directory /home/xuebo/downloads/or1k_downloads/build_gdb/sim'
make[2]: Leaving directory
/home/xuebo/downloads/or1k_downloads/build_gdb/sim'
make2: Entering directory /home/xuebo/downloads/or1k_downloads/build_gdb/gdb'
CONFIG_HEADERS=config.h:config.in \
CONFIG_COMMANDS=default \
CONFIG_FILES= \
CONFIG_LINKS= \
/bin/bash config.status
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing default commands
gcc -c -g -O2 -I. -I../../gdb-6.8/gdb -I../../gdb-6.8/gdb/config -DLOCALEDIR="\"/opt/or32/share/locale\"" -DHAVE_CONFIG_H -I../../gdb-6.8/gdb/../include/opcode -I../../gdb-6.8/gdb/../readline/.. -I../bfd -I../../gdb-6.8/gdb/../bfd -I../../gdb-6.8/gdb/../include -I../libdecnumber -I../../gdb-6.8/gdb/../libdecnumber -DMI_OUT=1 -DTUI=1 -Wall -Wdeclaration-after-statement -Wpointer-arith -Wformat-nonliteral -Wno-pointer-sign -Wno-unused -Wno-switch -Wno-char-subscripts -Werror ../../gdb-6.8/gdb/gdb.c
gcc -c -g -O2 -I. -I../../gdb-6.8/gdb -I../../gdb-6.8/gdb/config -DLOCALEDIR="\"/opt/or32/share/locale\"" -DHAVE_CONFIG_H -I../../gdb-6.8/gdb/../include/opcode -I../../gdb-6.8/gdb/../readline/.. -I../bfd -I../../gdb-6.8/gdb/../bfd -I../../gdb-6.8/gdb/../include -I../libdecnumber -I../../gdb-6.8/gdb/../libdecnumber -DMI_OUT=1 -DTUI=1 -Wall -Wdeclaration-after-statement -Wpointer-arith -Wformat-nonliteral -Wno-pointer-sign -Wno-unused -Wno-switch -Wno-char-subscripts -Werror ../../gdb-6.8/gdb/or1k-tdep.c
cc1: warnings being treated as errors
../../gdb-6.8/gdb/or1k-tdep.c: In function ‘or1k_frame_unwind_cache’:
../../gdb-6.8/gdb/or1k-tdep.c:705: warning: format ‘%08llx’ expects type ‘long long unsigned int’, but argument 2 has type ‘CORE_ADDR’
../../gdb-6.8/gdb/or1k-tdep.c:724: warning: format ‘%08llx’ expects type ‘long long unsigned int’, but argument 2 has type ‘CORE_ADDR’
../../gdb-6.8/gdb/or1k-tdep.c:732: warning: format ‘%08llx’ expects type ‘long long unsigned int’, but argument 2 has type ‘CORE_ADDR’
../../gdb-6.8/gdb/or1k-tdep.c: In function ‘or1k_skip_prologue’:
../../gdb-6.8/gdb/or1k-tdep.c:1374: warning: format ‘%08llx’ expects type ‘long long unsigned int’, but argument 2 has type ‘CORE_ADDR’
../../gdb-6.8/gdb/or1k-tdep.c:1399: warning: format ‘%08llx’ expects type ‘long long unsigned int’, but argument 2 has type ‘CORE_ADDR’
../../gdb-6.8/gdb/or1k-tdep.c:1413: warning: format ‘%08llx’ expects type ‘long long unsigned int’, but argument 2 has type ‘CORE_ADDR’
../../gdb-6.8/gdb/or1k-tdep.c:1442: warning: format ‘%08llx’ expects type ‘long long unsigned int’, but argument 2 has type ‘CORE_ADDR’
../../gdb-6.8/gdb/or1k-tdep.c:1475: warning: format ‘%08llx’ expects type ‘long long unsigned int’, but argument 2 has type ‘CORE_ADDR’
../../gdb-6.8/gdb/or1k-tdep.c: In function ‘or1k_write_spr’:
../../gdb-6.8/gdb/or1k-tdep.c:2854: warning: format ‘%8llx’ expects type ‘long long unsigned int’, but argument 4 has type ‘long unsigned int’
../../gdb-6.8/gdb/or1k-tdep.c: In function ‘or1k_info_spr_command’:
../../gdb-6.8/gdb/or1k-tdep.c:2900: warning: format ‘%llu’ expects type ‘long long unsigned int’, but argument 8 has type ‘long unsigned int’
../../gdb-6.8/gdb/or1k-tdep.c:2900: warning: format ‘%llx’ expects type ‘long long unsigned int’, but argument 9 has type ‘long unsigned int’
../../gdb-6.8/gdb/or1k-tdep.c:2915: warning: format ‘%llu’ expects type ‘long long unsigned int’, but argument 8 has type ‘long unsigned int’
../../gdb-6.8/gdb/or1k-tdep.c:2915: warning: format ‘%llx’ expects type ‘long long unsigned int’, but argument 9 has type ‘long unsigned int’
../../gdb-6.8/gdb/or1k-tdep.c: In function ‘or1k_spr_command’:
../../gdb-6.8/gdb/or1k-tdep.c:2972: warning: format ‘%llu’ expects type ‘long long unsigned int’, but argument 8 has type ‘long unsigned int’
../../gdb-6.8/gdb/or1k-tdep.c:2972: warning: format ‘%llx’ expects type ‘long long unsigned int’, but argument 9 has type ‘long unsigned int’
../../gdb-6.8/gdb/or1k-tdep.c:2972: warning: format ‘%llu’ expects type ‘long long unsigned int’, but argument 10 has type ‘long unsigned int’
../../gdb-6.8/gdb/or1k-tdep.c:2972: warning: format ‘%llx’ expects type ‘long long unsigned int’, but argument 11 has type ‘long unsigned int’
make[2]: *** [or1k-tdep.o] Error 1
make[2]: Leaving directory
/home/xuebo/downloads/or1k_downloads/build_gdb/gdb'
make1: all-gdb Error 2
make1: Leaving directory `/home/xuebo/downloads/or1k_downloads/build_gdb'
make: all Error 2
xuebo@ubuntu:~/downloads/or1k_downloads/build_gdb$ ls
//------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
This warning can be fixed by manually cast each complaints to "long long unsigned int".
Sigma HH
Fixed, and new patch file (2.1) available for download. Thanks for your help. Jeremy