diff options
Diffstat (limited to 'usr/src/lib/Makefile.lib')
-rw-r--r-- | usr/src/lib/Makefile.lib | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/usr/src/lib/Makefile.lib b/usr/src/lib/Makefile.lib index 5574164fb5..a1078ffc89 100644 --- a/usr/src/lib/Makefile.lib +++ b/usr/src/lib/Makefile.lib @@ -20,6 +20,7 @@ # # Copyright 2015 Gary Mills # Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2015, Joyent, Inc. # # # Definitions common to libraries. @@ -135,6 +136,23 @@ SONAME= $(DYNLIB) # combining relocations into one relocation table reduces startup costs. # All options are tunable to allow overload/omission from lower makefiles. +# +# DTrace related rules +# +# These allow for multiple USDT providers to be specified by a library. +# If a library needs to break up the set of objects that are passed to +# the dtrace -G invocation, then they can place the following in heir +# Makefile.com: +# +# pics/<provider>.o := USDT_G_PICS = <files> +# +# <provider> should be replaced with the basename of one of the USDT +# providers specified in USDT_PROVIDERS in their Makefile.com. +# +USDT_HEADERS= $(USDT_PROVIDERS:%.d=%_impl.h) +USDT_PICS= $(USDT_PROVIDERS:%.d=pics/%.o) +USDT_G_PICS= $(PICS) + HSONAME= -h$(SONAME) DYNFLAGS= $(HSONAME) $(ZTEXT) $(ZDEFS) $(BDIRECT) \ @@ -157,7 +175,7 @@ SRCS= $(OBJECTS:%.o=$(SRCDIR)/%.c) # overridden locally when extra processing is needed BUILD.AR= $(AR) $(ARFLAGS) $@ $(AROBJS) BUILD.SO= $(CC) $(CFLAGS) -o $@ $(GSHARED) $(DYNFLAGS) \ - $(PICS) $(EXTPICS) $(LDLIBS) + $(PICS) $(EXTPICS) $(USDT_PICS) $(LDLIBS) BUILDCCC.SO= $(CCC) $(CCFLAGS) -o $@ $(GSHARED) $(DYNFLAGS) \ $(PICS) $(EXTPICS) $(LDLIBS) @@ -254,3 +272,15 @@ TARGETMACH= $(MACH) # shouldn't override this - they should override $(CLOBBERFILES) instead. # CLOBBERTARGFILES= $(LIBS) $(DYNLIB) $(CLOBBERFILES) + +# +# Define the default ctfdiff invocation used to check a list of types +# supplied by a user of a library. The goal is to validate that a given +# series of types is the same in both a 32-bit and 64-bit artifact. This +# is only defined if we have a 64-bit build to do. +# +TYPECHECK_LIB32 = $(TYPECHECK_LIB:%=$(MACH)/%) +TYPECHECK_LIB64 = $(TYPECHECK_LIB:%=$(MACH64)/%) +TYPECHECK_LIST= $(TYPELIST:%=-T %) +$(BUILD64)TYPECHECK.lib = $(CTFDIFF) -t -I $(TYPECHECK_LIST) $(TYPECHECK_LIB32) $(TYPECHECK_LIB64) +TYPECHECK = $(TYPECHECK_LIB:%=%.typecheck) |