LFS 6.3: chapter 6.11. Binutils-2.17 problems

Wolfgang Messingschlager w.mess at freenet.de
Sun Aug 3 04:51:34 PDT 2008

Hi all,

I tried to build binutils version 2.17 on a Linux system with an Athlon 
2000MHz CPU.
I had the following problems, during building binutils:

during "make tooldir=/usr" I got the error:

gcc -DHAVE_CONFIG_H -I. -I../../binutils-2.17/binutils -I. -D_GNU_SOURCE 
-I. -I../../binutils-2.17/binutils -I../bfd 
-I../../binutils-2.17/binutils/../intl -I../intl 
-Dbin_dummy_emulation=bin_vanilla_emulation   -W -Wall 
-Wstrict-prototypes -Wmissing-prototypes -Werror -O3 -march=athlon-xp -c 
cc1: warnings being treated as errors
../../binutils-2.17/binutils/wrstabs.c: In function 'stab_tag_type':
../../binutils-2.17/binutils/wrstabs.c:1297: warning: 'size' is used 
uninitialized in this function
make[4]: *** [wrstabs.o] Error 1
make[4]: Leaving directory `/usr/src/binutils/binutils-build/binutils'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/usr/src/binutils/binutils-build/binutils'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/usr/src/binutils/binutils-build/binutils'
make[1]: *** [all-binutils] Error 2
make[1]: Leaving directory `/usr/src/binutils/binutils-build'
make: *** [all] Error 2
package binutils:/usr/src/binutils/binutils-build> echo $?

I googled a bit and I found 

The solution was to replace line 1872 from

   unsigned int size;


   unsigned int size = 0;

Do you think this is correct?

After changing initializing line 1872 in wrstabs.c I got during the make 
phase that gas/read.c contains several
times the not initilialized variable char stopc;

The command was
gcc -DHAVE_CONFIG_H -I. -I../../binutils-2.17/gas -I. -D_GNU_SOURCE -I.
-I../../binutils-2.17/gas -I../bfd -I../../binutils-2.17/gas/config 
-I../../binutils-2.17/gas/../include -I../../binutils-2.17/gas/.. 
-I../../binutils-2.17/gas/../bfd -I../../binutils-2.17/gas/../intl 
-I../intl -DLOCALEDIR="\"/usr/share/locale\""   -W -Wall 
-Wstrict-prototypes -Wmissing-prototypes -Werror -O3 -march=athlon-xp 
-c ../../binutils-2.17/gas/read.c

The error was

binutils-2.17/gas/read.c:1810: warning: 'stopc' may be used 
uninitialized in this function

I have checked gas/read.c from binutils-2.18. Here all the lines

   char stopc;

was changed to

   char stopc = 0;

Shall I use binutiles-2.18 or shall I replace "char stopc;" by "char 
stopc = 0;" in gas/read.c

Wolfgang Messingschlager

More information about the lfs-support mailing list