When I try to build binutils version 2.19.1 as a cross-tool, I get this error: cc1: warnings being treated as errors ../../binutils-2.19.1/gas/config/tc-ia64.c: In function ‘fix_insn’: ../../binutils-2.19.1/gas/config/tc-ia64.c:11162: error: format not a string literal and no format arguments I run configure with the following arguments: ../binutils-2.19.1/configure CC="ccache gcc" CXX="ccache g++" --prefix=$HOME/Lin/Cross-Tools/ --disable-nls --target=ia64-unknown-linux-gnu --with-gmp=$HOME/Lin/Cross-Tools/ I'm running a fully patched Ubuntu Intrepid Ibex 32-bits on a Core 2 Duo CPU. Also, I've searched the for the above bug and it doesn't seem to have been reported yet.
Can you try binutils in CVS or Linux binutils 2.19.51.0.2 at http://www.kernel.org/pub/linux/devel/binutils/
No good, it's the same error: cc1: warnings being treated as errors ../../binutils-2.19.51.0.2/gas/config/tc-ia64.c: In function ‘fix_insn’: ../../binutils-2.19.51.0.2/gas/config/tc-ia64.c:11178: error: format not a string literal and no format arguments Source: 'http://www.kernel.org/pub/linux/devel/binutils/binutils-2.19.51.0.2.tar.bz2' This also happens with the cvs version (02/20/09, 19:17 GMT).
Please show the command line used to compile tc-ia64.c.
tc-ia64.c is automatically compiled by make. I won't have access to the linux box this weekend, so it'll only be possible to post how the compiler is run (as invoked by make) next monday. The configure script is run with the following arguments (it's incomplete in my first post): ../binutils-2.19.1/configure CC="ccache gcc" CXX="ccache g++" --prefix=$HOME/Lin/Cross-Tools/ --disable-nls --target=ia64-unknown-linux-gnu --with-gmp=$HOME/Lin/Cross-Tools/ --with-mpfr=$HOME/Lin/Cross-Tools/ --disable-multilib --enable-shared --enable-64-bit-bfd --with-lib-path=$HOME/Lin/Cross-Tools/ Then I run 'make configure-host' and 'make -j4'.
(In reply to comment #4) > tc-ia64.c is automatically compiled by make. I won't have access to the linux > box this weekend, so it'll only be possible to post how the compiler is run (as > invoked by make) next monday. The configure script is run with the following I can't reproduce it. That is why I want to see the command line used to compile tc-ia64.c. Also please show the output of "gcc -v".
ccache gcc -DHAVE_CONFIG_H -I. -I../../binutils-2.19.1/gas -I. -I. -I../../binutils-2.19.1/gas -I../bfd -I../../binutils-2.19.1/gas/config -I../../binutils-2.19.1/gas/../include -I../../binutils-2.19.1/gas/.. -I../../binutils-2.19.1/gas/../bfd -DLOCALEDIR="\"/home/arkdot/Lin/Cross-Tools//share/locale\"" -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Werror -g -O2 -c ../../binutils-2.19.1/gas/config/tc-ia64.c
Using built-in specs. gcc -v Target: i486-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.3.2-1ubuntu12' --with-bugurl=file:///usr/share/doc/gcc-4.3/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.3 --program-suffix=-4.3 --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr --enable-targets=all --enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu --target=i486-linux-gnu Thread model: posix gcc version 4.3.2 (Ubuntu 4.3.2-1ubuntu12)
Subject: Re: Error while compiling gas/tc-ia64.c as a cross-tool hjl dot tools at gmail dot com wrote: > I can't reproduce it. That is why I want to see the command line used > to compile tc-ia64.c. Also please show the output of "gcc -v". He is using Ubuntu. Ubuntu hard wires on some extra gcc format checking options. The line in question is as_bad_where (fix->fx_file, fix->fx_line, err); This will generate a gcc warning if you use -Wformat-nonliteral, which is apparently on by default in Ubuntu. I saw someone else mention this recently, though I don't remember the details. This could be fixed by changing the line to be instead as_bad_where (fix->fx_file, fix->fx_line, "%s", err); Jim
Subject: Re: Error while compiling gas/tc-ia64.c as a cross-tool hjl dot tools at gmail dot com wrote: > I can't reproduce it. That is why I want to see the command line used > to compile tc-ia64.c. Also please show the output of "gcc -v". See https://wiki.ubuntu.com/CompilerFlags It is actually -Wformat-security that they are using. Jim
Yes, that did the trick! It's compiling now.
Here is the gcc bug: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39044
Subject: Bug 9874 CVSROOT: /cvs/src Module name: src Changes by: nickc@sourceware.org 2009-03-02 14:47:38 Modified files: gas : ChangeLog gas/config : tc-ia64.c Log message: PR 9874 * config/tc-ia64.c (fix_insn): Fix warning reported by -Wformat-security. Patches: http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/gas/ChangeLog.diff?cvsroot=src&r1=1.3751&r2=1.3752 http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/gas/config/tc-ia64.c.diff?cvsroot=src&r1=1.204&r2=1.205
I have checked in Jim's patch. Cheers Nick gas/ChangeLog PR 9874 * config/tc-ia64.c (fix_insn): Fix warning reported by -Wformat-security.