This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: binutils-2.16.92 build failures, Linux X PPC, SPARC.
On Wed, Apr 26, 2006 at 05:34:56PM -0700, Don Lindsay wrote:
> cc1: warnings being treated as errors
> In function 'xcoff_write_archive_contents_old':
> :2086: warning: value computed is not used
I've seen this with gcc-4.1 too.
> I punted by adding --disable-libssp to my configure command. The linux
> cross powerpc-eabi then succeeded.
Also the cross build libssp problems, but this isn't a binutils problem.
> I ran the same script on Solaris 8, bootstrapping from a GCC 3.4.3 instead
> of /usr/bin/gcc. The bootstrap failed with:
>
> /bin/ksh $src/gcc/mkconfig.sh tconfig.h
> ./xgcc -B./ -B$i/sparc-sun-solaris2.8/bin/
> -isystem $i/sparc-sun-solaris2.8/include
> -isystem $i/sparc-sun-solaris2.8/sys-include
> -L$b/gcc/../ld -c -o crt1.o -x assembler-with-cpp
> $src/gcc/config/sparc/sol2-c1.asm
> ./as: error: $b/gcc/.libs/as-new does not exist
This also doesn't look like a binutils problem, but rather that the gcc
build can't find an as yet uninstalled gas.
I'll apply the following to mainline and 2.17 branch.
* coff-rs6000.c (xcoff_write_archive_contents_old): Warning fix.
Index: bfd/coff-rs6000.c
===================================================================
RCS file: /cvs/src/src/bfd/coff-rs6000.c,v
retrieving revision 1.75
diff -u -p -r1.75 coff-rs6000.c
--- bfd/coff-rs6000.c 24 Nov 2005 06:02:07 -0000 1.75
+++ bfd/coff-rs6000.c 27 Apr 2006 01:11:46 -0000
@@ -2083,7 +2083,7 @@ xcoff_write_archive_contents_old (abfd)
char decbuf[XCOFFARMAG_ELEMENT_SIZE + 1];
memset (&fhdr, 0, sizeof fhdr);
- strncpy (fhdr.magic, XCOFFARMAG, SXCOFFARMAG);
+ (void) strncpy (fhdr.magic, XCOFFARMAG, SXCOFFARMAG);
sprintf (fhdr.firstmemoff, "%d", SIZEOF_AR_FILE_HDR);
sprintf (fhdr.freeoff, "%d", 0);
--
Alan Modra
IBM OzLabs - Linux Technology Centre