Print this page
6117 Many small bugs prevent a clean build on SPARC
@@ -17,10 +17,11 @@
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
#
+# Copyright 2015 Gary Mills
# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
PROG= yacc
@@ -46,31 +47,35 @@
LIBSRCS= $(OBJECTS:%.o=../common/%.c)
SRCS= $(COMSRCS) $(LIBSRCS)
LIBS = $(DYNLIB) $(LINTLIB)
+# Append to LINTFLAGS and LINTFLAGS64 from lib/Makefile.lib
+LINTFLAGS += -erroff=E_NAME_MULTIPLY_DEF2
+LINTFLAGS64 += -erroff=E_NAME_MULTIPLY_DEF2
+
# Tune ZDEFS to ignore undefined symbols for building the yacc shared library
# since these symbols (mainly yyparse) are to be resolved elsewhere.
#
$(DYNLIB):= ZDEFS = $(ZNODEFS)
$(DYNLIBCCC):= ZDEFS = $(ZNODEFS)
LINTSRCS= ../common/llib-l$(LIBNAME)
+$(LINTLIB):= SRCS = $(SRCDIR)/$(LINTSRC)
INCLIST= -I../../include -I../../include/$(MACH)
CPPFLAGS= $(INCLIST) $(DEFLIST) $(CPPFLAGS.master)
-LDLIBS= $(LDLIBS.cmd)
+$(PROG):= LDLIBS = $(LDLIBS.cmd)
BUILD.AR= $(AR) $(ARFLAGS) $@ `$(LORDER) $(OBJS) | $(TSORT)`
-LINTFLAGS= -amux
+
LINTPOUT= lint.out
C99MODE= $(C99_ENABLE)
CFLAGS += $(CCVERBOSE)
CFLAGS64 += $(CCVERBOSE)
CERRWARN += -_gcc=-Wno-parentheses
CERRWARN += -_gcc=-Wno-uninitialized
-$(LINTLIB):= LINTFLAGS = -nvx
$(ROOTPROG):= FILEMODE = 0555
ROOTYACCPAR= $(YACCPAR:%=$(ROOTSHLIBCCS)/%)
ROOTLINTDIR= $(ROOTLIBDIR)
@@ -77,9 +82,11 @@
ROOTLINT= $(LINTSRCS:../common/%=$(ROOTLINTDIR)/%)
DYNLINKLIBDIR= $(ROOTLIBDIR)
DYNLINKLIB= $(LIBLINKS:%=$(DYNLINKLIBDIR)/%)
-$(DYNLIB) := LDLIBS += -lc
+LDLIBS += -lc
CLEANFILES += $(LINTPOUT)
CLOBBERFILES += $(LIBS) $(LIBRARY)
+
+lint: lintcheck