Project

General

Profile

Bug #3790

Some Makefiles have LINT.c without LDLIBS

Added by Gary Mills about 6 years ago. Updated 5 months ago.

Status:
In Progress
Priority:
Normal
Assignee:
-
Category:
tools - gate/build tools
Start date:
2013-05-27
Due date:
% Done:

50%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage

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

Notice the absence of LDLIBS . Most other Makefiles were like this one in usr/src/cmd:
-$(RM) $(PROG) $(CLOBBERFILES)

lint_PROG:    $$(PROG).c
+ $(LINT.c) $(PROG).c $(LDLIBS)
lint_SRCS:    $$(SRCS)
+ $(LINT.c) $(SRCS) $(LDLIBS)
$(ROOTCMDDIR)/%: $(ROOTCMDDIR) %
$(INS.file)
@

History

#1

Updated by Gary Mills over 5 years ago

  • Status changed from New to In Progress
  • % Done changed from 0 to 50

This bug has been fixed at least for the case illustrated above by additions to usr/src/cmd/sgs/error/i386/Makefile and usr/src/cmd/sgs/error/sparc/Makefile . This was done as part of the changes for bugs #2989 and #1166 .

#2

Updated by Andy Fiddaman 5 months ago

As support for running lint has now been removed, this can most likely be closed.

Also available in: Atom PDF