Print this page
12724 update smatch to 0.6.1-rc1-il-5


   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-4
  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 # When we use builtins, then ld's -zguidance will complain that libm is
  35 # unused on x86 because the compiler will replace ceil(3M) with its own copy.
  36 # However, on SPARC, it doesn't. So for now we disable builtins to make it
  37 # consistent.
  38 CFLAGS = -O -m64 -std=gnu99 -nodefaultlibs -D__sun $($(MACH)_SMATCHFLAGS)
  39 CFLAGS += -fno-builtin
  40 CFLAGS += -Wall -Wno-unknown-pragmas -Wno-psabi
  41 
  42 SMATCHDATADIR = $(ROOTONBLDSHARE)/smatch
  43 


 204 SMATCH_DB_DATA += common_caller_info.schema
 205 SMATCH_DB_DATA += function_type_info.schema
 206 SMATCH_DB_DATA += parameter_name.schema
 207 SMATCH_DB_DATA += constraints.schema
 208 SMATCH_DB_DATA += function_type_size.schema
 209 SMATCH_DB_DATA += return_implies.schema
 210 SMATCH_DB_DATA += constraints_required.schema
 211 SMATCH_DB_DATA += function_type_value.schema
 212 SMATCH_DB_DATA += return_states.schema
 213 SMATCH_DB_DATA += data_info.schema
 214 SMATCH_DB_DATA += local_values.schema
 215 SMATCH_DB_DATA += sink_info.schema
 216 SMATCH_DB_DATA += db.schema
 217 SMATCH_DB_DATA += mtag_about.schema
 218 SMATCH_DB_DATA += type_info.schema
 219 SMATCH_DB_DATA += fn_data_link.schema
 220 SMATCH_DB_DATA += mtag_alias.schema
 221 SMATCH_DB_DATA += type_size.schema
 222 SMATCH_DB_DATA += fn_ptr_data_link.schema
 223 SMATCH_DB_DATA += mtag_data.schema

 224 SMATCH_DB_DATA += type_value.schema
 225 
 226 ROOTONBLDDATAFILES = $(SMATCH_DATA:%=$(SMATCHDATADIR)/smatch_data/%)
 227 ROOTONBLDDATAFILES += $(SMATCH_DB_DATA:%=$(SMATCHDATADIR)/smatch_data/db/%)
 228 
 229 BUILT_HEADERS = src/version.h src/check_list_local.h
 230 
 231 .KEEP_STATE:
 232 
 233 .PARALLEL: $(OBJS)
 234 
 235 all: $(PROG)
 236 
 237 install: all .WAIT $(ROOTONBLDMACHPROG) $(ROOTONBLDDATAFILES)
 238 
 239 clean:
 240         rm -f $(OBJS) $(BUILT_HEADERS)
 241 
 242 $(ROOTONBLDDATAFILES): $(SMATCHDATADIR)/smatch_data/db
 243 




   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-5
  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 # When we use builtins, then ld's -zguidance will complain that libm is
  35 # unused on x86 because the compiler will replace ceil(3M) with its own copy.
  36 # However, on SPARC, it doesn't. So for now we disable builtins to make it
  37 # consistent.
  38 CFLAGS = -O -m64 -std=gnu99 -nodefaultlibs -D__sun $($(MACH)_SMATCHFLAGS)
  39 CFLAGS += -fno-builtin
  40 CFLAGS += -Wall -Wno-unknown-pragmas -Wno-psabi
  41 
  42 SMATCHDATADIR = $(ROOTONBLDSHARE)/smatch
  43 


 204 SMATCH_DB_DATA += common_caller_info.schema
 205 SMATCH_DB_DATA += function_type_info.schema
 206 SMATCH_DB_DATA += parameter_name.schema
 207 SMATCH_DB_DATA += constraints.schema
 208 SMATCH_DB_DATA += function_type_size.schema
 209 SMATCH_DB_DATA += return_implies.schema
 210 SMATCH_DB_DATA += constraints_required.schema
 211 SMATCH_DB_DATA += function_type_value.schema
 212 SMATCH_DB_DATA += return_states.schema
 213 SMATCH_DB_DATA += data_info.schema
 214 SMATCH_DB_DATA += local_values.schema
 215 SMATCH_DB_DATA += sink_info.schema
 216 SMATCH_DB_DATA += db.schema
 217 SMATCH_DB_DATA += mtag_about.schema
 218 SMATCH_DB_DATA += type_info.schema
 219 SMATCH_DB_DATA += fn_data_link.schema
 220 SMATCH_DB_DATA += mtag_alias.schema
 221 SMATCH_DB_DATA += type_size.schema
 222 SMATCH_DB_DATA += fn_ptr_data_link.schema
 223 SMATCH_DB_DATA += mtag_data.schema
 224 SMATCH_DB_DATA += mtag_info.schema
 225 SMATCH_DB_DATA += type_value.schema
 226 
 227 ROOTONBLDDATAFILES = $(SMATCH_DATA:%=$(SMATCHDATADIR)/smatch_data/%)
 228 ROOTONBLDDATAFILES += $(SMATCH_DB_DATA:%=$(SMATCHDATADIR)/smatch_data/db/%)
 229 
 230 BUILT_HEADERS = src/version.h src/check_list_local.h
 231 
 232 .KEEP_STATE:
 233 
 234 .PARALLEL: $(OBJS)
 235 
 236 all: $(PROG)
 237 
 238 install: all .WAIT $(ROOTONBLDMACHPROG) $(ROOTONBLDDATAFILES)
 239 
 240 clean:
 241         rm -f $(OBJS) $(BUILT_HEADERS)
 242 
 243 $(ROOTONBLDDATAFILES): $(SMATCHDATADIR)/smatch_data/db
 244