Print this page
11506 smatch resync
   1 #
   2 # This file and its contents are supplied under the terms of the
   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 
  12 #
  13 # Copyright 2017 Toomas Soome <tsoome@me.com>

  14 #
  15 
  16 # loader.help build needs better awk
  17 AWK=            /usr/xpg4/bin/awk
  18 LD=             $(GNU_ROOT)/bin/gld
  19 OBJCOPY=        $(GNU_ROOT)/bin/gobjcopy
  20 OBJDUMP=        $(GNU_ROOT)/bin/gobjdump
  21 GSTRIP=         $(GNU_ROOT)/bin/gstrip
  22 
  23 # Default Console font setup.
  24 # We want it to be the same as kernel.
  25 # We build compressed, stripped down version of the default font, so we have
  26 # bare minimum for case we can not load font from the OS root.
  27 
  28 FONT=           8x16
  29 FONT_SRC=       ter-u16n.bdf
  30 FONT_DIR=       $(SRC)/data/consfonts
  31 
  32 PNGLITE=        $(SRC)/common/pnglite
  33 


  35 LIBSRC=         $(SRC)/boot/lib
  36 SASRC=          $(LIBSRC)/libstand
  37 ZFSSRC=         $(SASRC)/zfs
  38 ZLIB=           $(SRC)/contrib/zlib
  39 
  40 # set standard values
  41 AS_CPPFLAGS=
  42 CPPFLAGS=       -D_STANDALONE -_gcc=-nostdinc
  43 CFLAGS64=       -_gcc=-mno-red-zone
  44 
  45 CFLAGS=         -_gcc=-Os -_gcc=-fPIC -_gcc=-ffreestanding -_gcc=-fno-builtin
  46 CFLAGS +=       -_gcc=-ffunction-sections -_gcc=-fdata-sections
  47 CFLAGS +=       -_gcc=-mno-mmx -_gcc=-mno-3dnow -_gcc=-mno-sse -_gcc=-mno-sse2
  48 CFLAGS +=       -_gcc=-mno-sse3 -_gcc=-msoft-float
  49 CFLAGS +=       -_gcc=-mno-avx -_gcc=-mno-aes
  50 CFLAGS +=       -_gcc=-Wall
  51 CFLAGS +=       $(CCNOAUTOINLINE) $(CCNOREORDER) $(CSTD_GNU99)
  52 CCASFLAGS=      -fPIC -Wa,--divide
  53 ASFLAGS=        --divide
  54 




  55 # smatch does not define __amd64 and __amd64__
  56 SMATCH_amd64=   -_smatch=-D__amd64 -_smatch=-D__amd64__
  57 
  58 # SMATCH_ARGS will bring in set of -Wno-* options.
  59 #CFLAGS +=      $(SMATCH_ARGS:%=-_smatch=%)
  60 CFLAGS +=       $(SMOFF:%=-_smatch=--disable=%)
  61 CFLAGS +=       $(SMATCH_$(MACHINE))


  62 
  63 COMPILE.S=      $(CC) $(SMATCH_off) $(CCASFLAGS) $(CPPFLAGS) -c
  64 
  65 ROOT_BOOT=      $(ROOT)/boot
  66 ROOTBOOTPROG=$(PROG:%=$(ROOT_BOOT)/%)
  67 
  68 $(ROOT_BOOT)/%: %
  69         $(INS.file)
  70 
  71 #.if ${MACHINE_CPUARCH} == "arm"
  72 # Do not generate movt/movw, because the relocation fixup for them does not
  73 # translate to the -Bsymbolic -pie format required by self_reloc() in loader(8).
  74 # Also, the fpu is not available in a standalone environment.
  75 #CFLAGS.clang+=  -mllvm -arm-use-movt=0
  76 #CFLAGS.clang+=  -mfpu=none
  77 #.endif
   1 #
   2 # This file and its contents are supplied under the terms of the
   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 
  12 #
  13 # Copyright 2017 Toomas Soome <tsoome@me.com>
  14 # Copyright 2019 Joyent, Inc.
  15 #
  16 
  17 # loader.help build needs better awk
  18 AWK=            /usr/xpg4/bin/awk
  19 LD=             $(GNU_ROOT)/bin/gld
  20 OBJCOPY=        $(GNU_ROOT)/bin/gobjcopy
  21 OBJDUMP=        $(GNU_ROOT)/bin/gobjdump
  22 GSTRIP=         $(GNU_ROOT)/bin/gstrip
  23 
  24 # Default Console font setup.
  25 # We want it to be the same as kernel.
  26 # We build compressed, stripped down version of the default font, so we have
  27 # bare minimum for case we can not load font from the OS root.
  28 
  29 FONT=           8x16
  30 FONT_SRC=       ter-u16n.bdf
  31 FONT_DIR=       $(SRC)/data/consfonts
  32 
  33 PNGLITE=        $(SRC)/common/pnglite
  34 


  36 LIBSRC=         $(SRC)/boot/lib
  37 SASRC=          $(LIBSRC)/libstand
  38 ZFSSRC=         $(SASRC)/zfs
  39 ZLIB=           $(SRC)/contrib/zlib
  40 
  41 # set standard values
  42 AS_CPPFLAGS=
  43 CPPFLAGS=       -D_STANDALONE -_gcc=-nostdinc
  44 CFLAGS64=       -_gcc=-mno-red-zone
  45 
  46 CFLAGS=         -_gcc=-Os -_gcc=-fPIC -_gcc=-ffreestanding -_gcc=-fno-builtin
  47 CFLAGS +=       -_gcc=-ffunction-sections -_gcc=-fdata-sections
  48 CFLAGS +=       -_gcc=-mno-mmx -_gcc=-mno-3dnow -_gcc=-mno-sse -_gcc=-mno-sse2
  49 CFLAGS +=       -_gcc=-mno-sse3 -_gcc=-msoft-float
  50 CFLAGS +=       -_gcc=-mno-avx -_gcc=-mno-aes
  51 CFLAGS +=       -_gcc=-Wall
  52 CFLAGS +=       $(CCNOAUTOINLINE) $(CCNOREORDER) $(CSTD_GNU99)
  53 CCASFLAGS=      -fPIC -Wa,--divide
  54 ASFLAGS=        --divide
  55 
  56 SMATCH_ =
  57 SMATCH_on =
  58 SMATCH_off = -_smatch=off
  59 
  60 # smatch does not define __amd64 and __amd64__
  61 SMATCH_amd64=   -_smatch=-D__amd64 -_smatch=-D__amd64__
  62 
  63 # SMATCH_ARGS will bring in set of -Wno-* options.
  64 #CFLAGS +=      $(SMATCH_ARGS:%=-_smatch=%)
  65 CFLAGS +=       $(SMOFF:%=-_smatch=--disable=%)
  66 CFLAGS +=       $(SMATCH_$(MACHINE))
  67 CFLAGS +=       $(SMATCH_$(SMATCH))
  68 CFLAGS +=       -_smatch=--timeout=0
  69 
  70 COMPILE.S=      $(CC) $(SMATCH_off) $(CCASFLAGS) $(CPPFLAGS) -c
  71 
  72 ROOT_BOOT=      $(ROOT)/boot
  73 ROOTBOOTPROG=$(PROG:%=$(ROOT_BOOT)/%)
  74 
  75 $(ROOT_BOOT)/%: %
  76         $(INS.file)
  77 
  78 #.if ${MACHINE_CPUARCH} == "arm"
  79 # Do not generate movt/movw, because the relocation fixup for them does not
  80 # translate to the -Bsymbolic -pie format required by self_reloc() in loader(8).
  81 # Also, the fpu is not available in a standalone environment.
  82 #CFLAGS.clang+=  -mllvm -arm-use-movt=0
  83 #CFLAGS.clang+=  -mfpu=none
  84 #.endif