Print this page
10077 usr/src/uts/ Makefile changes for smatch
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/uts/intel/cxgbe/t4nex/Makefile
+++ new/usr/src/uts/intel/cxgbe/t4nex/Makefile
1 1 #
2 2 # This file and its contents are supplied under the terms of the
3 3 # Common Development and Distribution License ("CDDL"), version 1.0.
4 4 # You may only use this file in accordance with the terms of version
↓ open down ↓ |
4 lines elided |
↑ open up ↑ |
5 5 # 1.0 of the CDDL.
6 6 #
7 7 # A full copy of the text of the CDDL should have accompanied this
8 8 # source. A copy of the CDDL is also available via the Internet at
9 9 # http://www.illumos.org/license/CDDL.
10 10 #
11 11
12 12 #
13 13 # Copyright (c) 2013 by Chelsio Communications, Inc. All rights reserved.
14 14 #
15 +# Copyright (c) 2018, Joyent, Inc.
15 16
16 17 #
17 18 # This makefile drives the production of the Chelsio Terminator 4 10G Ethernet
18 19 # (CXGBE) driver nexus modules on x86 systems.
19 20 #
20 21
21 22 #
22 23 # Paths to the base of the uts directory trees
23 24 #
24 25 UTSBASE = ../../..
25 26
26 27 #
27 28 # Define the module and object file sets.
28 29 #
29 30 MODULE = t4nex
30 31 OBJECTS = $(CXGBE_COM_OBJS:%=$(OBJS_DIR)/%) \
31 32 $(CXGBE_FW_OBJS:%=$(OBJS_DIR)/%) \
32 33 $(CXGBE_NEX_OBJS:%=$(OBJS_DIR)/%)
33 34 LINTS = $(CXGBE_COM_OBJS:%.o=$(LINTS_DIR)/%.ln) \
34 35 $(CXGBE_FW_OBJS:%.o=$(LINTS_DIR)/%.ln) \
35 36 $(CXGBE_NEX_OBJS:%.o=$(LINTS_DIR)/%.ln)
36 37 ROOTMODULE = $(ROOT_DRV_DIR)/$(MODULE)
37 38
38 39 #
39 40 # Include common rules
40 41 #
41 42 include $(UTSBASE)/intel/Makefile.intel
42 43
43 44 #
44 45 # Define targets
45 46 #
46 47 ALL_TARGET = $(BINARY)
47 48 LINT_TARGET = $(MODULE).lint
48 49 INSTALL_TARGET = $(BINARY) $(ROOTMODULE)
49 50
50 51 CFLAGS += -g -I$(UTSBASE)/common/io/cxgbe -I$(UTSBASE)/common/io/cxgbe/common \
51 52 -I$(UTSBASE)/common/io/cxgbe/t4nex -I$(UTSBASE)/common/io/cxgbe/shared \
52 53 -I$(UTSBASE)/common/io/cxgbe/firmware
53 54
54 55 #
55 56 # Driver depends
56 57 #
57 58 LDFLAGS += -dy -N misc/mac -N drv/ip
58 59
59 60 #
60 61 # Lint
61 62 #
62 63 LINTFLAGS += -I$(UTSBASE)/common/io/cxgbe -I$(UTSBASE)/common/io/cxgbe/common \
63 64 -I$(UTSBASE)/common/io/cxgbe/t4nex -I$(UTSBASE)/common/io/cxgbe/shared \
64 65 -I$(UTSBASE)/common/io/cxgbe/firmware
65 66 LINTFLAGS += -Xc99=%all
66 67
67 68 #
68 69 # A lot of these come from the fact that there are static inlines and
69 70 # that this driver leverages various C99 and some GNU C extensions.
70 71 #
71 72 LINTTAGS += -erroff=E_STATIC_UNUSED
72 73 LINTTAGS += -erroff=E_FUNC_ARG_UNUSED
73 74 LINTTAGS += -erroff=E_ZERO_OR_NEGATIVE_SUBSCRIPT
74 75 LINTTAGS += -erroff=E_ZERO_SIZED_STRUCT_UNION
75 76 LINTTAGS += -erroff=E_ANONYMOUS_UNION_DECL
76 77 LINTTAGS += -erroff=E_CONSTANT_CONDITION
77 78
78 79 #
79 80 # These have been manually verified at the moment. When updating this
80 81 # driver, please manually check the following lint warnings. Note some
81 82 # of these are due to limitations in Sun Studio.
82 83 #
↓ open down ↓ |
58 lines elided |
↑ open up ↑ |
83 84 LINTTAGS += -erroff=E_BAD_PTR_CAST_ALIGN
84 85 LINTTAGS += -erroff=E_ENUM_VAL_OVERFLOWS_INT_MAX
85 86 LINTTAGS += -erroff=E_FUNC_NO_RET_VAL
86 87 LINTTAGS += -erroff=E_NOP_IF_STMT
87 88 LINTTAGS += -erroff=E_FUNC_SET_NOT_USED
88 89 LINTTAGS += -erroff=E_FUNC_RET_ALWAYS_IGNOR2
89 90 LINTTAGS += -erroff=E_FUNC_RET_MAYBE_IGNORED2
90 91 LINTTAGS += -erroff=E_CASE_FALLTHRU
91 92 LINTTAGS += -erroff=E_ASSIGN_NARROW_CONV
92 93
94 +# needs work
95 +SMATCH=off
96 +
93 97 #
94 98 # Default build targets.
95 99 #
96 100 .KEEP_STATE:
97 101
98 102 def: $(DEF_DEPS)
99 103
100 104 all: $(ALL_DEPS)
101 105
102 106 clean: $(CLEAN_DEPS)
103 107
104 108 clobber: $(CLOBBER_DEPS)
105 109
106 110 lint: $(LINT_DEPS)
107 111
108 112 modlintlib: $(MODLINTLIB_DEPS)
109 113
110 114 clean.lint: $(CLEAN_LINT_DEPS)
111 115
112 116 install: $(INSTALL_DEPS)
113 117
114 118 #
115 119 # Include common targets.
116 120 #
117 121 include $(UTSBASE)/intel/Makefile.targ
↓ open down ↓ |
15 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX