Print this page
12334 fix gcc4 build
12322 kdb: removal of unused dependency recommended
Reviewed by: Andy Stormont <astormont@racktopsystems.com>
Reviewed by: Gordon Ross <gordon.w.ross@gmail.com>


  11 # and limitations under the License.
  12 #
  13 # When distributing Covered Code, include this CDDL HEADER in each
  14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15 # If applicable, add the following below this CDDL HEADER, with the
  16 # fields enclosed by brackets "[]" replaced with your own identifying
  17 # information: Portions Copyright [yyyy] [name of copyright owner]
  18 #
  19 # CDDL HEADER END
  20 #
  21 
  22 #
  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 # Copyright 2019, Joyent, Inc.
  32 # Copyright 2019 RackTop Systems.
  33 #
  34 
  35 #
  36 # Makefile.master, global definitions for system source
  37 #
  38 ROOT=           /proto
  39 
  40 #
  41 # Adjunct root, containing an additional proto area to be used for headers
  42 # and libraries.
  43 #
  44 ADJUNCT_PROTO=
  45 # HAVE_ADJUNCT_PROTO - ADJUNCT_PROTO is set to a non-default value
  46 # NO_ADJUNCT_PROTO - ADJUNCT_PROTO is unset
  47 #
  48 # This works by replacing any value in ADJUNCT_PROTO with POUND_SIGN, which
  49 # only happens if it has some value, and then setting HAVE_ADJUNCT_PROTO
  50 # oppositely.
  51 NO_ADJUNCT_PROTO=$(ADJUNCT_PROTO:%=$(POUND_SIGN))


 796 #
 797 COMPILE.c=      $(CC) $(CFLAGS) $(CPPFLAGS) -c
 798 COMPILE64.c=    $(CC) $(CFLAGS64) $(CPPFLAGS) -c
 799 COMPILE.cc=     $(CCC) $(CCFLAGS) $(CPPFLAGS) -c
 800 COMPILE64.cc=   $(CCC) $(CCFLAGS64) $(CPPFLAGS) -c
 801 COMPILE.s=      $(AS) $(ASFLAGS) $(AS_CPPFLAGS)
 802 COMPILE64.s=    $(AS) $(ASFLAGS) $($(MACH64)_AS_XARCH) $(AS_CPPFLAGS)
 803 COMPILE.d=      $(DTRACE) -G -32
 804 COMPILE64.d=    $(DTRACE) -G -64
 805 COMPILE.b=      $(ELFWRAP) $(ELFWRAP_FLAGS$(CLASS))
 806 COMPILE64.b=    $(ELFWRAP) $(ELFWRAP_FLAGS$(CLASS))
 807 
 808 CLASSPATH=      .
 809 COMPILE.java=   $(JAVAC) $(JAVAFLAGS) -classpath $(CLASSPATH)
 810 
 811 #
 812 # Link time macros
 813 #
 814 CCNEEDED                = -lC
 815 CCEXTNEEDED             = -lCrun -lCstd

 816 $(__GNUC)CCNEEDED       = -L$(GCCLIBDIR) -lstdc++ -lgcc_s
 817 $(__GNUC)CCEXTNEEDED    = $(CCNEEDED)

 818 
 819 CCNEEDED64              = -lCrun
 820 CCEXTNEEDED64           = -lCrun -lCstd

 821 $(__GNUC64)CCNEEDED64   = -L$(GCCLIBDIR) -lstdc++ -lgcc_s

 822 $(__GNUC64)CCEXTNEEDED  = $(CCNEEDED64)
 823 
 824 # Libraries we expect to use natively on the build machine
 825 NATIVE_LIBS=
 826 
 827 LDCHECKS                = $(ZASSERTDEFLIB) $(ZGUIDANCE) $(ZFATALWARNINGS)
 828 LDCHECKS                += $(NATIVE_LIBS:%=$(ZASSERTDEFLIB)=%)
 829 
 830 LINK.c=                 $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $(LDCHECKS)
 831 LINK64.c=               $(CC) $(CFLAGS64) $(CPPFLAGS) $(LDFLAGS) $(LDCHECKS)
 832 NORUNPATH=              -norunpath -nolib
 833 LINK.cc=                $(CCC) $(CCFLAGS) $(CPPFLAGS) $(NORUNPATH) \
 834                         $(LDFLAGS) $(CCNEEDED) $(LDCHECKS)
 835 LINK64.cc=              $(CCC) $(CCFLAGS64) $(CPPFLAGS) $(NORUNPATH) \
 836                         $(LDFLAGS) $(CCNEEDED64) $(LDCHECKS)
 837 
 838 #
 839 # lint macros
 840 #
 841 # Note that the undefine of __PRAGMA_REDEFINE_EXTNAME can be removed once




  11 # and limitations under the License.
  12 #
  13 # When distributing Covered Code, include this CDDL HEADER in each
  14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15 # If applicable, add the following below this CDDL HEADER, with the
  16 # fields enclosed by brackets "[]" replaced with your own identifying
  17 # information: Portions Copyright [yyyy] [name of copyright owner]
  18 #
  19 # CDDL HEADER END
  20 #
  21 
  22 #
  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 # Copyright 2020 Joyent, Inc.
  32 # Copyright 2019 RackTop Systems.
  33 #
  34 
  35 #
  36 # Makefile.master, global definitions for system source
  37 #
  38 ROOT=           /proto
  39 
  40 #
  41 # Adjunct root, containing an additional proto area to be used for headers
  42 # and libraries.
  43 #
  44 ADJUNCT_PROTO=
  45 # HAVE_ADJUNCT_PROTO - ADJUNCT_PROTO is set to a non-default value
  46 # NO_ADJUNCT_PROTO - ADJUNCT_PROTO is unset
  47 #
  48 # This works by replacing any value in ADJUNCT_PROTO with POUND_SIGN, which
  49 # only happens if it has some value, and then setting HAVE_ADJUNCT_PROTO
  50 # oppositely.
  51 NO_ADJUNCT_PROTO=$(ADJUNCT_PROTO:%=$(POUND_SIGN))


 796 #
 797 COMPILE.c=      $(CC) $(CFLAGS) $(CPPFLAGS) -c
 798 COMPILE64.c=    $(CC) $(CFLAGS64) $(CPPFLAGS) -c
 799 COMPILE.cc=     $(CCC) $(CCFLAGS) $(CPPFLAGS) -c
 800 COMPILE64.cc=   $(CCC) $(CCFLAGS64) $(CPPFLAGS) -c
 801 COMPILE.s=      $(AS) $(ASFLAGS) $(AS_CPPFLAGS)
 802 COMPILE64.s=    $(AS) $(ASFLAGS) $($(MACH64)_AS_XARCH) $(AS_CPPFLAGS)
 803 COMPILE.d=      $(DTRACE) -G -32
 804 COMPILE64.d=    $(DTRACE) -G -64
 805 COMPILE.b=      $(ELFWRAP) $(ELFWRAP_FLAGS$(CLASS))
 806 COMPILE64.b=    $(ELFWRAP) $(ELFWRAP_FLAGS$(CLASS))
 807 
 808 CLASSPATH=      .
 809 COMPILE.java=   $(JAVAC) $(JAVAFLAGS) -classpath $(CLASSPATH)
 810 
 811 #
 812 # Link time macros
 813 #
 814 CCNEEDED                = -lC
 815 CCEXTNEEDED             = -lCrun -lCstd
 816 NATIVECCNEEDED          = -lC
 817 $(__GNUC)CCNEEDED       = -L$(GCCLIBDIR) -lstdc++ -lgcc_s
 818 $(__GNUC)CCEXTNEEDED    = $(CCNEEDED)
 819 $(__GNUC)NATIVECCNEEDED = -R$(GCCLIBDIR) -L$(GCCLIBDIR) -lstdc++ -lgcc_s
 820 
 821 CCNEEDED64              = -lCrun
 822 CCEXTNEEDED64           = -lCrun -lCstd
 823 NATIVECCNEEDED64        = -lCrun
 824 $(__GNUC64)CCNEEDED64   = -L$(GCCLIBDIR) -lstdc++ -lgcc_s
 825 $(__GNUC64)NATIVECCNEEDED64 = -R$(GCCLIBDIR) -L$(GCCLIBDIR) -lstdc++ -lgcc_s
 826 $(__GNUC64)CCEXTNEEDED  = $(CCNEEDED64)
 827 
 828 # Libraries we expect to use natively on the build machine
 829 NATIVE_LIBS=
 830 
 831 LDCHECKS                = $(ZASSERTDEFLIB) $(ZGUIDANCE) $(ZFATALWARNINGS)
 832 LDCHECKS                += $(NATIVE_LIBS:%=$(ZASSERTDEFLIB)=%)
 833 
 834 LINK.c=                 $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $(LDCHECKS)
 835 LINK64.c=               $(CC) $(CFLAGS64) $(CPPFLAGS) $(LDFLAGS) $(LDCHECKS)
 836 NORUNPATH=              -norunpath -nolib
 837 LINK.cc=                $(CCC) $(CCFLAGS) $(CPPFLAGS) $(NORUNPATH) \
 838                         $(LDFLAGS) $(CCNEEDED) $(LDCHECKS)
 839 LINK64.cc=              $(CCC) $(CCFLAGS64) $(CPPFLAGS) $(NORUNPATH) \
 840                         $(LDFLAGS) $(CCNEEDED64) $(LDCHECKS)
 841 
 842 #
 843 # lint macros
 844 #
 845 # Note that the undefine of __PRAGMA_REDEFINE_EXTNAME can be removed once