Print this page
12166 resync smatch to 0.6.1-rc1-il-3
   1 #
   2 # This file and its contents are supplied under the terms of the
   3 # Common Development and Distribution License ("CDDL"), version 1.0.
   4 # You may only use this file in accordance with the terms of version
   5 # 1.0 of the CDDL.
   6 #
   7 # A full copy of the text of the CDDL should have accompanied this
   8 # source.  A copy of the CDDL is also available via the Internet at
   9 # http://www.illumos.org/license/CDDL.
  10 #
  11 # Copyright 2019 Joyent, Inc.
  12 #
  13 
  14 #
  15 # The src/ sub-directory is un-modified copy of
  16 # https://github.com/illumos/smatch/tree/$SPARSE_VERSION
  17 #
  18 # This Makefile installs just enough for us to be able to run smatch
  19 # locally.
  20 #
  21 
  22 PROG = smatch
  23 SPARSE_VERSION = 0.6.1-rc1-il-2
  24 
  25 include ../Makefile.tools
  26 
  27 # We have to build smatch before we can use cw
  28 i386_CC = $(GNUC_ROOT)/bin/gcc
  29 sparc_CC = $(GNUC_ROOT)/bin/gcc
  30 # sparc doesn't recognise -msave-args
  31 i386_SMATCHFLAGS = -msave-args
  32 sparc_SMATCHFLAGS =
  33 
  34 CFLAGS = -O -m64 $($(MACH)_SMATCHFLAGS) -D__sun -Wall -Wno-unknown-pragmas -std=gnu99 -nodefaultlibs

  35 
  36 SMATCHDATADIR = $(ROOTONBLDSHARE)/smatch
  37 
  38 CFLAGS += -DSMATCHDATADIR='"$(SMATCHDATADIR)"'
  39 CFLAGS += -DGCC_BASE='"/no/such/dir"'
  40 CFLAGS += -DMULTIARCH_TRIPLET=NULL
  41 
  42 LDLIBS += -lsqlite3 -lcrypto -lm -lgcc -lc
  43 LDFLAGS = $(MAPFILE.NES:%=-Wl,-M%)
  44 LDFLAGS += -L$(NATIVE_ADJUNCT)/lib -R$(NATIVE_ADJUNCT)/lib
  45 
  46 CPPFLAGS += -nostdinc
  47 CPPFLAGS += -Isrc/
  48 CPPFLAGS += -I$(NATIVE_ADJUNCT)/include
  49 
  50 # no install.bin
  51 INS.file = $(RM) $@; $(CP) $< $(@D); $(CHMOD) $(FILEMODE) $@
  52 INS.dir = mkdir -p $@; $(CHMOD) $(DIRMODE) $@
  53 
  54 # fine for us


 159 SMATCH_OBJS += smatch_returns.o
 160 SMATCH_OBJS += smatch_return_to_param.o
 161 SMATCH_OBJS += smatch_scope.o
 162 SMATCH_OBJS += smatch_slist.o
 163 SMATCH_OBJS += smatch_start_states.o
 164 SMATCH_OBJS += smatch_statement_count.o
 165 SMATCH_OBJS += smatch_states.o
 166 SMATCH_OBJS += smatch_stored_conditions.o
 167 SMATCH_OBJS += smatch_string_list.o
 168 SMATCH_OBJS += smatch_strings.o
 169 SMATCH_OBJS += smatch_strlen.o
 170 SMATCH_OBJS += smatch_struct_assignment.o
 171 SMATCH_OBJS += smatch_sval.o
 172 SMATCH_OBJS += smatch_tracker.o
 173 SMATCH_OBJS += smatch_type_links.o
 174 SMATCH_OBJS += smatch_type.o
 175 SMATCH_OBJS += smatch_type_val.o
 176 SMATCH_OBJS += smatch_unknown_value.o
 177 SMATCH_OBJS += smatch_untracked_param.o
 178 SMATCH_OBJS += smatch_var_sym.o

 179 
 180 SMATCH_CHECK_OBJS:sh=ls src/check_*.c | sed -e 's+\.c+.o+;s+src/++;'
 181 
 182 OBJS = smatch.o $(LIB_OBJS) $(SMATCH_OBJS) $(SMATCH_CHECK_OBJS)
 183 
 184 SMATCH_DATA = \
 185         illumos_kernel.skipped_functions \
 186         illumos_user.skipped_functions
 187 
 188 SMATCH_DB_DATA =
 189 SMATCH_DB_DATA += call_implies.schema
 190 SMATCH_DB_DATA += function_ptr.schema
 191 SMATCH_DB_DATA += mtag_map.schema
 192 SMATCH_DB_DATA += caller_info.schema
 193 SMATCH_DB_DATA += function_type.schema
 194 SMATCH_DB_DATA += param_map.schema
 195 SMATCH_DB_DATA += common_caller_info.schema
 196 SMATCH_DB_DATA += function_type_info.schema
 197 SMATCH_DB_DATA += parameter_name.schema
 198 SMATCH_DB_DATA += constraints.schema


   1 #
   2 # This file and its contents are supplied under the terms of the
   3 # Common Development and Distribution License ("CDDL"), version 1.0.
   4 # You may only use this file in accordance with the terms of version
   5 # 1.0 of the CDDL.
   6 #
   7 # A full copy of the text of the CDDL should have accompanied this
   8 # source.  A copy of the CDDL is also available via the Internet at
   9 # http://www.illumos.org/license/CDDL.
  10 #
  11 # Copyright 2020 Joyent, Inc.
  12 #
  13 
  14 #
  15 # The src/ sub-directory is un-modified copy of
  16 # https://github.com/illumos/smatch/tree/$SPARSE_VERSION
  17 #
  18 # This Makefile installs just enough for us to be able to run smatch
  19 # locally.
  20 #
  21 
  22 PROG = smatch
  23 SPARSE_VERSION = 0.6.1-rc1-il-3
  24 
  25 include ../Makefile.tools
  26 
  27 # We have to build smatch before we can use cw
  28 i386_CC = $(GNUC_ROOT)/bin/gcc
  29 sparc_CC = $(GNUC_ROOT)/bin/gcc
  30 # sparc doesn't recognise -msave-args
  31 i386_SMATCHFLAGS = -msave-args
  32 sparc_SMATCHFLAGS =
  33 
  34 CFLAGS = -O -m64 -std=gnu99 -nodefaultlibs -D__sun $($(MACH)_SMATCHFLAGS)
  35 CFLAGS += -Wall -Wno-unknown-pragmas -Wno-psabi
  36 
  37 SMATCHDATADIR = $(ROOTONBLDSHARE)/smatch
  38 
  39 CFLAGS += -DSMATCHDATADIR='"$(SMATCHDATADIR)"'
  40 CFLAGS += -DGCC_BASE='"/no/such/dir"'
  41 CFLAGS += -DMULTIARCH_TRIPLET=NULL
  42 
  43 LDLIBS += -lsqlite3 -lcrypto -lm -lgcc -lc
  44 LDFLAGS = $(MAPFILE.NES:%=-Wl,-M%)
  45 LDFLAGS += -L$(NATIVE_ADJUNCT)/lib -R$(NATIVE_ADJUNCT)/lib
  46 
  47 CPPFLAGS += -nostdinc
  48 CPPFLAGS += -Isrc/
  49 CPPFLAGS += -I$(NATIVE_ADJUNCT)/include
  50 
  51 # no install.bin
  52 INS.file = $(RM) $@; $(CP) $< $(@D); $(CHMOD) $(FILEMODE) $@
  53 INS.dir = mkdir -p $@; $(CHMOD) $(DIRMODE) $@
  54 
  55 # fine for us


 160 SMATCH_OBJS += smatch_returns.o
 161 SMATCH_OBJS += smatch_return_to_param.o
 162 SMATCH_OBJS += smatch_scope.o
 163 SMATCH_OBJS += smatch_slist.o
 164 SMATCH_OBJS += smatch_start_states.o
 165 SMATCH_OBJS += smatch_statement_count.o
 166 SMATCH_OBJS += smatch_states.o
 167 SMATCH_OBJS += smatch_stored_conditions.o
 168 SMATCH_OBJS += smatch_string_list.o
 169 SMATCH_OBJS += smatch_strings.o
 170 SMATCH_OBJS += smatch_strlen.o
 171 SMATCH_OBJS += smatch_struct_assignment.o
 172 SMATCH_OBJS += smatch_sval.o
 173 SMATCH_OBJS += smatch_tracker.o
 174 SMATCH_OBJS += smatch_type_links.o
 175 SMATCH_OBJS += smatch_type.o
 176 SMATCH_OBJS += smatch_type_val.o
 177 SMATCH_OBJS += smatch_unknown_value.o
 178 SMATCH_OBJS += smatch_untracked_param.o
 179 SMATCH_OBJS += smatch_var_sym.o
 180 SMATCH_OBJS += smatch_parsed_conditions.o
 181 
 182 SMATCH_CHECK_OBJS:sh=ls src/check_*.c | sed -e 's+\.c+.o+;s+src/++;'
 183 
 184 OBJS = smatch.o $(LIB_OBJS) $(SMATCH_OBJS) $(SMATCH_CHECK_OBJS)
 185 
 186 SMATCH_DATA = \
 187         illumos_kernel.skipped_functions \
 188         illumos_user.skipped_functions
 189 
 190 SMATCH_DB_DATA =
 191 SMATCH_DB_DATA += call_implies.schema
 192 SMATCH_DB_DATA += function_ptr.schema
 193 SMATCH_DB_DATA += mtag_map.schema
 194 SMATCH_DB_DATA += caller_info.schema
 195 SMATCH_DB_DATA += function_type.schema
 196 SMATCH_DB_DATA += param_map.schema
 197 SMATCH_DB_DATA += common_caller_info.schema
 198 SMATCH_DB_DATA += function_type_info.schema
 199 SMATCH_DB_DATA += parameter_name.schema
 200 SMATCH_DB_DATA += constraints.schema