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>

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/Makefile.uts
          +++ new/usr/src/uts/Makefile.uts
↓ open down ↓ 329 lines elided ↑ open up ↑
 330  330  SRC_CONFILE             = $(SRC_CONFFILE)
 331  331  ROOT_CONFFILE_32        = $(ROOTMODULE).conf
 332  332  ROOT_CONFFILE_64        = $(ROOTMODULE:%/$(SUBDIR64)/$(MODULE)=%/$(MODULE)).conf
 333  333  ROOT_CONFFILE           = $(ROOT_CONFFILE_$(CLASS))
 334  334  
 335  335  
 336  336  INS.conffile= \
 337  337          $(RM) $@; $(INS) -s -m $(CFILEMODE) -f $(@D) $(SRC_CONFFILE)
 338  338  
 339  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 +#
 340  351  # The CTF merge of child kernel modules is performed against one of the genunix
 341  352  # modules.  For Intel builds, all modules will be used with a single genunix:
 342  353  # the one built in intel/genunix.  For SPARC builds, a given
 343  354  # module may be
 344  355  # used with one of a number of genunix files, depending on what platform the
 345  356  # module is deployed on.  We merge against the sun4u genunix to optimize for
 346  357  # the common case.  We also merge against the ip driver since networking is
 347  358  # typically loaded and types defined therein are shared between many modules.
 348  359  #
 349  360  CTFMERGE_GUDIR_sparc    = sun4u
 350  361  CTFMERGE_GUDIR_i386     = intel
 351  362  CTFMERGE_GUDIR          = $(CTFMERGE_GUDIR_$(MACH))
 352  363  
 353  364  CTFMERGE_GENUNIX        = \
 354  365          $(UTSBASE)/$(CTFMERGE_GUDIR)/genunix/$(OBJS_DIR)/genunix
 355  366  
 356  367  #
 357      -# Used to uniquify a non-genunix module against genunix. $VERSION is used
 358      -# for the label.
      368 +# Used to uniquify a non-genunix module against genunix.
 359  369  #
 360  370  # For the ease of developers dropping modules onto possibly unrelated systems,
 361  371  # you can set NO_GENUNIX_UNIQUIFY= in the environment to skip uniquifying
 362  372  # against genunix.
 363  373  #
      374 +#
 364  375  NO_GENUNIX_UNIQUIFY=$(POUND_SIGN)
 365  376  CTFMERGE_GENUNIX_DFLAG=-d $(CTFMERGE_GENUNIX)
 366  377  $(NO_GENUNIX_UNIQUIFY)CTFMERGE_GENUNIX_DFLAG=
 367  378  
 368      -CTFMERGE_UNIQUIFY_AGAINST_GENUNIX       = \
 369      -        $(CTFMERGE) $(CTFMRGFLAGS) -L VERSION \
 370      -        $(CTFMERGE_GENUNIX_DFLAG) -o $@ $(OBJECTS) $(CTFEXTRAOBJS)
      379 +CTFMERGE_UNIQUIFY_AGAINST_GENUNIX = \
      380 +        $(CTFMERGE) $(CTFMRGFLAGS) $(CTFMERGE_GENUNIX_DFLAG) \
      381 +        -o $@ $(OBJECTS) $(CTFEXTRAOBJS)
 371  382  
 372  383  #
 373  384  # Used to merge the genunix module.
 374  385  #
 375      -CTFMERGE_GENUNIX_MERGE          = \
 376      -        $(CTFMERGE) $(CTFMRGFLAGS) -L VERSION -o $@ \
      386 +CTFMERGE_GENUNIX_MERGE = \
      387 +        $(CTFMERGE) $(CTFMRGFLAGS) -o $@ \
 377  388          $(OBJECTS) $(CTFEXTRAOBJS) $(IPCTF_TARGET)
 378  389  
 379  390  #
 380  391  # We ctfmerge the ip objects into genunix to maximize the number of common types
 381  392  # found there, thus maximizing the effectiveness of uniquification.  We don't
 382  393  # want the genunix build to have to know about the individual ip objects, so we
 383  394  # put them in an archive.  The genunix ctfmerge then includes this archive.
 384  395  #
 385  396  IPCTF           = $(IPDRV_DIR)/$(OBJS_DIR)/ipctf.a
 386  397  
↓ open down ↓ 268 lines elided ↑ open up ↑
 655  666  # Privilege files
 656  667  #
 657  668  PRIVS_AWK = $(SRC)/uts/common/os/privs.awk
 658  669  PRIVS_DEF = $(SRC)/uts/common/os/priv_defs
 659  670  
 660  671  #
 661  672  # USB device data
 662  673  #
 663  674  USBDEVS_AWK =   $(SRC)/uts/common/io/usb/usbdevs2h.awk
 664  675  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
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX