diff options
Diffstat (limited to 'usr/src/tools')
31 files changed, 67 insertions, 57 deletions
diff --git a/usr/src/tools/Makefile b/usr/src/tools/Makefile index 670c2de281..fe263c4d79 100644 --- a/usr/src/tools/Makefile +++ b/usr/src/tools/Makefile @@ -90,11 +90,6 @@ ROOTDIRS= \ $(ROOTONBLD)/lib \ $(ROOTONBLD)/lib/$(MACH) \ $(ROOTONBLD)/lib/perl \ - $(ROOTONBLD)/lib/python2.4 \ - $(ROOTONBLD)/lib/python2.4/onbld \ - $(ROOTONBLD)/lib/python2.4/onbld/Checks \ - $(ROOTONBLD)/lib/python2.4/onbld/hgext \ - $(ROOTONBLD)/lib/python2.4/onbld/Scm \ $(ROOTONBLD)/lib/python2.6 \ $(ROOTONBLD)/lib/python2.6/onbld \ $(ROOTONBLD)/lib/python2.6/onbld/Checks \ @@ -146,6 +141,6 @@ $(ROOTDIRS): $(INS.dir) $(ROOTONBLDLIBPY): $(ROOTDIRS) - $(RM) -r $@; $(SYMLINK) python2.4 $@ + $(RM) -r $@; $(SYMLINK) python2.6 $@ FRC: diff --git a/usr/src/tools/Makefile.python b/usr/src/tools/Makefile.python index a68ff026f6..dcf7c06360 100644 --- a/usr/src/tools/Makefile.python +++ b/usr/src/tools/Makefile.python @@ -63,43 +63,34 @@ PYFILES = $(PYSRCS) $(PYOBJS) -ROOTPYDIR_24 = $(PYTOPDIR)/python2.4/$(PYMODDIR) -ROOTPYFILES_24 = $(PYFILES:%=$(ROOTPYDIR_24)/%) - ROOTPYDIR_26 = $(PYTOPDIR)/python2.6/$(PYMODDIR) ROOTPYFILES_26 = $(PYFILES:%=$(ROOTPYDIR_26)/%) -ROOTPYFILES = $(ROOTPYFILES_24) $(ROOTPYFILES_26) +ROOTPYFILES = $(ROOTPYFILES_26) $(ROOTPYFILES) := FILEMODE = 0444 -PYVERSDIRS = python2.4 python2.6 - -PY24OBJS = $(PYOBJS:%=python2.4/%) -$(PY24OBJS) := PYTHON = $(PYTHON_24) +PYVERSDIRS = python2.6 PY26OBJS = $(PYOBJS:%=python2.6/%) $(PY26OBJS) := PYTHON = $(PYTHON_26) -PYVERSOBJS = $(PY24OBJS) $(PY26OBJS) +PYVERSOBJS = $(PY26OBJS) CLOBBERFILES += $(PYVERSOBJS) CLOBBERDIRS += $(PYVERSDIRS) .KEEP_STATE: -python2.4/%.pyc python2.6/%.pyc: %.py +python2.6/%.pyc: %.py @[ -d $(@D) ] || mkdir $(@D) $(RM) $@ $(PYTHON) -mpy_compile $< $(MV) $(*).pyc $@ -$(ROOTPYDIR_24)/%.pyc: python2.4/%.pyc - $(INS.pyfile) - $(ROOTPYDIR_26)/%.pyc: python2.6/%.pyc $(INS.pyfile) -$(ROOTPYDIR_24)/%.py $(ROOTPYDIR_26)/%.py: %.py +$(ROOTPYDIR_26)/%.py: %.py $(INS.pyfile) pyclobber: diff --git a/usr/src/tools/Makefile.tools b/usr/src/tools/Makefile.tools index c2bfdefd74..974543107d 100644 --- a/usr/src/tools/Makefile.tools +++ b/usr/src/tools/Makefile.tools @@ -38,7 +38,6 @@ ROOTONBLDLIB= $(ROOTONBLD)/lib ROOTONBLDLIBMACH= $(ROOTONBLD)/lib/$(MACH) ROOTONBLDLIBPERL= $(ROOTONBLD)/lib/perl ROOTONBLDLIBPY= $(ROOTONBLD)/lib/python -ROOTONBLDLIBPY_24= $(ROOTONBLD)/lib/python2.4 ROOTONBLDLIBPY_26= $(ROOTONBLD)/lib/python2.6 ROOTONBLDENV= $(ROOTONBLD)/env ROOTONBLDGK= $(ROOTONBLD)/gk diff --git a/usr/src/tools/aw/Makefile b/usr/src/tools/aw/Makefile index 77ad41aff0..af2bf8f735 100644 --- a/usr/src/tools/aw/Makefile +++ b/usr/src/tools/aw/Makefile @@ -23,16 +23,13 @@ # Copyright 2004 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" -# -# tools/aw/Makefile -# PROG = aw include ../Makefile.tools CFLAGS += $(CCVERBOSE) +CERRWARN += -_gcc=-Wno-uninitialized LINTFLAGS += -ux -Xa -errchk=locfmtchk,parentheses diff --git a/usr/src/tools/codereview/Makefile b/usr/src/tools/codereview/Makefile index fb826203d3..ba126eb340 100644 --- a/usr/src/tools/codereview/Makefile +++ b/usr/src/tools/codereview/Makefile @@ -22,7 +22,6 @@ # Copyright 1999 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" PROG= codereview @@ -33,6 +32,8 @@ TMPDIR= /tmp include ../Makefile.tools +CERRWARN += -_gcc=-Wno-parentheses + MAN1FILES= codereview.1 $(ROOTONBLDMAN1FILES) := FILEMODE= 644 diff --git a/usr/src/tools/cscope-fast/Makefile b/usr/src/tools/cscope-fast/Makefile index b37183c3cb..6a2270bbed 100644 --- a/usr/src/tools/cscope-fast/Makefile +++ b/usr/src/tools/cscope-fast/Makefile @@ -19,11 +19,11 @@ # # CDDL HEADER END # -# -# ident "%Z%%M% %I% %E% SMI" + # # Copyright 2004 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. +# PROG= cscope-fast @@ -45,6 +45,10 @@ PATLEN= 250 STMTMAX= 10000 YYLMAX= 10251 CFLAGS += -DPATLEN=$(PATLEN) -DSTMTMAX=$(STMTMAX) -DYYLMAX=$(YYLMAX) +CERRWARN += -_gcc=-Wno-parentheses +CERRWARN += -_gcc=-Wno-implicit-function-declaration +CERRWARN += -_gcc=-Wno-unused +CERRWARN += -_gcc=-Wno-uninitialized CFLAGS += $(CCVERBOSE) LDLIBS += -lcurses -ll diff --git a/usr/src/tools/ctf/Makefile.ctf b/usr/src/tools/ctf/Makefile.ctf index e8fee40a21..7c5b041746 100644 --- a/usr/src/tools/ctf/Makefile.ctf +++ b/usr/src/tools/ctf/Makefile.ctf @@ -22,8 +22,6 @@ # Copyright 2006 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" -# include ../../../Makefile.tools @@ -47,3 +45,4 @@ HDRDIRS= \ CPPFLAGS += $(HDRDIRS) CFLAGS += $(CCVERBOSE) +CERRWARN += -_gcc=-Wno-parentheses diff --git a/usr/src/tools/ctf/ctfstrip/Makefile b/usr/src/tools/ctf/ctfstrip/Makefile index d28a9e925e..dee8591408 100644 --- a/usr/src/tools/ctf/ctfstrip/Makefile +++ b/usr/src/tools/ctf/ctfstrip/Makefile @@ -13,10 +13,11 @@ PROG = ctfstrip SRCS = \ - ctfstrip.c + ctfstrip.c CFLAGS += $(CCVERBOSE) include $(SRC)/tools/Makefile.tools +CERRWARN += -_gcc=-Wno-unused-variable OBJS = $(SRCS:%.c=%.o) LINTFILES = $(SRCS:%.c=%.ln) diff --git a/usr/src/tools/ctf/ctfstrip/ctfstrip.c b/usr/src/tools/ctf/ctfstrip/ctfstrip.c index a14e8d5957..60180c6921 100644 --- a/usr/src/tools/ctf/ctfstrip/ctfstrip.c +++ b/usr/src/tools/ctf/ctfstrip/ctfstrip.c @@ -126,7 +126,8 @@ fix_file(const char *filename, mode_t mode) } cmd[4] = filename; - if ((rc = posix_spawn(&pid, MCS, NULL, &attr, (char *const *)cmd, environ)) != 0) { + if ((rc = posix_spawn(&pid, MCS, NULL, &attr, + (char *const *)cmd, environ)) != 0) { warnx("could not exec mcs: %s", strerror(rc)); return (B_FALSE); } diff --git a/usr/src/tools/ctf/cvt/Makefile.com b/usr/src/tools/ctf/cvt/Makefile.com index 43b507bb3e..5385b3769f 100644 --- a/usr/src/tools/ctf/cvt/Makefile.com +++ b/usr/src/tools/ctf/cvt/Makefile.com @@ -79,6 +79,10 @@ CPPFLAGS += -D_REENTRANT CFLAGS += $(CTF_FLAGS) LINTFLAGS += -mnux +CERRWARN += -_gcc=-Wno-unused +CERRWARN += -_gcc=-Wno-uninitialized +CERRWARN += -_gcc=-Wno-switch + C99MODE = $(C99_ENABLE) ctfconvert := LDFLAGS += $(DWARFLDFLAGS) diff --git a/usr/src/tools/ctf/dump/Makefile.com b/usr/src/tools/ctf/dump/Makefile.com index 3aa6caf47c..9877fa06a3 100644 --- a/usr/src/tools/ctf/dump/Makefile.com +++ b/usr/src/tools/ctf/dump/Makefile.com @@ -37,6 +37,8 @@ LDLIBS += -lelf -lz OBJS = $(SRCS:%.c=%.o) LINTFILES = $(SRCS:%.c=%.ln) +CERRWARN += -_gcc=-Wno-uninitialized + .NO_PARALLEL: .PARALLEL: $(OBJS) $(LINTFILES) diff --git a/usr/src/tools/ctf/dwarf/Makefile.com b/usr/src/tools/ctf/dwarf/Makefile.com index 4c25cdda1d..51e788ff04 100644 --- a/usr/src/tools/ctf/dwarf/Makefile.com +++ b/usr/src/tools/ctf/dwarf/Makefile.com @@ -74,6 +74,8 @@ FILEMODE = 0755 SRCDIR = ../common/ CPPFLAGS += -I$(SRCDIR) -DELF_TARGET_ALL=1 +CERRWARN += -_gcc=-Wno-unused +CERRWARN += -_gcc=-Wno-implicit-function-declaration LDLIBS = -lelf -lc diff --git a/usr/src/tools/ctf/stabs/Makefile.com b/usr/src/tools/ctf/stabs/Makefile.com index e3f8e9689a..6703c34f06 100644 --- a/usr/src/tools/ctf/stabs/Makefile.com +++ b/usr/src/tools/ctf/stabs/Makefile.com @@ -44,6 +44,8 @@ OBJS = $(SRCS:%.c=%.o) LINTFILES = $(SRCS:%.c=%.ln) LINTFLAGS = -mnux -L$(ROOT)/usr/lib +CERRWARN += -_gcc=-Wno-uninitialized +CERRWARN += -_gcc=-Wno-unused .NO_PARALLEL: .PARALLEL: $(OBJS) $(LINTFILES) diff --git a/usr/src/tools/cw/cw.c b/usr/src/tools/cw/cw.c index 7e27294770..ded39c12ff 100644 --- a/usr/src/tools/cw/cw.c +++ b/usr/src/tools/cw/cw.c @@ -526,17 +526,12 @@ warnings(struct aelist *h) if (warningsonce++) return; + /* + * Enable as many warnings as exist, then disable those that we never + * ever want. + */ newae(h, "-Wall"); - newae(h, "-Wno-unknown-pragmas"); - newae(h, "-Wno-missing-braces"); - newae(h, "-Wno-sign-compare"); - newae(h, "-Wno-parentheses"); - newae(h, "-Wno-uninitialized"); - newae(h, "-Wno-implicit-function-declaration"); - newae(h, "-Wno-unused"); - newae(h, "-Wno-trigraphs"); - newae(h, "-Wno-char-subscripts"); - newae(h, "-Wno-switch"); + newae(h, "-Wextra"); } static void @@ -655,6 +650,7 @@ do_gcc(cw_ictx_t *ctx) newae(ctx->i_ae, "-fno-inline-functions"); newae(ctx->i_ae, "-fno-builtin"); newae(ctx->i_ae, "-fno-asm"); + newae(ctx->i_ae, "-fdiagnostics-show-option"); newae(ctx->i_ae, "-nodefaultlibs"); #if defined(__sparc) diff --git a/usr/src/tools/elfextract/Makefile b/usr/src/tools/elfextract/Makefile index 7a3e6838d4..9f153231fb 100644 --- a/usr/src/tools/elfextract/Makefile +++ b/usr/src/tools/elfextract/Makefile @@ -23,7 +23,6 @@ # Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -#ident "%Z%%M% %I% %E% SMI" include ../Makefile.tools @@ -31,6 +30,8 @@ PROG = elfextract include ../Makefile.tools +CERRWARN += -_gcc=-Wno-unused-variable +CERRWARN += -_gcc=-Wno-implicit-function-declaration .KEEP_STATE: diff --git a/usr/src/tools/elfsign/Makefile b/usr/src/tools/elfsign/Makefile index 29e18c13d9..ece759e450 100644 --- a/usr/src/tools/elfsign/Makefile +++ b/usr/src/tools/elfsign/Makefile @@ -49,6 +49,8 @@ CPPFLAGS += -I$(SRC)/lib/libkmf/include CPPFLAGS += -I$(SRC)/lib/libcryptoutil/common LDFLAGS += -lmd -lelf -lkmf -lcryptoutil -lc +CERRWARN += -_gcc=-Wno-unused + .KEEP_STATE: all: $(PROG) $(SHFILES) diff --git a/usr/src/tools/findunref/Makefile b/usr/src/tools/findunref/Makefile index 752174a9f6..7023c2ab35 100644 --- a/usr/src/tools/findunref/Makefile +++ b/usr/src/tools/findunref/Makefile @@ -31,6 +31,9 @@ LINTFLAGS += -ux include ../Makefile.tools +CERRWARN += -_gcc=-Wno-unused +CERRWARN += -_gcc=-Wno-parentheses + $(ROOTONBLDMAN1FILES) := FILEMODE= 644 EXCEPTION_SRC= common open diff --git a/usr/src/tools/findunref/exception_list.open b/usr/src/tools/findunref/exception_list.open index 573843afe1..5b0c90ea1a 100644 --- a/usr/src/tools/findunref/exception_list.open +++ b/usr/src/tools/findunref/exception_list.open @@ -132,6 +132,7 @@ ./usr/src/lib/crypt_modules/sha256/test.c ./usr/src/lib/efcode/fcode_test ./usr/src/lib/libkvm/common/test.c +./usr/src/common/saveargs/tests/ # # Ignore debugging code. diff --git a/usr/src/tools/install.bin/Makefile b/usr/src/tools/install.bin/Makefile index a049e94ccd..216e79e63e 100644 --- a/usr/src/tools/install.bin/Makefile +++ b/usr/src/tools/install.bin/Makefile @@ -31,6 +31,7 @@ SRCS= $(PROG).c ../protocmp/stdusers.c include ../Makefile.tools CFLAGS += $(CCVERBOSE) +CERRWARN += -_gcc=-Wno-type-limits CPPFLAGS += -I../protocmp LDLIBS += -lgen CLEANFILES += $(OBJS) diff --git a/usr/src/tools/ndrgen/Makefile b/usr/src/tools/ndrgen/Makefile index 1a94e3128e..a60e584989 100644 --- a/usr/src/tools/ndrgen/Makefile +++ b/usr/src/tools/ndrgen/Makefile @@ -34,6 +34,8 @@ SRCS= $(OBJS:%.o=%.c) include ../Makefile.tools CFLAGS += $(CCVERBOSE) +CERRWARN += -_gcc=-Wno-uninitialized +CERRWARN += -_gcc=-Wno-unused CLEANFILES += $(OBJS) y.tab.c y.tab.h diff --git a/usr/src/tools/pmodes/Makefile b/usr/src/tools/pmodes/Makefile index 6552242279..7f669bb433 100644 --- a/usr/src/tools/pmodes/Makefile +++ b/usr/src/tools/pmodes/Makefile @@ -32,6 +32,8 @@ CLEANFILES += $(OBJS) include ../Makefile.tools CFLAGS += $(CCVERBOSE) +CERRWARN += -_gcc=-Wno-parentheses +CERRWARN += -_gcc=-Wno-uninitialized .KEEP_STATE: diff --git a/usr/src/tools/protocmp/Makefile b/usr/src/tools/protocmp/Makefile index 32f804c009..ace2b982b3 100644 --- a/usr/src/tools/protocmp/Makefile +++ b/usr/src/tools/protocmp/Makefile @@ -33,6 +33,8 @@ CLEANFILES += $(CMP_OBJS) include ../Makefile.tools CFLAGS += $(CCVERBOSE) +CERRWARN += -_gcc=-Wno-parentheses +CERRWARN += -_gcc=-Wno-unused .KEEP_STATE: diff --git a/usr/src/tools/protolist/Makefile b/usr/src/tools/protolist/Makefile index 7fd71a1762..5f93e59df8 100644 --- a/usr/src/tools/protolist/Makefile +++ b/usr/src/tools/protolist/Makefile @@ -30,6 +30,7 @@ include ../Makefile.tools CFLAGS += $(CCVERBOSE) CPPFLAGS += -I../protocmp +CERRWARN += -_gcc=-Wno-parentheses CLEANFILES += $(OBJS) .KEEP_STATE: diff --git a/usr/src/tools/scripts/cddlchk.py b/usr/src/tools/scripts/cddlchk.py index 62a2695946..816d2f33a7 100644 --- a/usr/src/tools/scripts/cddlchk.py +++ b/usr/src/tools/scripts/cddlchk.py @@ -1,4 +1,4 @@ -#!/usr/bin/python2.4 +#!/usr/bin/python2.6 # # CDDL HEADER START # diff --git a/usr/src/tools/scripts/copyrightchk.py b/usr/src/tools/scripts/copyrightchk.py index 1426a69bfa..210ef1b46c 100644 --- a/usr/src/tools/scripts/copyrightchk.py +++ b/usr/src/tools/scripts/copyrightchk.py @@ -1,4 +1,4 @@ -#!/usr/bin/python2.4 +#!/usr/bin/python2.6 # # CDDL HEADER START # diff --git a/usr/src/tools/scripts/git-pbchk.py b/usr/src/tools/scripts/git-pbchk.py index 74be6a4818..656e22f6b4 100644 --- a/usr/src/tools/scripts/git-pbchk.py +++ b/usr/src/tools/scripts/git-pbchk.py @@ -1,4 +1,4 @@ -#!/usr/bin/python2.4 +#!/usr/bin/python2.6 # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 @@ -140,13 +140,13 @@ def git_parent_branch(branch): def git_comments(parent): """Return a list of any checkin comments on this git branch""" - p = git('log --pretty=format:%%B %s..' % parent) + p = git('log --pretty=tformat:%%B:SEP: %s..' % parent) if not p: sys.stderr.write("Failed getting git comments\n") sys.exit(err) - return map(lambda x: x.strip(), p.readlines()) + return [x.strip() for x in p.readlines() if x != ':SEP:\n'] def git_file_list(parent, paths=None): diff --git a/usr/src/tools/scripts/hdrchk.py b/usr/src/tools/scripts/hdrchk.py index 3ecec6b3f2..84acbc8616 100644 --- a/usr/src/tools/scripts/hdrchk.py +++ b/usr/src/tools/scripts/hdrchk.py @@ -1,4 +1,4 @@ -#!/usr/bin/python2.4 +#!/usr/bin/python2.6 # # CDDL HEADER START # diff --git a/usr/src/tools/scripts/hg-active.py b/usr/src/tools/scripts/hg-active.py index 7e49a18db5..88394e98e5 100644 --- a/usr/src/tools/scripts/hg-active.py +++ b/usr/src/tools/scripts/hg-active.py @@ -1,4 +1,4 @@ -#!/usr/bin/python2.4 +#!/usr/bin/python2.6 # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 diff --git a/usr/src/tools/scripts/mapfilechk.py b/usr/src/tools/scripts/mapfilechk.py index 83d3d9d70c..9cf2000c7a 100644 --- a/usr/src/tools/scripts/mapfilechk.py +++ b/usr/src/tools/scripts/mapfilechk.py @@ -1,4 +1,4 @@ -#!/usr/bin/python2.4 +#!/usr/bin/python2.6 # # CDDL HEADER START # diff --git a/usr/src/tools/scripts/nightly.sh b/usr/src/tools/scripts/nightly.sh index 9ecb8f471b..ef3ca0015b 100644 --- a/usr/src/tools/scripts/nightly.sh +++ b/usr/src/tools/scripts/nightly.sh @@ -2582,7 +2582,7 @@ echo | tee -a $build_environ_file >> $LOGFILE whence ld | tee -a $build_environ_file >> $LOGFILE LDVER=`ld -V 2>&1` echo $LDVER | tee -a $build_environ_file >> $LOGFILE -LDVER=`echo $LDVER | sed -e "s/.*-1\.//" -e "s/:.*//"` +LDVER=`echo $LDVER | sed -e "s/.*-1\.\([0-9]*\).*/\1/"` if [ `expr $LDVER \< 422` -eq 1 ]; then echo "The link-editor needs to be at version 422 or higher to build" | \ tee -a $build_environ_file >> $LOGFILE diff --git a/usr/src/tools/scripts/webrev.sh b/usr/src/tools/scripts/webrev.sh index 3b962ad917..afcab07abc 100644 --- a/usr/src/tools/scripts/webrev.sh +++ b/usr/src/tools/scripts/webrev.sh @@ -1806,11 +1806,11 @@ function git_wxfile chomp; if (/^R(\d+)\s+([^ ]+)\s+([^ ]+)/) { # rename if ($1 >= 75) { # Probably worth treating as a rename - $realfiles{$3} = $2 + $realfiles{$3} = $2; } else { $realfiles{$3} = $3; $realfiles{$2} = $2; - } + } } else { my $f = (split /\s+/, $_)[1]; $realfiles{$f} = $f; @@ -1826,7 +1826,8 @@ function git_wxfile my $fname = (split /\t/, $_)[1]; next if !defined($realfiles{$fname}); # No real change $state = 1; - $files{$fname} = $msg; + chomp $msg; + $files{$fname} .= $msg; } else { if ($state == 1) { $state = 0; @@ -1839,9 +1840,9 @@ function git_wxfile for (sort keys %files) { if ($realfiles{$_} ne $_) { - print "$_ $realfiles{$_}\n$files{$_}\n"; + print "$_ $realfiles{$_}\n$files{$_}\n\n"; } else { - print "$_\n$files{$_}\n" + print "$_\n$files{$_}\n\n" } }' ${parent} > $TMPFLIST |