Build error in gdb-7.6

vijay nag
Thu Aug 8 10:10:00 GMT 2013


The following compiler error is encountered while building gdb-7.6
using gcc-3.3.5

/bin/sh ./libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I.
-DTRAD_CORE   -I. -I. -I./../include  -DHAVE_bfd_elf32_i386_vec
-DHAVE_i386linux_vec -DHAVE_i386pei_vec
-DHAVE_bfd_elf32_little_generic_vec -DHAVE_bfd_elf32_big_generic_vec
-DBINDIR='"/ws/vinag-bgl/gdb/new/bin"'  -W -Wall -Wstrict-prototypes
-Wmissing-prototypes -Werror -g -O2 -MT archive.lo -MD -MP -MF
.deps/archive.Tpo -c -o archive.lo archive.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -DTRAD_CORE -I. -I.
-I./../include -DHAVE_bfd_elf32_i386_vec -DHAVE_i386linux_vec
-DHAVE_i386pei_vec -DHAVE_bfd_elf32_little_generic_vec
-DBINDIR=\"/ws/vinag-bgl/gdb/new/bin\" -W -Wall -Wstrict-prototypes
-Wmissing-prototypes -Werror -g -O2 -MT archive.lo -MD -MP -MF
.deps/archive.Tpo -c archive.c -o archive.o
archive.c: In function `normalize':
archive.c:1382: warning: unused parameter `abfd'
archive.c: In function `archive_close_worker':
archive.c:2703: warning: unused parameter `inf'
make[4]: *** [archive.lo] Error 1
make[4]: Leaving directory `/ws/vinag-bgl/gdb/gdb-7.6/bfd'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/ws/vinag-bgl/gdb/gdb-7.6/bfd'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/ws/vinag-bgl/gdb/gdb-7.6/bfd'
make[1]: *** [all-bfd] Error 2
make[1]: Leaving directory `/ws/vinag-bgl/gdb/gdb-7.6'
make: *** [all] Error 2

cat archive.c | less
static const char *
 normalize (bfd *abfd ATTRIBUTE_UNUSED, const char *file)
   return lbasename (file);

/* Similarly to ARG_UNUSED below.  Prior to GCC 3.4, the C++ frontend
   couldn't parse attributes placed after the identifier name, and now
   the entire compiler is built with C++.  */
#if GCC_VERSION >= 3004
#  define ATTRIBUTE_UNUSED __attribute__ ((__unused__))

ATTRIBUTE_UNUSED is NULL here since my GCC_VERSION < 3.4.  Do we have
to use -Wno-unused in CFLAGS for GCC versions prior to 3.4 ?

More information about the Gdb mailing list