Print this page
1961 investigate stopping uniquifying CTF information
Reviewed by: Adam Leventhal <ahl@delphix.com>
Reviewed by: Joshua M. Clulow <josh@sysmgr.org>


 292 #
 293 # Sigh.  Apparently at some time in the past there was a confusion on
 294 # whether the name is SRC_CONFFILE or SRC_CONFILE.  Consistency with the
 295 # other names would indicate SRC_CONFFILE, but the voting is >180 Makefiles
 296 # with SRC_CONFILE and about 11 with SRC_CONFFILE.  Software development
 297 # isn't a popularity contest, though, and so my inclination is to define
 298 # both names for now and incrementally convert to SRC_CONFFILE to be consistent
 299 # with the other names.
 300 #
 301 CONFFILE                = $(MODULE).conf
 302 SRC_CONFFILE            = $(CONF_SRCDIR)/$(CONFFILE)
 303 SRC_CONFILE             = $(SRC_CONFFILE)
 304 ROOT_CONFFILE_32        = $(ROOTMODULE).conf
 305 ROOT_CONFFILE_64        = $(ROOTMODULE:%/$(SUBDIR64)/$(MODULE)=%/$(MODULE)).conf
 306 ROOT_CONFFILE           = $(ROOT_CONFFILE_$(CLASS))
 307 
 308 
 309 INS.conffile= \
 310         $(RM) $@; $(INS) -s -m $(CFILEMODE) -f $(@D) $(SRC_CONFFILE)
 311 
 312 #
 313 # The CTF merge of child kernel modules is performed against one of the genunix
 314 # modules.  For Intel builds, all modules will be used with a single genunix:
 315 # the one built in intel/genunix.  For SPARC builds, a given
 316 # module may be
 317 # used with one of a number of genunix files, depending on what platform the
 318 # module is deployed on.  We merge against the sun4u genunix to optimize for
 319 # the common case.  We also merge against the ip driver since networking is
 320 # typically loaded and types defined therein are shared between many modules.
 321 #
 322 CTFMERGE_GUDIR_sparc    = sun4u
 323 CTFMERGE_GUDIR_i386     = intel
 324 CTFMERGE_GUDIR          = $(CTFMERGE_GUDIR_$(MACH))
 325 
 326 CTFMERGE_GENUNIX        = \
 327         $(UTSBASE)/$(CTFMERGE_GUDIR)/genunix/$(OBJS_DIR)/genunix
 328 
 329 #
 330 # Used to uniquify a non-genunix module against genunix. $VERSION is used
 331 # for the label.
 332 #
 333 # For the ease of developers dropping modules onto possibly unrelated systems,
 334 # you can set NO_GENUNIX_UNIQUIFY= in the environment to skip uniquifying
 335 # against genunix.
 336 #
 337 NO_GENUNIX_UNIQUIFY=$(POUND_SIGN)
 338 CTFMERGE_GENUNIX_DFLAG=-d $(CTFMERGE_GENUNIX)
 339 $(NO_GENUNIX_UNIQUIFY)CTF_GENUNIX_DFLAG=
 340 
 341 CTFMERGE_UNIQUIFY_AGAINST_GENUNIX       = \
 342         $(CTFMERGE) $(CTFMRGFLAGS) -L VERSION \
 343         $(CTFMERGE_GENUNIX_DFLAG) -o $@ $(OBJECTS) $(CTFEXTRAOBJS)
 344 
 345 #
 346 # Used to merge the genunix module.
 347 #
 348 CTFMERGE_GENUNIX_MERGE          = \
 349         $(CTFMERGE) $(CTFMRGFLAGS) -L VERSION -o $@ \
 350         $(OBJECTS) $(CTFEXTRAOBJS) $(IPCTF_TARGET)
 351 
 352 #
 353 # We ctfmerge the ip objects into genunix to maximize the number of common types
 354 # found there, thus maximizing the effectiveness of uniquification.  We don't
 355 # want the genunix build to have to know about the individual ip objects, so we
 356 # put them in an archive.  The genunix ctfmerge then includes this archive.
 357 #
 358 IPCTF           = $(IPDRV_DIR)/$(OBJS_DIR)/ipctf.a
 359 
 360 #
 361 # Rule for building fake shared libraries used for symbol resolution
 362 # when building other modules.  -znoreloc is needed here to avoid
 363 # tripping over code that isn't really suitable for shared libraries.
 364 #
 365 BUILD.SO                = \
 366         $(LD) -o $@ $(GSHARED) $(ZNORELOC) -h $(SONAME)
 367 
 368 #
 369 # SONAME defaults for common fake shared libraries.
 370 #
 371 $(LIBGEN)               := SONAME = $(MODULE)
 372 $(PLATLIB)              := SONAME = misc/platmod
 373 $(CPULIB)               := SONAME = 'cpu/$$CPU'
 374 $(DTRACESTUBS)          := SONAME = dtracestubs
 375 
 376 #
 377 #       Installation directories
 378 #




 292 #
 293 # Sigh.  Apparently at some time in the past there was a confusion on
 294 # whether the name is SRC_CONFFILE or SRC_CONFILE.  Consistency with the
 295 # other names would indicate SRC_CONFFILE, but the voting is >180 Makefiles
 296 # with SRC_CONFILE and about 11 with SRC_CONFFILE.  Software development
 297 # isn't a popularity contest, though, and so my inclination is to define
 298 # both names for now and incrementally convert to SRC_CONFFILE to be consistent
 299 # with the other names.
 300 #
 301 CONFFILE                = $(MODULE).conf
 302 SRC_CONFFILE            = $(CONF_SRCDIR)/$(CONFFILE)
 303 SRC_CONFILE             = $(SRC_CONFFILE)
 304 ROOT_CONFFILE_32        = $(ROOTMODULE).conf
 305 ROOT_CONFFILE_64        = $(ROOTMODULE:%/$(SUBDIR64)/$(MODULE)=%/$(MODULE)).conf
 306 ROOT_CONFFILE           = $(ROOT_CONFFILE_$(CLASS))
 307 
 308 
 309 INS.conffile= \
 310         $(RM) $@; $(INS) -s -m $(CFILEMODE) -f $(@D) $(SRC_CONFFILE)
 311 
 312 CTFMERGE_MODULE=        $(CTFMERGE) $(CTFMRGFLAGS) -L VERSION -o $@ $(OBJECTS) \
 313     $(CTFEXTRAOBJS)













































 314 
 315 #
 316 # Rule for building fake shared libraries used for symbol resolution
 317 # when building other modules.  -znoreloc is needed here to avoid
 318 # tripping over code that isn't really suitable for shared libraries.
 319 #
 320 BUILD.SO                = \
 321         $(LD) -o $@ $(GSHARED) $(ZNORELOC) -h $(SONAME)
 322 
 323 #
 324 # SONAME defaults for common fake shared libraries.
 325 #
 326 $(LIBGEN)               := SONAME = $(MODULE)
 327 $(PLATLIB)              := SONAME = misc/platmod
 328 $(CPULIB)               := SONAME = 'cpu/$$CPU'
 329 $(DTRACESTUBS)          := SONAME = dtracestubs
 330 
 331 #
 332 #       Installation directories
 333 #