Print this page
11736 Stop using $VERSION for the genunix label
Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
Reviewed by: Andy Stormont <astormont@racktopsystems.com>
Reviewed by: Toomas Soome <tsoome@me.com>


 320 # Sigh.  Apparently at some time in the past there was a confusion on
 321 # whether the name is SRC_CONFFILE or SRC_CONFILE.  Consistency with the
 322 # other names would indicate SRC_CONFFILE, but the voting is >180 Makefiles
 323 # with SRC_CONFILE and about 11 with SRC_CONFFILE.  Software development
 324 # isn't a popularity contest, though, and so my inclination is to define
 325 # both names for now and incrementally convert to SRC_CONFFILE to be consistent
 326 # with the other names.
 327 #
 328 CONFFILE                = $(MODULE).conf
 329 SRC_CONFFILE            = $(CONF_SRCDIR)/$(CONFFILE)
 330 SRC_CONFILE             = $(SRC_CONFFILE)
 331 ROOT_CONFFILE_32        = $(ROOTMODULE).conf
 332 ROOT_CONFFILE_64        = $(ROOTMODULE:%/$(SUBDIR64)/$(MODULE)=%/$(MODULE)).conf
 333 ROOT_CONFFILE           = $(ROOT_CONFFILE_$(CLASS))
 334 
 335 
 336 INS.conffile= \
 337         $(RM) $@; $(INS) -s -m $(CFILEMODE) -f $(@D) $(SRC_CONFFILE)
 338 
 339 #











 340 # The CTF merge of child kernel modules is performed against one of the genunix
 341 # modules.  For Intel builds, all modules will be used with a single genunix:
 342 # the one built in intel/genunix.  For SPARC builds, a given
 343 # module may be
 344 # used with one of a number of genunix files, depending on what platform the
 345 # module is deployed on.  We merge against the sun4u genunix to optimize for
 346 # the common case.  We also merge against the ip driver since networking is
 347 # typically loaded and types defined therein are shared between many modules.
 348 #
 349 CTFMERGE_GUDIR_sparc    = sun4u
 350 CTFMERGE_GUDIR_i386     = intel
 351 CTFMERGE_GUDIR          = $(CTFMERGE_GUDIR_$(MACH))
 352 
 353 CTFMERGE_GENUNIX        = \
 354         $(UTSBASE)/$(CTFMERGE_GUDIR)/genunix/$(OBJS_DIR)/genunix
 355 
 356 #
 357 # Used to uniquify a non-genunix module against genunix. $VERSION is used
 358 # for the label.
 359 #
 360 # For the ease of developers dropping modules onto possibly unrelated systems,
 361 # you can set NO_GENUNIX_UNIQUIFY= in the environment to skip uniquifying
 362 # against genunix.
 363 #

 364 NO_GENUNIX_UNIQUIFY=$(POUND_SIGN)
 365 CTFMERGE_GENUNIX_DFLAG=-d $(CTFMERGE_GENUNIX)
 366 $(NO_GENUNIX_UNIQUIFY)CTFMERGE_GENUNIX_DFLAG=
 367 
 368 CTFMERGE_UNIQUIFY_AGAINST_GENUNIX       = \
 369         $(CTFMERGE) $(CTFMRGFLAGS) -L VERSION \
 370         $(CTFMERGE_GENUNIX_DFLAG) -o $@ $(OBJECTS) $(CTFEXTRAOBJS)
 371 
 372 #
 373 # Used to merge the genunix module.
 374 #
 375 CTFMERGE_GENUNIX_MERGE          = \
 376         $(CTFMERGE) $(CTFMRGFLAGS) -L VERSION -o $@ \
 377         $(OBJECTS) $(CTFEXTRAOBJS) $(IPCTF_TARGET)
 378 
 379 #
 380 # We ctfmerge the ip objects into genunix to maximize the number of common types
 381 # found there, thus maximizing the effectiveness of uniquification.  We don't
 382 # want the genunix build to have to know about the individual ip objects, so we
 383 # put them in an archive.  The genunix ctfmerge then includes this archive.
 384 #
 385 IPCTF           = $(IPDRV_DIR)/$(OBJS_DIR)/ipctf.a
 386 
 387 #
 388 # Rule for building fake shared libraries used for symbol resolution
 389 # when building other modules.  -znoreloc is needed here to avoid
 390 # tripping over code that isn't really suitable for shared libraries.
 391 #
 392 BUILD.SO                = \
 393         $(LD) -o $@ $(GSHARED) $(ZNORELOC) -h $(SONAME)
 394 
 395 #
 396 # SONAME defaults for common fake shared libraries.


 645 #
 646 $(NOT_RELEASE_BUILD)$(OBJS_DIR)/unix_bb.o   := CPPFLAGS     += -DKCOV
 647 $(NOT_RELEASE_BUILD)$(OBJS_DIR)/unix_bb.ln  := CPPFLAGS     += -DKCOV
 648 
 649 #
 650 #       Do not let unix_bb.o get compiled with -xa!
 651 #
 652 $(OBJS_DIR)/unix_bb.o   := XAOPT =
 653 
 654 #
 655 # Privilege files
 656 #
 657 PRIVS_AWK = $(SRC)/uts/common/os/privs.awk
 658 PRIVS_DEF = $(SRC)/uts/common/os/priv_defs
 659 
 660 #
 661 # USB device data
 662 #
 663 USBDEVS_AWK =   $(SRC)/uts/common/io/usb/usbdevs2h.awk
 664 USBDEVS_DATA =  $(SRC)/uts/common/io/usb/usbdevs
 665 
 666 
 667 #
 668 # If we're using the newer CTF tools, then we need to make sure that we
 669 # are building with the private -X option to ctfconvert which allows us
 670 # to fixup the struct cpu to account for machcpu.
 671 #
 672 $(BUILD_NEW_CTF_TOOLS)CTFCVTFLAGS += -X


 320 # Sigh.  Apparently at some time in the past there was a confusion on
 321 # whether the name is SRC_CONFFILE or SRC_CONFILE.  Consistency with the
 322 # other names would indicate SRC_CONFFILE, but the voting is >180 Makefiles
 323 # with SRC_CONFILE and about 11 with SRC_CONFFILE.  Software development
 324 # isn't a popularity contest, though, and so my inclination is to define
 325 # both names for now and incrementally convert to SRC_CONFFILE to be consistent
 326 # with the other names.
 327 #
 328 CONFFILE                = $(MODULE).conf
 329 SRC_CONFFILE            = $(CONF_SRCDIR)/$(CONFFILE)
 330 SRC_CONFILE             = $(SRC_CONFFILE)
 331 ROOT_CONFFILE_32        = $(ROOTMODULE).conf
 332 ROOT_CONFFILE_64        = $(ROOTMODULE:%/$(SUBDIR64)/$(MODULE)=%/$(MODULE)).conf
 333 ROOT_CONFFILE           = $(ROOT_CONFFILE_$(CLASS))
 334 
 335 
 336 INS.conffile= \
 337         $(RM) $@; $(INS) -s -m $(CFILEMODE) -f $(@D) $(SRC_CONFFILE)
 338 
 339 #
 340 # By default, instead of $VERSION, we use $(UTS_LABEL), which is by
 341 # default set to $RELEASE aka "5.11".
 342 #
 343 # $VERSION changes when the git HEAD changes, leading to annoying merge
 344 # uniquification conflicts when doing partial builds during development.
 345 # The information from $VERSION is available via "buildversion" anyway.
 346 #
 347 CTFCVTFLAGS = -X -l "$(UTS_LABEL)"
 348 CTFMRGFLAGS += -l "$(UTS_LABEL)"
 349 
 350 #
 351 # The CTF merge of child kernel modules is performed against one of the genunix
 352 # modules.  For Intel builds, all modules will be used with a single genunix:
 353 # the one built in intel/genunix.  For SPARC builds, a given
 354 # module may be
 355 # used with one of a number of genunix files, depending on what platform the
 356 # module is deployed on.  We merge against the sun4u genunix to optimize for
 357 # the common case.  We also merge against the ip driver since networking is
 358 # typically loaded and types defined therein are shared between many modules.
 359 #
 360 CTFMERGE_GUDIR_sparc    = sun4u
 361 CTFMERGE_GUDIR_i386     = intel
 362 CTFMERGE_GUDIR          = $(CTFMERGE_GUDIR_$(MACH))
 363 
 364 CTFMERGE_GENUNIX        = \
 365         $(UTSBASE)/$(CTFMERGE_GUDIR)/genunix/$(OBJS_DIR)/genunix
 366 
 367 #
 368 # Used to uniquify a non-genunix module against genunix.

 369 #
 370 # For the ease of developers dropping modules onto possibly unrelated systems,
 371 # you can set NO_GENUNIX_UNIQUIFY= in the environment to skip uniquifying
 372 # against genunix.
 373 #
 374 #
 375 NO_GENUNIX_UNIQUIFY=$(POUND_SIGN)
 376 CTFMERGE_GENUNIX_DFLAG=-d $(CTFMERGE_GENUNIX)
 377 $(NO_GENUNIX_UNIQUIFY)CTFMERGE_GENUNIX_DFLAG=
 378 
 379 CTFMERGE_UNIQUIFY_AGAINST_GENUNIX = \
 380         $(CTFMERGE) $(CTFMRGFLAGS) $(CTFMERGE_GENUNIX_DFLAG) \
 381         -o $@ $(OBJECTS) $(CTFEXTRAOBJS)
 382 
 383 #
 384 # Used to merge the genunix module.
 385 #
 386 CTFMERGE_GENUNIX_MERGE = \
 387         $(CTFMERGE) $(CTFMRGFLAGS) -o $@ \
 388         $(OBJECTS) $(CTFEXTRAOBJS) $(IPCTF_TARGET)
 389 
 390 #
 391 # We ctfmerge the ip objects into genunix to maximize the number of common types
 392 # found there, thus maximizing the effectiveness of uniquification.  We don't
 393 # want the genunix build to have to know about the individual ip objects, so we
 394 # put them in an archive.  The genunix ctfmerge then includes this archive.
 395 #
 396 IPCTF           = $(IPDRV_DIR)/$(OBJS_DIR)/ipctf.a
 397 
 398 #
 399 # Rule for building fake shared libraries used for symbol resolution
 400 # when building other modules.  -znoreloc is needed here to avoid
 401 # tripping over code that isn't really suitable for shared libraries.
 402 #
 403 BUILD.SO                = \
 404         $(LD) -o $@ $(GSHARED) $(ZNORELOC) -h $(SONAME)
 405 
 406 #
 407 # SONAME defaults for common fake shared libraries.


 656 #
 657 $(NOT_RELEASE_BUILD)$(OBJS_DIR)/unix_bb.o   := CPPFLAGS     += -DKCOV
 658 $(NOT_RELEASE_BUILD)$(OBJS_DIR)/unix_bb.ln  := CPPFLAGS     += -DKCOV
 659 
 660 #
 661 #       Do not let unix_bb.o get compiled with -xa!
 662 #
 663 $(OBJS_DIR)/unix_bb.o   := XAOPT =
 664 
 665 #
 666 # Privilege files
 667 #
 668 PRIVS_AWK = $(SRC)/uts/common/os/privs.awk
 669 PRIVS_DEF = $(SRC)/uts/common/os/priv_defs
 670 
 671 #
 672 # USB device data
 673 #
 674 USBDEVS_AWK =   $(SRC)/uts/common/io/usb/usbdevs2h.awk
 675 USBDEVS_DATA =  $(SRC)/uts/common/io/usb/usbdevs