NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

using gcc -w



Part of the point of build.sh is to build the compiler of the same
vintage as the rest of the code. I am getting stuck trying to build
ancient versions of NetBSD because the -current gcc compiler emits
so many warnings which are treated as fatal that the old tools fail
to build. "build.sh tools" ends up failing on silly things like:

--- elf.lo ---
/bin/sh ./libtool --tag=CC --mode=compile cc -DHAVE_CONFIG_H  -I. -I/usr/src/loc
al/netbsd/src/tools/binutils/../../external/gpl3/binutils/dist/bfd -I. -I. -I/us
r/src/local/netbsd/src/tools/binutils/../../external/gpl3/binutils/dist/bfd -I/u
sr/src/local/netbsd/src/tools/binutils/../../external/gpl3/binutils/dist/bfd/../
include     -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Werror -O -c -o e
lf.lo /usr/src/local/netbsd/src/tools/binutils/../../external/gpl3/binutils/dist
/bfd/elf.c

/usr/src/local/netbsd/src/tools/binutils/../../external/gpl3/binutils/dist/bfd/elf.c:4853:22: error: variable 'i_phdrp' set but not used [-Werror=unused-but-set-variable]
   Elf_Internal_Phdr *i_phdrp = 0; /* Program header table, internal form */

I have tried things like

NOGCCERROR=yes
NO_WERROR=-Wno-error
COPTS+=-w
CFLAGS+=-w
CXXFLAGS+=-w
CC=gcc -w
CXX=g++ -w

in /etc/mk.conf, all to no avail.

If I change things in src/external/gpl3/binutils, I would have to change
them after every cvs update -D'back-in-time'.

Is there a way of getting past the "clean the environment" defences and
suppress warnings (given that this ends up with libtool)?


Cheers,

Patrick


Home | Main Index | Thread Index | Old Index