518 # The Sun Studio 11 compiler has changed the behaviour of integer
519 # wrap arounds and so a flag is needed to use the legacy behaviour
520 # (without this flag panics/hangs could be exposed within the source).
521 #
522 sparc_IROPTFLAG = -W2,-xwrap_int
523 sparcv9_IROPTFLAG = -W2,-xwrap_int
524 i386_IROPTFLAG =
525 amd64_IROPTFLAG =
526
527 IROPTFLAG = $($(MACH)_IROPTFLAG)
528 IROPTFLAG64 = $($(MACH64)_IROPTFLAG)
529
530 sparc_XREGSFLAG = -xregs=no%appl
531 sparcv9_XREGSFLAG = -xregs=no%appl
532 i386_XREGSFLAG =
533 amd64_XREGSFLAG =
534
535 XREGSFLAG = $($(MACH)_XREGSFLAG)
536 XREGSFLAG64 = $($(MACH64)_XREGSFLAG)
537
538 CFLAGS= $(COPTFLAG) $($(MACH)_CFLAGS) $(SPACEFLAG) $(CCMODE) \
539 $(ILDOFF) $(CERRWARN) $(C99MODE) $(CCUNBOUND) $(IROPTFLAG) \
540 $(CGLOBALSTATIC) $(CCNOAUTOINLINE)
541 CFLAGS64= $(COPTFLAG64) $($(MACH64)_CFLAGS) $(SPACEFLAG64) $(CCMODE64) \
542 $(ILDOFF) $(CERRWARN) $(C99MODE) $(CCUNBOUND) $(IROPTFLAG64) \
543 $(CGLOBALSTATIC) $(CCNOAUTOINLINE)
544 #
545 # Flags that are used to build parts of the code that are subsequently
546 # run on the build machine (also known as the NATIVE_BUILD).
547 #
548 NATIVE_CFLAGS= $(COPTFLAG) $($(NATIVE_MACH)_CFLAGS) $(CCMODE) \
549 $(ILDOFF) $(CERRWARN) $(C99MODE) $($(NATIVE_MACH)_CCUNBOUND) \
550 $(IROPTFLAG) $(CGLOBALSTATIC) $(CCNOAUTOINLINE)
551
552 DTEXTDOM=-DTEXT_DOMAIN=\"$(TEXT_DOMAIN)\" # For messaging.
553 DTS_ERRNO=-D_TS_ERRNO
554 CPPFLAGS.master=$(DTEXTDOM) $(DTS_ERRNO) \
555 $(ENVCPPFLAGS1) $(ENVCPPFLAGS2) $(ENVCPPFLAGS3) $(ENVCPPFLAGS4)
556 CPPFLAGS.native=$(ENVCPPFLAGS1) $(ENVCPPFLAGS2) $(ENVCPPFLAGS3) $(ENVCPPFLAGS4)
557 CPPFLAGS= $(CPPFLAGS.master)
558 AS_CPPFLAGS= $(CPPFLAGS.master)
559 JAVAFLAGS= -deprecation
560
561 #
562 # For source message catalogue
563 #
564 .SUFFIXES: $(SUFFIXES) .i .po
565 MSGROOT= $(ROOT)/catalog
566 MSGDOMAIN= $(MSGROOT)/$(TEXT_DOMAIN)
567 MSGDOMAINPOFILE = $(MSGDOMAIN)/$(POFILE)
568 DCMSGDOMAIN= $(MSGROOT)/LC_TIME/$(TEXT_DOMAIN)
569 DCMSGDOMAINPOFILE = $(DCMSGDOMAIN)/$(DCFILE:.dc=.po)
570
592 -Qoption ccfe -messages=no%anachronism \
593 -Qoption ccfe -features=no%conststrings \
594 $(CCCREGSYM) \
595 $(CCERRWARN)
596 i386_CCFLAGS= -compat=4 \
597 -Qoption ccfe -messages=no%anachronism \
598 -Qoption ccfe -features=no%conststrings \
599 $(CCERRWARN)
600 amd64_CCFLAGS= $(amd64_XARCH) -compat=5 \
601 -Qoption ccfe -messages=no%anachronism \
602 -Qoption ccfe -features=no%conststrings \
603 $(CCERRWARN)
604
605 sparc_CCOPTFLAG= -O
606 sparcv9_CCOPTFLAG= -O
607 i386_CCOPTFLAG= -O
608 amd64_CCOPTFLAG= -O
609
610 CCOPTFLAG= $($(MACH)_CCOPTFLAG)
611 CCOPTFLAG64= $($(MACH64)_CCOPTFLAG)
612 CCFLAGS= $(CCOPTFLAG) $($(MACH)_CCFLAGS)
613 CCFLAGS64= $(CCOPTFLAG64) $($(MACH64)_CCFLAGS)
614
615 #
616 #
617 #
618 ELFWRAP_FLAGS =
619 ELFWRAP_FLAGS64 = -64
620
621 #
622 # Various mapfiles that are used throughout the build, and delivered to
623 # /usr/lib/ld.
624 #
625 MAPFILE.NED_i386 = $(SRC)/common/mapfiles/common/map.noexdata
626 MAPFILE.NED_sparc =
627 MAPFILE.NED = $(MAPFILE.NED_$(MACH))
628 MAPFILE.PGA = $(SRC)/common/mapfiles/common/map.pagealign
629 MAPFILE.NES = $(SRC)/common/mapfiles/common/map.noexstk
630 MAPFILE.FLT = $(SRC)/common/mapfiles/common/map.filter
631 MAPFILE.LEX = $(SRC)/common/mapfiles/common/map.lex.yy
632
633 #
870 i386_C_BIGPICFLAGS = -K PIC
871 amd64_C_BIGPICFLAGS = -K PIC
872 C_BIGPICFLAGS = $($(MACH)_C_BIGPICFLAGS)
873 C_BIGPICFLAGS64 = $($(MACH64)_C_BIGPICFLAGS)
874
875 # CC requires there to be no space between '-K' and 'pic' or 'PIC'.
876 sparc_CC_PICFLAGS = -Kpic
877 sparcv9_CC_PICFLAGS = -KPIC
878 i386_CC_PICFLAGS = -Kpic
879 amd64_CC_PICFLAGS = -Kpic
880 CC_PICFLAGS = $($(MACH)_CC_PICFLAGS)
881 CC_PICFLAGS64 = $($(MACH64)_CC_PICFLAGS)
882
883 AS_PICFLAGS= $(C_PICFLAGS)
884 AS_BIGPICFLAGS= $(C_BIGPICFLAGS)
885
886 #
887 # Default label for CTF sections
888 #
889 CTFCVTFLAGS= -i -L VERSION
890
891 #
892 # Override to pass module-specific flags to ctfmerge. Currently used
893 # only by krtld to turn on fuzzy matching.
894 #
895 CTFMRGFLAGS=
896
897 CTFCONVERT_O = $(CTFCONVERT) $(CTFCVTFLAGS) $@
898
899 ELFSIGN_O= $(TRUE)
900 ELFSIGN_CRYPTO= $(ELFSIGN_O)
901 ELFSIGN_OBJECT= $(ELFSIGN_O)
902 $(EXPORT_RELEASE_BUILD)ELFSIGN_O = $(ELFSIGN)
903 $(EXPORT_RELEASE_BUILD)ELFSIGN_CFNAME = SUNWosnetCF
904 $(EXPORT_RELEASE_BUILD)ELFSIGN_KEY = \
905 $(CLOSED)/cmd/cmd-crypto/etc/keys/$(ELFSIGN_CFNAME)
906 $(EXPORT_RELEASE_BUILD)ELFSIGN_CERT= \
907 $(CLOSED)/cmd/cmd-crypto/etc/certs/$(ELFSIGN_CFNAME)
908 $(EXPORT_RELEASE_BUILD)ELFSIGN_SENAME = SUNWosnetSE
909 $(EXPORT_RELEASE_BUILD)ELFSIGN_SEKEY = \
910 $(CLOSED)/cmd/cmd-crypto/etc/keys/$(ELFSIGN_SENAME)
911 $(EXPORT_RELEASE_BUILD)ELFSIGN_SECERT= \
912 $(CLOSED)/cmd/cmd-crypto/etc/certs/$(ELFSIGN_SENAME)
913 $(EXPORT_RELEASE_BUILD)ELFSIGN_CRYPTO= $(ELFSIGN_O) sign \
914 $(ELFSIGN_FORMAT_OPTION) \
915 -k $(ELFSIGN_KEY) -c $(ELFSIGN_CERT) -e $@
958 # RELEASE_DATE Date of the Release Build
959 # PATCH_DATE Date the patch was created, if this is blank it
960 # will default to the RELEASE_DATE
961 #
962 RELEASE_MAJOR= 5
963 RELEASE_MINOR= 11
964 RELEASE= $(RELEASE_MAJOR).$(RELEASE_MINOR)
965 VERSION= SunOS Development
966 PATCHID= $(VERSION)
967 RELEASE_DATE= release date not set
968 PATCH_DATE= $(RELEASE_DATE)
969 RELEASE_CM= "@($(POUND_SIGN))SunOS $(RELEASE) $(PATCHID) $(PATCH_DATE)"
970 DEV_CM= "@($(POUND_SIGN))SunOS Internal Development: non-nightly build"
971
972 PROCESS_COMMENT= @?${MCS} -c -a $(RELEASE_CM) -a $(DEV_CM)
973 $(STRIP_COMMENTS)PROCESS_COMMENT= @?${MCS} -d -a $(RELEASE_CM) -a $(DEV_CM)
974 $(RELEASE_BUILD)PROCESS_COMMENT= @?${MCS} -d -a $(RELEASE_CM)
975
976 STRIP_STABS= :
977 $(RELEASE_BUILD)STRIP_STABS= $(STRIP) -x $@
978
979 POST_PROCESS_O= $(PROCESS_COMMENT) $@
980 POST_PROCESS_A=
981 POST_PROCESS_SO= $(PROCESS_COMMENT) $@ ; $(STRIP_STABS) ; \
982 $(ELFSIGN_OBJECT)
983 POST_PROCESS= $(PROCESS_COMMENT) $@ ; $(STRIP_STABS) ; \
984 $(ELFSIGN_OBJECT)
985
986 #
987 # chk4ubin is a tool that inspects a module for a symbol table
988 # ELF section size which can trigger an OBP bug on older platforms.
989 # This problem affects only specific sun4u bootable modules.
990 #
991 CHK4UBIN= $(ONBLD_TOOLS)/bin/$(MACH)/chk4ubin
992 CHK4UBINFLAGS=
993 CHK4UBINARY= $(CHK4UBIN) $(CHK4UBINFLAGS) $@
994
995 #
996 # PKGARCHIVE specifies the default location where packages should be
997 # placed if built.
|
518 # The Sun Studio 11 compiler has changed the behaviour of integer
519 # wrap arounds and so a flag is needed to use the legacy behaviour
520 # (without this flag panics/hangs could be exposed within the source).
521 #
522 sparc_IROPTFLAG = -W2,-xwrap_int
523 sparcv9_IROPTFLAG = -W2,-xwrap_int
524 i386_IROPTFLAG =
525 amd64_IROPTFLAG =
526
527 IROPTFLAG = $($(MACH)_IROPTFLAG)
528 IROPTFLAG64 = $($(MACH64)_IROPTFLAG)
529
530 sparc_XREGSFLAG = -xregs=no%appl
531 sparcv9_XREGSFLAG = -xregs=no%appl
532 i386_XREGSFLAG =
533 amd64_XREGSFLAG =
534
535 XREGSFLAG = $($(MACH)_XREGSFLAG)
536 XREGSFLAG64 = $($(MACH64)_XREGSFLAG)
537
538 # dmake SOURCEDEBUG=yes ... enables source-level debugging information, and
539 # avoids stripping it.
540 SOURCEDEBUG = $(POUND_SIGN)
541 SRCDBGBLD = $(SOURCEDEBUG:yes=)
542
543 #
544 # These variables are intended ONLY for use by developers to safely pass extra
545 # flags to the compilers without unintentionally overriding Makefile-set
546 # flags. They should NEVER be set to any value in a Makefile.
547 #
548 # They come last in the associated FLAGS variable such that they can
549 # explicitly override things if necessary, there are gaps in this, but it's
550 # the best we can manage.
551 #
552 CUSERFLAGS =
553 CUSERFLAGS64 = $(CUSERFLAGS)
554 CCUSERFLAGS =
555 CCUSERFLAGS64 = $(CCUSERFLAGS)
556
557 CSOURCEDEBUGFLAGS =
558 CCSOURCEDEBUGFLAGS =
559 $(SRCDBGBLD)CSOURCEDEBUGFLAGS = -g -xs
560 $(SRCDBGBLD)CCSOURCEDEBUGFLAGS = -g -xs
561
562 CFLAGS= $(COPTFLAG) $($(MACH)_CFLAGS) $(SPACEFLAG) $(CCMODE) \
563 $(ILDOFF) $(CERRWARN) $(C99MODE) $(CCUNBOUND) $(IROPTFLAG) \
564 $(CGLOBALSTATIC) $(CCNOAUTOINLINE) $(CSOURCEDEBUGFLAGS) \
565 $(CUSERFLAGS)
566 CFLAGS64= $(COPTFLAG64) $($(MACH64)_CFLAGS) $(SPACEFLAG64) $(CCMODE64) \
567 $(ILDOFF) $(CERRWARN) $(C99MODE) $(CCUNBOUND) $(IROPTFLAG64) \
568 $(CGLOBALSTATIC) $(CCNOAUTOINLINE) $(CSOURCEDEBUGFLAGS) \
569 $(CUSERFLAGS64)
570 #
571 # Flags that are used to build parts of the code that are subsequently
572 # run on the build machine (also known as the NATIVE_BUILD).
573 #
574 NATIVE_CFLAGS= $(COPTFLAG) $($(NATIVE_MACH)_CFLAGS) $(CCMODE) \
575 $(ILDOFF) $(CERRWARN) $(C99MODE) $($(NATIVE_MACH)_CCUNBOUND) \
576 $(IROPTFLAG) $(CGLOBALSTATIC) $(CCNOAUTOINLINE) \
577 $(CSOURCEDEBUGFLAGS) $(CUSERFLAGS)
578
579 DTEXTDOM=-DTEXT_DOMAIN=\"$(TEXT_DOMAIN)\" # For messaging.
580 DTS_ERRNO=-D_TS_ERRNO
581 CPPFLAGS.master=$(DTEXTDOM) $(DTS_ERRNO) \
582 $(ENVCPPFLAGS1) $(ENVCPPFLAGS2) $(ENVCPPFLAGS3) $(ENVCPPFLAGS4)
583 CPPFLAGS.native=$(ENVCPPFLAGS1) $(ENVCPPFLAGS2) $(ENVCPPFLAGS3) $(ENVCPPFLAGS4)
584 CPPFLAGS= $(CPPFLAGS.master)
585 AS_CPPFLAGS= $(CPPFLAGS.master)
586 JAVAFLAGS= -deprecation
587
588 #
589 # For source message catalogue
590 #
591 .SUFFIXES: $(SUFFIXES) .i .po
592 MSGROOT= $(ROOT)/catalog
593 MSGDOMAIN= $(MSGROOT)/$(TEXT_DOMAIN)
594 MSGDOMAINPOFILE = $(MSGDOMAIN)/$(POFILE)
595 DCMSGDOMAIN= $(MSGROOT)/LC_TIME/$(TEXT_DOMAIN)
596 DCMSGDOMAINPOFILE = $(DCMSGDOMAIN)/$(DCFILE:.dc=.po)
597
619 -Qoption ccfe -messages=no%anachronism \
620 -Qoption ccfe -features=no%conststrings \
621 $(CCCREGSYM) \
622 $(CCERRWARN)
623 i386_CCFLAGS= -compat=4 \
624 -Qoption ccfe -messages=no%anachronism \
625 -Qoption ccfe -features=no%conststrings \
626 $(CCERRWARN)
627 amd64_CCFLAGS= $(amd64_XARCH) -compat=5 \
628 -Qoption ccfe -messages=no%anachronism \
629 -Qoption ccfe -features=no%conststrings \
630 $(CCERRWARN)
631
632 sparc_CCOPTFLAG= -O
633 sparcv9_CCOPTFLAG= -O
634 i386_CCOPTFLAG= -O
635 amd64_CCOPTFLAG= -O
636
637 CCOPTFLAG= $($(MACH)_CCOPTFLAG)
638 CCOPTFLAG64= $($(MACH64)_CCOPTFLAG)
639 CCFLAGS= $(CCOPTFLAG) $($(MACH)_CCFLAGS) $(CCSOURCEDEBUGFLAGS) \
640 $(CCUSERFLAGS)
641 CCFLAGS64= $(CCOPTFLAG64) $($(MACH64)_CCFLAGS) $(CCSOURCEDEBUGFLAGS) \
642 $(CCUSERFLAGS64)
643
644 #
645 #
646 #
647 ELFWRAP_FLAGS =
648 ELFWRAP_FLAGS64 = -64
649
650 #
651 # Various mapfiles that are used throughout the build, and delivered to
652 # /usr/lib/ld.
653 #
654 MAPFILE.NED_i386 = $(SRC)/common/mapfiles/common/map.noexdata
655 MAPFILE.NED_sparc =
656 MAPFILE.NED = $(MAPFILE.NED_$(MACH))
657 MAPFILE.PGA = $(SRC)/common/mapfiles/common/map.pagealign
658 MAPFILE.NES = $(SRC)/common/mapfiles/common/map.noexstk
659 MAPFILE.FLT = $(SRC)/common/mapfiles/common/map.filter
660 MAPFILE.LEX = $(SRC)/common/mapfiles/common/map.lex.yy
661
662 #
899 i386_C_BIGPICFLAGS = -K PIC
900 amd64_C_BIGPICFLAGS = -K PIC
901 C_BIGPICFLAGS = $($(MACH)_C_BIGPICFLAGS)
902 C_BIGPICFLAGS64 = $($(MACH64)_C_BIGPICFLAGS)
903
904 # CC requires there to be no space between '-K' and 'pic' or 'PIC'.
905 sparc_CC_PICFLAGS = -Kpic
906 sparcv9_CC_PICFLAGS = -KPIC
907 i386_CC_PICFLAGS = -Kpic
908 amd64_CC_PICFLAGS = -Kpic
909 CC_PICFLAGS = $($(MACH)_CC_PICFLAGS)
910 CC_PICFLAGS64 = $($(MACH64)_CC_PICFLAGS)
911
912 AS_PICFLAGS= $(C_PICFLAGS)
913 AS_BIGPICFLAGS= $(C_BIGPICFLAGS)
914
915 #
916 # Default label for CTF sections
917 #
918 CTFCVTFLAGS= -i -L VERSION
919 $(SRCDBGBLD)CTFCVTFLAGS += -g
920
921 #
922 # Override to pass module-specific flags to ctfmerge. Currently used only by
923 # krtld to turn on fuzzy matching, and source-level debugging to inhibit
924 # stripping.
925 #
926 CTFMRGFLAGS=
927 $(SRCDBGBLD)CTFMRGFLAGS += -g
928
929
930 CTFCONVERT_O = $(CTFCONVERT) $(CTFCVTFLAGS) $@
931
932 ELFSIGN_O= $(TRUE)
933 ELFSIGN_CRYPTO= $(ELFSIGN_O)
934 ELFSIGN_OBJECT= $(ELFSIGN_O)
935 $(EXPORT_RELEASE_BUILD)ELFSIGN_O = $(ELFSIGN)
936 $(EXPORT_RELEASE_BUILD)ELFSIGN_CFNAME = SUNWosnetCF
937 $(EXPORT_RELEASE_BUILD)ELFSIGN_KEY = \
938 $(CLOSED)/cmd/cmd-crypto/etc/keys/$(ELFSIGN_CFNAME)
939 $(EXPORT_RELEASE_BUILD)ELFSIGN_CERT= \
940 $(CLOSED)/cmd/cmd-crypto/etc/certs/$(ELFSIGN_CFNAME)
941 $(EXPORT_RELEASE_BUILD)ELFSIGN_SENAME = SUNWosnetSE
942 $(EXPORT_RELEASE_BUILD)ELFSIGN_SEKEY = \
943 $(CLOSED)/cmd/cmd-crypto/etc/keys/$(ELFSIGN_SENAME)
944 $(EXPORT_RELEASE_BUILD)ELFSIGN_SECERT= \
945 $(CLOSED)/cmd/cmd-crypto/etc/certs/$(ELFSIGN_SENAME)
946 $(EXPORT_RELEASE_BUILD)ELFSIGN_CRYPTO= $(ELFSIGN_O) sign \
947 $(ELFSIGN_FORMAT_OPTION) \
948 -k $(ELFSIGN_KEY) -c $(ELFSIGN_CERT) -e $@
991 # RELEASE_DATE Date of the Release Build
992 # PATCH_DATE Date the patch was created, if this is blank it
993 # will default to the RELEASE_DATE
994 #
995 RELEASE_MAJOR= 5
996 RELEASE_MINOR= 11
997 RELEASE= $(RELEASE_MAJOR).$(RELEASE_MINOR)
998 VERSION= SunOS Development
999 PATCHID= $(VERSION)
1000 RELEASE_DATE= release date not set
1001 PATCH_DATE= $(RELEASE_DATE)
1002 RELEASE_CM= "@($(POUND_SIGN))SunOS $(RELEASE) $(PATCHID) $(PATCH_DATE)"
1003 DEV_CM= "@($(POUND_SIGN))SunOS Internal Development: non-nightly build"
1004
1005 PROCESS_COMMENT= @?${MCS} -c -a $(RELEASE_CM) -a $(DEV_CM)
1006 $(STRIP_COMMENTS)PROCESS_COMMENT= @?${MCS} -d -a $(RELEASE_CM) -a $(DEV_CM)
1007 $(RELEASE_BUILD)PROCESS_COMMENT= @?${MCS} -d -a $(RELEASE_CM)
1008
1009 STRIP_STABS= :
1010 $(RELEASE_BUILD)STRIP_STABS= $(STRIP) -x $@
1011 $(SRCDBGBLD)STRIP_STABS= :
1012
1013 POST_PROCESS_O= $(PROCESS_COMMENT) $@
1014 POST_PROCESS_A=
1015 POST_PROCESS_SO= $(PROCESS_COMMENT) $@ ; $(STRIP_STABS) ; \
1016 $(ELFSIGN_OBJECT)
1017 POST_PROCESS= $(PROCESS_COMMENT) $@ ; $(STRIP_STABS) ; \
1018 $(ELFSIGN_OBJECT)
1019
1020 #
1021 # chk4ubin is a tool that inspects a module for a symbol table
1022 # ELF section size which can trigger an OBP bug on older platforms.
1023 # This problem affects only specific sun4u bootable modules.
1024 #
1025 CHK4UBIN= $(ONBLD_TOOLS)/bin/$(MACH)/chk4ubin
1026 CHK4UBINFLAGS=
1027 CHK4UBINARY= $(CHK4UBIN) $(CHK4UBINFLAGS) $@
1028
1029 #
1030 # PKGARCHIVE specifies the default location where packages should be
1031 # placed if built.
|