Bug #3790
openSome Makefiles have LINT.c without LDLIBS
50%
Description
When I was doing a complete build after changing some symbols in libc (and the lint library), I got this error:/home/mills/Downloads/code/illumos-gate/usr/src/cmd/sgs/error/i386
perl ../../tools/lint_hdr.pl error > lint.out
/opt/sunstudio12.1/bin/lint -I/opt/SUNWspro/prod/include/lint -axsm -I../common -DELF -DTEXT_DOMAIN=\\"SUNW_OST_OSCMD\\" -D_TS_ERRNO -I/home/mills/Downloads/code/illumos-gate/proto/root_i386/usr/include -errtags=yes -s -erroff=E_PTRDIFF_OVERFLOW -erroff=E_ASSIGN_NARROW_CONV -U__PRAGMA_REDEFINE_EXTNAME -Xc99=%all -errsecurity=core -erroff=E_SEC_CREAT_WITHOUT_EXCL -erroff=E_SEC_FORBIDDEN_WARN_CREAT -erroff=E_ASSIGN_INT_TO_SMALL_INT -erroff=E_CAST_INT_CONST_TO_SMALL_INT -erroff=E_CAST_INT_TO_SMALL_INT -erroff=E_CAST_TO_PTR_FROM_INT -erroff=E_COMP_INT_WITH_LARGE_INT -erroff=E_INTEGRAL_CONST_EXP_EXPECTED -erroff=E_PASS_INT_TO_SMALL_INT -erroff=E_PTR_CONV_LOSES_BITS ../common/errormain.c ../common/errorinput.c ../common/errorpi.c ../common/errorsubr.c ../common/errorfilter.c ../common/errortouch.c 2>&1 | tee -a lint.out
errormain.c:
errorinput.c:
errorpi.c:
errorsubr.c:
errorfilter.c:
errortouch.c:
"/dpool/code/illumos-mar/usr/src/cmd/sgs/error/common/errorfilter.c", line 67: warning: name used but not defined: getloginx in errorfilter.c(67) (E_NAME_USED_NOT_DEF2)
This happened because lint was not comparing against the new llib-lc.ln in the proto area. Instead, it was using the build host's lint library in /lib . The Makefile in usr/src/cmd/sgs/error/i386 was like this:
@ clean:
$(RM) $(OBJS) $(CLEANFILES)
+ lint: $(LINTOUT)
+ $(LINTOUT): $(SRCS)
+ perl ../../tools/lint_hdr.pl $(PROG) > $(LINTOUT)
+ $(LINT.c) $(SRCS) 2>&1 | tee -a $(LINTOUT)
include ../../../Makefile.targ
-$(RM) $(PROG) $(CLOBBERFILES)
Notice the absence of LDLIBS . Most other Makefiles were like this one in usr/src/cmd:
lint_PROG: $$(PROG).c
+ $(LINT.c) $(PROG).c $(LDLIBS)
lint_SRCS: $$(SRCS)
+ $(LINT.c) $(SRCS) $(LDLIBS)
$(ROOTCMDDIR)/%: $(ROOTCMDDIR) %
$(INS.file)
@
Updated by Gary Mills almost 10 years ago
- Status changed from New to In Progress
- % Done changed from 0 to 50
Updated by Andy Fiddaman over 4 years ago
As support for running lint has now been removed, this can most likely be closed.