gdb build failures

Daron Chabot daron.chabot at usask.ca
Sun Apr 13 16:54:55 UTC 2008


All,

FYI: "Out of the box", gdb-6.7.1 (and gdb-6.8 as well) do not build  
on mac os x (Tiger). The failure is due to the addition of "-Werror"  
to the gdb's build CFLAGS (and maybe also due to the use of  
gcc-4.x.x ?).

Once the build gets to gdb-6.x.x/gdb, it trips over warnings like these:
../../gdb-6.7.1/gdb/i386-tdep.c: In function 'i386_collect_fpregset':
../../gdb-6.7.1/gdb/i386-tdep.c:2035: warning: format not a string  
literal, argument types not checked
../../gdb-6.7.1/gdb/i386-tdep.c: In function 'i386_print_insn':
../../gdb-6.7.1/gdb/i386-tdep.c:2139: warning: format not a string  
literal, argument types not checked

which, of course, cause the build to bail because of the -Werror flag...

In each warning case, the culprit code is one form or another of  
error-reporting or gdb-assert( ) statements. These functions may not  
be dangerous in any way, but gcc seems to think that they *could* be...

Simply removing the "-Werror" addition from the appropriate Makefile  
allows the build(s) to complete successfully, albeit with much noise...

Should the gdb and gcc lists be notified ?

-- dc


Info:
------------------------------------------------------------------------ 
------------------------------
djc at toolbox--> ../gdb-6.7.1/configure --target=i386-rtems --prefix=/ 
opt/rtems

djc at toolbox--> uname -a
Darwin toolbox 8.11.1 Darwin Kernel Version 8.11.1: Wed Oct 10  
18:23:28 PDT 2007; root:xnu-792.25.20~1/RELEASE_I386 i386 i386

djc at toolbox--> gcc -v
Using built-in specs.
Target: i686-apple-darwin8
Configured with: /private/var/tmp/gcc/gcc-5367.obj~1/src/configure -- 
disable-checking -enable-werror --prefix=/usr --mandir=/share/man -- 
enable-languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg] 
[^.-]*$/s/$/-4.0/ --with-gxx-include-dir=/include/c++/4.0.0 --with- 
slibdir=/usr/lib --build=powerpc-apple-darwin8 --with-arch=nocona -- 
with-tune=generic --program-prefix= --host=i686-apple-darwin8 -- 
target=i686-apple-darwin8
Thread model: posix
gcc version 4.0.1 (Apple Computer, Inc. build 5367)




More information about the users mailing list