Print this page
9852 enable ld(1) guidance and deflib assertions for the illumos build


  23 # Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
  24 # Copyright (c) 2012 by Delphix. All rights reserved.
  25 # Copyright 2014 Garrett D'Amore <garrett@damore.org>
  26 # Copyright 2015, OmniTI Computer Consulting, Inc. All rights reserved.
  27 # Copyright 2015 Gary Mills
  28 # Copyright 2015 Igor Kozhukhov <ikozhukhov@gmail.com>
  29 # Copyright 2016 Toomas Soome <tsoome@me.com>
  30 # Copyright 2018 OmniOS Community Edition (OmniOSce) Association.
  31 #
  32 
  33 #
  34 # Makefile.master, global definitions for system source
  35 #
  36 ROOT=           /proto
  37 
  38 #
  39 # Adjunct root, containing an additional proto area to be used for headers
  40 # and libraries.
  41 #
  42 ADJUNCT_PROTO=








  43 
  44 #
  45 # Adjunct for building things that run on the build machine.
  46 #
  47 NATIVE_ADJUNCT= /usr
  48 
  49 #
  50 # RELEASE_BUILD should be cleared for final release builds.
  51 # NOT_RELEASE_BUILD is exactly what the name implies.
  52 #
  53 # __GNUC toggles the building of ON components using gcc and related tools.
  54 # Normally set to `#', set it to `' to do gcc build.
  55 #
  56 # The declaration POUND_SIGN is always '#'. This is needed to get around the
  57 # make feature that '#' is always a comment delimiter, even when escaped or
  58 # quoted. We use this macro expansion method to get POUND_SIGN rather than
  59 # always breaking out a shell because the general case can cause a noticable
  60 # slowdown in build times when so many Makefiles include Makefile.master.
  61 #
  62 # While the majority of users are expected to override the setting below


 709 COMPILE.cc=     $(CCC) $(CCFLAGS) $(CPPFLAGS) -c
 710 COMPILE64.cc=   $(CCC) $(CCFLAGS64) $(CPPFLAGS) -c
 711 COMPILE.s=      $(AS) $(ASFLAGS) $(AS_CPPFLAGS)
 712 COMPILE64.s=    $(AS) $(ASFLAGS) $($(MACH64)_AS_XARCH) $(AS_CPPFLAGS)
 713 COMPILE.d=      $(DTRACE) -G -32
 714 COMPILE64.d=    $(DTRACE) -G -64
 715 COMPILE.b=      $(ELFWRAP) $(ELFWRAP_FLAGS$(CLASS))
 716 COMPILE64.b=    $(ELFWRAP) $(ELFWRAP_FLAGS$(CLASS))
 717 
 718 CLASSPATH=      .
 719 COMPILE.java=   $(JAVAC) $(JAVAFLAGS) -classpath $(CLASSPATH)
 720 
 721 #
 722 # Link time macros
 723 #
 724 CCNEEDED                = -lC
 725 CCEXTNEEDED             = -lCrun -lCstd
 726 $(__GNUC)CCNEEDED       = -L$(GCCLIBDIR) -lstdc++ -lgcc_s
 727 $(__GNUC)CCEXTNEEDED    = $(CCNEEDED)
 728 
 729 LINK.c=         $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS)
 730 LINK64.c=       $(CC) $(CFLAGS64) $(CPPFLAGS) $(LDFLAGS)









 731 NORUNPATH=      -norunpath -nolib
 732 LINK.cc=        $(CCC) $(CCFLAGS) $(CPPFLAGS) $(NORUNPATH) \
 733                 $(LDFLAGS) $(CCNEEDED)
 734 LINK64.cc=      $(CCC) $(CCFLAGS64) $(CPPFLAGS) $(NORUNPATH) \
 735                 $(LDFLAGS) $(CCNEEDED)
 736 
 737 #
 738 # lint macros
 739 #
 740 # Note that the undefine of __PRAGMA_REDEFINE_EXTNAME can be removed once
 741 # ON is built with a version of lint that has the fix for 4484186.
 742 #
 743 ALWAYS_LINT_DEFS =      -errtags=yes -s
 744 ALWAYS_LINT_DEFS +=     -erroff=E_PTRDIFF_OVERFLOW
 745 ALWAYS_LINT_DEFS +=     -erroff=E_ASSIGN_NARROW_CONV
 746 ALWAYS_LINT_DEFS +=     -U__PRAGMA_REDEFINE_EXTNAME
 747 ALWAYS_LINT_DEFS +=     $(C99LMODE)
 748 ALWAYS_LINT_DEFS +=     -errsecurity=$(SECLEVEL)
 749 ALWAYS_LINT_DEFS +=     -erroff=E_SEC_CREAT_WITHOUT_EXCL
 750 ALWAYS_LINT_DEFS +=     -erroff=E_SEC_FORBIDDEN_WARN_CREAT
 751 # XX64 -- really only needed for amd64 lint
 752 ALWAYS_LINT_DEFS +=     -erroff=E_ASSIGN_INT_TO_SMALL_INT
 753 ALWAYS_LINT_DEFS +=     -erroff=E_CAST_INT_CONST_TO_SMALL_INT
 754 ALWAYS_LINT_DEFS +=     -erroff=E_CAST_INT_TO_SMALL_INT
 755 ALWAYS_LINT_DEFS +=     -erroff=E_CAST_TO_PTR_FROM_INT


 870 ZDIRECT=        -zdirect
 871 ZIGNORE=        -zignore
 872 ZINITFIRST=     -zinitfirst
 873 ZINTERPOSE=     -zinterpose
 874 ZLAZYLOAD=      -zlazyload
 875 ZLOADFLTR=      -zloadfltr
 876 ZMULDEFS=       -zmuldefs
 877 ZNODEFAULTLIB=  -znodefaultlib
 878 ZNODEFS=        -znodefs
 879 ZNODELETE=      -znodelete
 880 ZNODLOPEN=      -znodlopen
 881 ZNODUMP=        -znodump
 882 ZNOLAZYLOAD=    -znolazyload
 883 ZNOLDYNSYM=     -znoldynsym
 884 ZNORELOC=       -znoreloc
 885 ZNOVERSION=     -znoversion
 886 ZRECORD=        -zrecord
 887 ZREDLOCSYM=     -zredlocsym
 888 ZTEXT=          -ztext
 889 ZVERBOSE=       -zverbose



 890 
 891 GSHARED=        -G
 892 CCMT=           -mt
 893 
 894 # Handle different PIC models on different ISAs
 895 # (May be overridden by lower-level Makefiles)
 896 
 897 sparc_C_PICFLAGS =      -K pic
 898 sparcv9_C_PICFLAGS =    -K pic
 899 i386_C_PICFLAGS =       -K pic
 900 amd64_C_PICFLAGS =      -K pic
 901 C_PICFLAGS =            $($(MACH)_C_PICFLAGS)
 902 C_PICFLAGS64 =          $($(MACH64)_C_PICFLAGS)
 903 
 904 sparc_C_BIGPICFLAGS =   -K PIC
 905 sparcv9_C_BIGPICFLAGS = -K PIC
 906 i386_C_BIGPICFLAGS =    -K PIC
 907 amd64_C_BIGPICFLAGS =   -K PIC
 908 C_BIGPICFLAGS =         $($(MACH)_C_BIGPICFLAGS)
 909 C_BIGPICFLAGS64 =       $($(MACH64)_C_BIGPICFLAGS)




  23 # Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
  24 # Copyright (c) 2012 by Delphix. All rights reserved.
  25 # Copyright 2014 Garrett D'Amore <garrett@damore.org>
  26 # Copyright 2015, OmniTI Computer Consulting, Inc. All rights reserved.
  27 # Copyright 2015 Gary Mills
  28 # Copyright 2015 Igor Kozhukhov <ikozhukhov@gmail.com>
  29 # Copyright 2016 Toomas Soome <tsoome@me.com>
  30 # Copyright 2018 OmniOS Community Edition (OmniOSce) Association.
  31 #
  32 
  33 #
  34 # Makefile.master, global definitions for system source
  35 #
  36 ROOT=           /proto
  37 
  38 #
  39 # Adjunct root, containing an additional proto area to be used for headers
  40 # and libraries.
  41 #
  42 ADJUNCT_PROTO=
  43 # HAVE_ADJUNCT_PROTO - ADJUNCT_PROTO is set to a non-default value
  44 # NO_ADJUNCT_PROTO - ADJUNCT_PROTO is unset
  45 #
  46 # This works by replacing any value in ADJUNCT_PROTO with POUND_SIGN, which
  47 # only happens if it has some value, and then setting HAVE_ADJUNCT_PROTO
  48 # oppositely.
  49 NO_ADJUNCT_PROTO=$(ADJUNCT_PROTO:%=$(POUND_SIGN))
  50 $(NO_ADJUNCT_PROTO)HAVE_ADJUNCT_PROTO=$(POUND_SIGN)
  51 
  52 #
  53 # Adjunct for building things that run on the build machine.
  54 #
  55 NATIVE_ADJUNCT= /usr
  56 
  57 #
  58 # RELEASE_BUILD should be cleared for final release builds.
  59 # NOT_RELEASE_BUILD is exactly what the name implies.
  60 #
  61 # __GNUC toggles the building of ON components using gcc and related tools.
  62 # Normally set to `#', set it to `' to do gcc build.
  63 #
  64 # The declaration POUND_SIGN is always '#'. This is needed to get around the
  65 # make feature that '#' is always a comment delimiter, even when escaped or
  66 # quoted. We use this macro expansion method to get POUND_SIGN rather than
  67 # always breaking out a shell because the general case can cause a noticable
  68 # slowdown in build times when so many Makefiles include Makefile.master.
  69 #
  70 # While the majority of users are expected to override the setting below


 717 COMPILE.cc=     $(CCC) $(CCFLAGS) $(CPPFLAGS) -c
 718 COMPILE64.cc=   $(CCC) $(CCFLAGS64) $(CPPFLAGS) -c
 719 COMPILE.s=      $(AS) $(ASFLAGS) $(AS_CPPFLAGS)
 720 COMPILE64.s=    $(AS) $(ASFLAGS) $($(MACH64)_AS_XARCH) $(AS_CPPFLAGS)
 721 COMPILE.d=      $(DTRACE) -G -32
 722 COMPILE64.d=    $(DTRACE) -G -64
 723 COMPILE.b=      $(ELFWRAP) $(ELFWRAP_FLAGS$(CLASS))
 724 COMPILE64.b=    $(ELFWRAP) $(ELFWRAP_FLAGS$(CLASS))
 725 
 726 CLASSPATH=      .
 727 COMPILE.java=   $(JAVAC) $(JAVAFLAGS) -classpath $(CLASSPATH)
 728 
 729 #
 730 # Link time macros
 731 #
 732 CCNEEDED                = -lC
 733 CCEXTNEEDED             = -lCrun -lCstd
 734 $(__GNUC)CCNEEDED       = -L$(GCCLIBDIR) -lstdc++ -lgcc_s
 735 $(__GNUC)CCEXTNEEDED    = $(CCNEEDED)
 736 
 737 # Libraries we expect to find in ADJUNCT_PROTO
 738 ADJUNCT_LIBS=
 739 # Libraries we expect to use natively on the build machine
 740 NATIVE_LIBS=
 741 
 742 LDCHECKS                = $(ZASSERTDEFLIB) $(ZGUIDANCE) $(ZFATALWARNINGS)
 743 LDCHECKS                += $(NATIVE_LIBS:%=$(ZASSERTDEFLIB)=%)
 744 $(NO_ADJUNCT_PROTO)LDCHECKS += $(ADJUNCT_LIBS:%=$(ZASSERTDEFLIB)=%)
 745 
 746 LINK.c=         $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $(LDCHECKS)
 747 LINK64.c=       $(CC) $(CFLAGS64) $(CPPFLAGS) $(LDFLAGS) $(LDCHECKS)
 748 NORUNPATH=      -norunpath -nolib
 749 LINK.cc=        $(CCC) $(CCFLAGS) $(CPPFLAGS) $(NORUNPATH) \
 750                 $(LDFLAGS) $(CCNEEDED) $(LDCHECKS)
 751 LINK64.cc=      $(CCC) $(CCFLAGS64) $(CPPFLAGS) $(NORUNPATH) \
 752                 $(LDFLAGS) $(CCNEEDED) $(LDCHECKS)
 753 
 754 #
 755 # lint macros
 756 #
 757 # Note that the undefine of __PRAGMA_REDEFINE_EXTNAME can be removed once
 758 # ON is built with a version of lint that has the fix for 4484186.
 759 #
 760 ALWAYS_LINT_DEFS =      -errtags=yes -s
 761 ALWAYS_LINT_DEFS +=     -erroff=E_PTRDIFF_OVERFLOW
 762 ALWAYS_LINT_DEFS +=     -erroff=E_ASSIGN_NARROW_CONV
 763 ALWAYS_LINT_DEFS +=     -U__PRAGMA_REDEFINE_EXTNAME
 764 ALWAYS_LINT_DEFS +=     $(C99LMODE)
 765 ALWAYS_LINT_DEFS +=     -errsecurity=$(SECLEVEL)
 766 ALWAYS_LINT_DEFS +=     -erroff=E_SEC_CREAT_WITHOUT_EXCL
 767 ALWAYS_LINT_DEFS +=     -erroff=E_SEC_FORBIDDEN_WARN_CREAT
 768 # XX64 -- really only needed for amd64 lint
 769 ALWAYS_LINT_DEFS +=     -erroff=E_ASSIGN_INT_TO_SMALL_INT
 770 ALWAYS_LINT_DEFS +=     -erroff=E_CAST_INT_CONST_TO_SMALL_INT
 771 ALWAYS_LINT_DEFS +=     -erroff=E_CAST_INT_TO_SMALL_INT
 772 ALWAYS_LINT_DEFS +=     -erroff=E_CAST_TO_PTR_FROM_INT


 887 ZDIRECT=        -zdirect
 888 ZIGNORE=        -zignore
 889 ZINITFIRST=     -zinitfirst
 890 ZINTERPOSE=     -zinterpose
 891 ZLAZYLOAD=      -zlazyload
 892 ZLOADFLTR=      -zloadfltr
 893 ZMULDEFS=       -zmuldefs
 894 ZNODEFAULTLIB=  -znodefaultlib
 895 ZNODEFS=        -znodefs
 896 ZNODELETE=      -znodelete
 897 ZNODLOPEN=      -znodlopen
 898 ZNODUMP=        -znodump
 899 ZNOLAZYLOAD=    -znolazyload
 900 ZNOLDYNSYM=     -znoldynsym
 901 ZNORELOC=       -znoreloc
 902 ZNOVERSION=     -znoversion
 903 ZRECORD=        -zrecord
 904 ZREDLOCSYM=     -zredlocsym
 905 ZTEXT=          -ztext
 906 ZVERBOSE=       -zverbose
 907 ZASSERTDEFLIB=  -zassert-deflib
 908 ZGUIDANCE=      -zguidance
 909 ZFATALWARNINGS= -zfatal-warnings
 910 
 911 GSHARED=        -G
 912 CCMT=           -mt
 913 
 914 # Handle different PIC models on different ISAs
 915 # (May be overridden by lower-level Makefiles)
 916 
 917 sparc_C_PICFLAGS =      -K pic
 918 sparcv9_C_PICFLAGS =    -K pic
 919 i386_C_PICFLAGS =       -K pic
 920 amd64_C_PICFLAGS =      -K pic
 921 C_PICFLAGS =            $($(MACH)_C_PICFLAGS)
 922 C_PICFLAGS64 =          $($(MACH64)_C_PICFLAGS)
 923 
 924 sparc_C_BIGPICFLAGS =   -K PIC
 925 sparcv9_C_BIGPICFLAGS = -K PIC
 926 i386_C_BIGPICFLAGS =    -K PIC
 927 amd64_C_BIGPICFLAGS =   -K PIC
 928 C_BIGPICFLAGS =         $($(MACH)_C_BIGPICFLAGS)
 929 C_BIGPICFLAGS64 =       $($(MACH64)_C_BIGPICFLAGS)