author  Norm Jacobs <Norm.Jacobs@Oracle.COM> 
Sun, 13 Mar 2011 16:12:25 0700  
changeset 127  3e3c266b3a81 
parent 120  ef1efc113f13 
child 131  651976f969f6 
permissions  rwrr 
2  1 
# 
2 
# CDDL HEADER START 

3 
# 

4 
# The contents of this file are subject to the terms of the 

5 
# Common Development and Distribution License (the "License"). 

6 
# You may not use this file except in compliance with the License. 

7 
# 

8 
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 

9 
# or http://www.opensolaris.org/os/licensing. 

10 
# See the License for the specific language governing permissions 

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 
# 

58
d8024c042a00
7011369 gmake complains about fresh userland bits
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
53
diff
changeset

21 
# Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved. 
2  22 
# 
23 

32
280a7444e782
automatically generate intercomponent dependencies for build ordering
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
31
diff
changeset

24 
PATH=/usr/bin:/usr/gnu/bin 
280a7444e782
automatically generate intercomponent dependencies for build ordering
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
31
diff
changeset

25 

127
3e3c266b3a81
7013705 userland build needs local tarball caching
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
120
diff
changeset

26 
# Default to looking for source archives on the internal mirror before we 
3e3c266b3a81
7013705 userland build needs local tarball caching
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
120
diff
changeset

27 
# hammer on the external repositories. 
3e3c266b3a81
7013705 userland build needs local tarball caching
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
120
diff
changeset

28 
export DOWNLOAD_SEARCH_PATH = http://userland.us.oracle.com/sourcearchives/ 
3e3c266b3a81
7013705 userland build needs local tarball caching
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
120
diff
changeset

29 

3e3c266b3a81
7013705 userland build needs local tarball caching
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
120
diff
changeset

30 
# The workspace starts at the mercurial root 
3e3c266b3a81
7013705 userland build needs local tarball caching
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
120
diff
changeset

31 
export WS_TOP ?= $(shell hg root) 
3e3c266b3a81
7013705 userland build needs local tarball caching
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
120
diff
changeset

32 

2  33 
CONSOLIDATION = userland 
34 
PUBLISHER = $(CONSOLIDATION)build 

26
8a9f4e791832
packaging changes including canonical manifest support with manifest validation
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
16
diff
changeset

35 

38
cd00ea74156e
package audits should pass pkglint
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
34
diff
changeset

36 
IS_GLOBAL_ZONE = $(shell /usr/sbin/zoneadm list  grep c global) 
cd00ea74156e
package audits should pass pkglint
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
34
diff
changeset

37 
ROOT = / 
cd00ea74156e
package audits should pass pkglint
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
34
diff
changeset

38 

29
eb4177698749
Generate the build number from the most recent mercurial tag
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
26
diff
changeset

39 
# get the most recent build number from the last mercurial tag 
93
b579c7b1bb44
7016731 move zsh from sfw to userland
Danek Duvall <danek.duvall@oracle.com>
parents:
85
diff
changeset

40 
LAST_HG_TAG = $(shell hg tags q  grep build  head 1) 
29
eb4177698749
Generate the build number from the most recent mercurial tag
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
26
diff
changeset

41 
LAST_BUILD_NUM = $(LAST_HG_TAG:build%=%) 
eb4177698749
Generate the build number from the most recent mercurial tag
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
26
diff
changeset

42 

26
8a9f4e791832
packaging changes including canonical manifest support with manifest validation
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
16
diff
changeset

43 
OS_VERSION = $(shell uname r) 
8a9f4e791832
packaging changes including canonical manifest support with manifest validation
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
16
diff
changeset

44 
SOLARIS_VERSION = $(OS_VERSION:5.%=2.%) 
29
eb4177698749
Generate the build number from the most recent mercurial tag
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
26
diff
changeset

45 
BUILD_NUM = 0.$(shell expr $(LAST_BUILD_NUM) + 1) 
26
8a9f4e791832
packaging changes including canonical manifest support with manifest validation
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
16
diff
changeset

46 
BUILD_VERSION = $(OS_VERSION)$(BUILD_NUM) 
2  47 

38
cd00ea74156e
package audits should pass pkglint
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
34
diff
changeset

48 

2  49 
COMPILER = studio 
6
20f80c019d73
add compiler date/time chatter reduction tools
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
2
diff
changeset

50 
BITS = 32 
2  51 
PYTHON_VERSION = 2.6 
58
d8024c042a00
7011369 gmake complains about fresh userland bits
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
53
diff
changeset

52 
PYTHON_VERSIONS = 2.6 
2  53 

54 
WS_LOGS = $(WS_TOP)/logs 

34
d20b10eba317
prepare for zone based component builds
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
32
diff
changeset

55 
WS_REPO = $(WS_TOP)/repo 
d20b10eba317
prepare for zone based component builds
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
32
diff
changeset

56 
WS_TOOLS = $(WS_TOP)/tools 
d20b10eba317
prepare for zone based component builds
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
32
diff
changeset

57 
WS_MAKE_RULES = $(WS_TOP)/makerules 
d20b10eba317
prepare for zone based component builds
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
32
diff
changeset

58 
WS_COMPONENTS = $(WS_TOP)/components 
49  59 
WS_INCORPORATIONS = $(WS_TOP)/incorporations 
70
c610cf9d3d5d
7016863 userland build fails in parallel
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
64
diff
changeset

60 
WS_LINT_CACHE = $(WS_TOP)/pkglintcache 
2  61 

34
d20b10eba317
prepare for zone based component builds
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
32
diff
changeset

62 
BASS_O_MATIC = $(WS_TOOLS)/bassomatic 
d20b10eba317
prepare for zone based component builds
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
32
diff
changeset

63 

94
e2364cad23ff
7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
93
diff
changeset

64 
CLONEY = $(WS_TOOLS)/cloney 
e2364cad23ff
7019782 move tcsh to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
93
diff
changeset

65 

34
d20b10eba317
prepare for zone based component builds
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
32
diff
changeset

66 
PKG_REPO = file:$(WS_REPO) 
59
7500d63edb42
7012375 userland build and proto areas should be outside of unpacked source dirs
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
58
diff
changeset

67 

72
4c33a310f793
7015633 move gtar to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
70
diff
changeset

68 
COMPONENT_DIR = $(shell pwd) 
4c33a310f793
7015633 move gtar to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
70
diff
changeset

69 
SOURCE_DIR = $(COMPONENT_DIR)/$(COMPONENT_SRC) 
4c33a310f793
7015633 move gtar to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
70
diff
changeset

70 
BUILD_DIR = $(COMPONENT_DIR)/build 
59
7500d63edb42
7012375 userland build and proto areas should be outside of unpacked source dirs
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
58
diff
changeset

71 
PROTO_DIR = $(BUILD_DIR)/prototype/$(MACH) 
2  72 

85
8098282b503b
7018226 move GNU screen to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
82
diff
changeset

73 
ETCDIR = /etc 
61
7684fe2a9eb5
7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
59
diff
changeset

74 
USRDIR = /usr 
7684fe2a9eb5
7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
59
diff
changeset

75 
BINDIR = /bin 
7684fe2a9eb5
7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
59
diff
changeset

76 
LIBDIR = /lib 
7684fe2a9eb5
7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
59
diff
changeset

77 
USRBINDIR = $(USRDIR)/bin 
7684fe2a9eb5
7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
59
diff
changeset

78 
USRLIBDIR = $(USRDIR)/lib 
7684fe2a9eb5
7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
59
diff
changeset

79 
USRSHAREDIR = $(USRDIR)/share 
7684fe2a9eb5
7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
59
diff
changeset

80 
USRSHAREMANDIR = $(USRSHAREDIR)/man 
7684fe2a9eb5
7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
59
diff
changeset

81 
USRSHAREMAN1DIR = $(USRSHAREMANDIR)/man1 
7684fe2a9eb5
7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
59
diff
changeset

82 
USRSHAREMAN3DIR = $(USRSHAREMANDIR)/man3 
74
7e35801ce8b8
7016379 migrate elinks to userland
Kevin Crowe <Kevin.Crowe@oracle.com>
parents:
72
diff
changeset

83 
USRSHAREMAN5DIR = $(USRSHAREMANDIR)/man5 
61
7684fe2a9eb5
7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
59
diff
changeset

84 
USRLIBDIR64 = $(USRDIR)/lib/$(MACH64) 
85
8098282b503b
7018226 move GNU screen to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
82
diff
changeset

85 
PROTOETCDIR = $(PROTO_DIR)/$(ETCDIR) 
61
7684fe2a9eb5
7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
59
diff
changeset

86 
PROTOUSRDIR = $(PROTO_DIR)/$(USRDIR) 
7684fe2a9eb5
7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
59
diff
changeset

87 
PROTOUSRBINDIR = $(PROTO_DIR)/$(USRBINDIR) 
7684fe2a9eb5
7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
59
diff
changeset

88 
PROTOUSRLIBDIR = $(PROTO_DIR)/$(USRLIBDIR) 
7684fe2a9eb5
7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
59
diff
changeset

89 
PROTOUSRLIBDIR64 = $(PROTO_DIR)/$(USRLIBDIR64) 
7684fe2a9eb5
7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
59
diff
changeset

90 
PROTOUSRSHAREDIR = $(PROTO_DIR)/$(USRSHAREDIR) 
7684fe2a9eb5
7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
59
diff
changeset

91 
PROTOUSRSHAREMANDIR = $(PROTO_DIR)/$(USRSHAREMANDIR) 
7684fe2a9eb5
7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
59
diff
changeset

92 
PROTOUSRSHAREMAN1DIR = $(PROTO_DIR)/$(USRSHAREMAN1DIR) 
7684fe2a9eb5
7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
59
diff
changeset

93 
PROTOUSRSHAREMAN3DIR = $(PROTO_DIR)/$(USRSHAREMAN3DIR) 
7684fe2a9eb5
7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
59
diff
changeset

94 

7684fe2a9eb5
7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
59
diff
changeset

95 

43
9f5ebe30300c
switch to CBE sunstudio12.1 compilers
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
40
diff
changeset

96 
SFWBIN = /usr/sfw/bin 
9f5ebe30300c
switch to CBE sunstudio12.1 compilers
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
40
diff
changeset

97 
SFWLIB = /usr/sfw/lib 
120
ef1efc113f13
7021528 move bison/gsed to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
116
diff
changeset

98 
SFWLIB64 = /usr/sfw/lib/$(MACH64) 
64
a4b12971cf99
7014330 has userland lost its mapfile mind?
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
62
diff
changeset

99 
SFWSHARE = /usr/sfw/share 
a4b12971cf99
7014330 has userland lost its mapfile mind?
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
62
diff
changeset

100 
SFWSHAREMAN = /usr/sfw/share/man 
a4b12971cf99
7014330 has userland lost its mapfile mind?
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
62
diff
changeset

101 
SFWSHAREMAN1 = /usr/sfw/share/man/man1 
43
9f5ebe30300c
switch to CBE sunstudio12.1 compilers
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
40
diff
changeset

102 
PROTOSFWBIN = $(PROTO_DIR)/$(SFWBIN) 
9f5ebe30300c
switch to CBE sunstudio12.1 compilers
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
40
diff
changeset

103 
PROTOSFWLIB = $(PROTO_DIR)/$(SFWLIB) 
120
ef1efc113f13
7021528 move bison/gsed to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
116
diff
changeset

104 
PROTOSFWLIB64 = $(PROTO_DIR)/$(SFWLIB64) 
64
a4b12971cf99
7014330 has userland lost its mapfile mind?
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
62
diff
changeset

105 
PROTOSFWSHARE = $(PROTO_DIR)/$(SFWSHARE) 
a4b12971cf99
7014330 has userland lost its mapfile mind?
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
62
diff
changeset

106 
PROTOSFWSHAREMAN = $(PROTO_DIR)/$(SFWSHAREMAN) 
a4b12971cf99
7014330 has userland lost its mapfile mind?
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
62
diff
changeset

107 
PROTOSFWSHAREMAN1 = $(PROTO_DIR)/$(SFWSHAREMAN1) 
a4b12971cf99
7014330 has userland lost its mapfile mind?
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
62
diff
changeset

108 

a4b12971cf99
7014330 has userland lost its mapfile mind?
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
62
diff
changeset

109 
GNUBIN = /usr/gnu/bin 
a4b12971cf99
7014330 has userland lost its mapfile mind?
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
62
diff
changeset

110 
GNUSHARE = /usr/gnu/share 
a4b12971cf99
7014330 has userland lost its mapfile mind?
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
62
diff
changeset

111 
GNUSHAREMAN = /usr/gnu/share/man 
a4b12971cf99
7014330 has userland lost its mapfile mind?
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
62
diff
changeset

112 
GNUSHAREMAN1 = /usr/gnu/share/man/man1 
a4b12971cf99
7014330 has userland lost its mapfile mind?
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
62
diff
changeset

113 
PROTOGNUBIN = $(PROTO_DIR)/$(GNUBIN) 
a4b12971cf99
7014330 has userland lost its mapfile mind?
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
62
diff
changeset

114 
PROTOGNUSHARE = $(PROTO_DIR)/$(GNUSHARE) 
a4b12971cf99
7014330 has userland lost its mapfile mind?
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
62
diff
changeset

115 
PROTOGNUSHAREMAN = $(PROTO_DIR)/$(GNUSHAREMAN) 
a4b12971cf99
7014330 has userland lost its mapfile mind?
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
62
diff
changeset

116 
PROTOGNUSHAREMAN1 = $(PROTO_DIR)/$(GNUSHAREMAN1) 
43
9f5ebe30300c
switch to CBE sunstudio12.1 compilers
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
40
diff
changeset

117 

16
33aaaec59991
update _DATE/_TIME compiler chatter reduction bits.
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
12
diff
changeset

118 
# work around _TIME, _DATE, embedded date chatter in component builds 
33aaaec59991
update _DATE/_TIME compiler chatter reduction bits.
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
12
diff
changeset

119 
# to use, set TIME_CONSTANT in the component Makefile and add $(CONSTANT_TIME) 
33aaaec59991
update _DATE/_TIME compiler chatter reduction bits.
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
12
diff
changeset

120 
# to the appropriate {CONFIGUREBUILDINSTALL}_ENV 
34
d20b10eba317
prepare for zone based component builds
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
32
diff
changeset

121 
CONSTANT_TIME = LD_PRELOAD_32=$(WS_TOOLS)/time$(MACH32).so 
d20b10eba317
prepare for zone based component builds
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
32
diff
changeset

122 
CONSTANT_TIME += LD_PRELOAD_64=$(WS_TOOLS)/time$(MACH64).so 
16
33aaaec59991
update _DATE/_TIME compiler chatter reduction bits.
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
12
diff
changeset

123 
CONSTANT_TIME += TIME_CONSTANT=$(TIME_CONSTANT) 
6
20f80c019d73
add compiler date/time chatter reduction tools
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
2
diff
changeset

124 

12
41aeb1fd8c2d
Fix MACH32/MACH64 so more than one architecture can build in the same workspace
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
7
diff
changeset

125 
# set MACH from uname p to either sparc or i386 
41aeb1fd8c2d
Fix MACH32/MACH64 so more than one architecture can build in the same workspace
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
7
diff
changeset

126 
MACH = $(shell uname p) 
41aeb1fd8c2d
Fix MACH32/MACH64 so more than one architecture can build in the same workspace
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
7
diff
changeset

127 

41aeb1fd8c2d
Fix MACH32/MACH64 so more than one architecture can build in the same workspace
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
7
diff
changeset

128 
# set MACH32 from MACH to either sparcv7 or i86 
41aeb1fd8c2d
Fix MACH32/MACH64 so more than one architecture can build in the same workspace
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
7
diff
changeset

129 
MACH32_1 = $(MACH:sparc=sparcv7) 
41aeb1fd8c2d
Fix MACH32/MACH64 so more than one architecture can build in the same workspace
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
7
diff
changeset

130 
MACH32 = $(MACH32_1:i386=i86) 
41aeb1fd8c2d
Fix MACH32/MACH64 so more than one architecture can build in the same workspace
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
7
diff
changeset

131 

41aeb1fd8c2d
Fix MACH32/MACH64 so more than one architecture can build in the same workspace
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
7
diff
changeset

132 
# set MACH64 from MACH to either sparcv9 or amd64 
41aeb1fd8c2d
Fix MACH32/MACH64 so more than one architecture can build in the same workspace
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
7
diff
changeset

133 
MACH64_1 = $(MACH:sparc=sparcv9) 
41aeb1fd8c2d
Fix MACH32/MACH64 so more than one architecture can build in the same workspace
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
7
diff
changeset

134 
MACH64 = $(MACH64_1:i386=amd64) 
41aeb1fd8c2d
Fix MACH32/MACH64 so more than one architecture can build in the same workspace
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
7
diff
changeset

135 

61
7684fe2a9eb5
7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
59
diff
changeset

136 
BUILD_DIR_32 = $(BUILD_DIR)/$(MACH32) 
7684fe2a9eb5
7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
59
diff
changeset

137 
BUILD_DIR_64 = $(BUILD_DIR)/$(MACH64) 
7684fe2a9eb5
7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
59
diff
changeset

138 

7684fe2a9eb5
7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
59
diff
changeset

139 
BUILD_32 = $(BUILD_DIR_32)/.built 
7684fe2a9eb5
7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
59
diff
changeset

140 
BUILD_64 = $(BUILD_DIR_64)/.built 
12
41aeb1fd8c2d
Fix MACH32/MACH64 so more than one architecture can build in the same workspace
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
7
diff
changeset

141 
BUILD_32_and_64 = $(BUILD_32) $(BUILD_64) 
41aeb1fd8c2d
Fix MACH32/MACH64 so more than one architecture can build in the same workspace
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
7
diff
changeset

142 

61
7684fe2a9eb5
7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
59
diff
changeset

143 
INSTALL_32 = $(BUILD_DIR_32)/.installed 
7684fe2a9eb5
7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
59
diff
changeset

144 
INSTALL_64 = $(BUILD_DIR_64)/.installed 
12
41aeb1fd8c2d
Fix MACH32/MACH64 so more than one architecture can build in the same workspace
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
7
diff
changeset

145 
INSTALL_32_and_64 = $(INSTALL_32) $(INSTALL_64) 
2  146 

99
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

147 
TEST_32 = $(BUILD_DIR_32)/.tested 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

148 
TEST_64 = $(BUILD_DIR_64)/.tested 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

149 
TEST_32_and_64 = $(TEST_32) $(TEST_64) 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

150 

40
84267c1130e9
fix SPRO_ROOT usage to match ON and SFW and not be confusing
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
38
diff
changeset

151 
# BUILD_TOOLS is the root of all tools not normally installed on the system. 
84267c1130e9
fix SPRO_ROOT usage to match ON and SFW and not be confusing
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
38
diff
changeset

152 
BUILD_TOOLS = /ws/onnvtools 
84267c1130e9
fix SPRO_ROOT usage to match ON and SFW and not be confusing
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
38
diff
changeset

153 

84267c1130e9
fix SPRO_ROOT usage to match ON and SFW and not be confusing
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
38
diff
changeset

154 
SPRO_ROOT = $(BUILD_TOOLS)/SUNWspro 
43
9f5ebe30300c
switch to CBE sunstudio12.1 compilers
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
40
diff
changeset

155 
SPRO_VROOT = $(SPRO_ROOT)/sunstudio12.1 
40
84267c1130e9
fix SPRO_ROOT usage to match ON and SFW and not be confusing
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
38
diff
changeset

156 

127
3e3c266b3a81
7013705 userland build needs local tarball caching
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
120
diff
changeset

157 
GCC_ROOT = /usr/sfw 
2  158 

99
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

159 
CC.studio.32 = $(SPRO_VROOT)/bin/cc 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

160 
CCC.studio.32 = $(SPRO_VROOT)/bin/CC 
2  161 

99
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

162 
CC.studio.64 = $(SPRO_VROOT)/bin/cc 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

163 
CCC.studio.64 = $(SPRO_VROOT)/bin/CC 
2  164 

127
3e3c266b3a81
7013705 userland build needs local tarball caching
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
120
diff
changeset

165 
CC.gcc.32 = $(GCC_ROOT)/bin/gcc m32 
3e3c266b3a81
7013705 userland build needs local tarball caching
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
120
diff
changeset

166 
CCC.gcc.32 = $(GCC_ROOT)/bin/g++ m32 
2  167 

127
3e3c266b3a81
7013705 userland build needs local tarball caching
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
120
diff
changeset

168 
CC.gcc.64 = $(GCC_ROOT)/bin/gcc m64 
3e3c266b3a81
7013705 userland build needs local tarball caching
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
120
diff
changeset

169 
CCC.gcc.64 = $(GCC_ROOT)/bin/g++ m64 
2  170 

171 
CC = $(CC.$(COMPILER).$(BITS)) 

172 
CCC = $(CCC.$(COMPILER).$(BITS)) 

173 

61
7684fe2a9eb5
7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
59
diff
changeset

174 
lint.32 = $(SPRO_VROOT)/bin/lint m32 
7684fe2a9eb5
7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
59
diff
changeset

175 
lint.64 = $(SPRO_VROOT)/bin/lint m64 
7684fe2a9eb5
7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
59
diff
changeset

176 

7684fe2a9eb5
7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
59
diff
changeset

177 
LINT = $(lint.$(BITS)) 
7684fe2a9eb5
7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
59
diff
changeset

178 

16
33aaaec59991
update _DATE/_TIME compiler chatter reduction bits.
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
12
diff
changeset

179 
LD = /usr/bin/ld 
33aaaec59991
update _DATE/_TIME compiler chatter reduction bits.
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
12
diff
changeset

180 

2  181 
PYTHON.2.6.32 = /usr/bin/python2.6 
47
28ef4b1fcfb1
64bit python should use $(MACH64), not amd64
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
43
diff
changeset

182 
PYTHON.2.6.64 = /usr/bin/$(MACH64)/python2.6 
2  183 

184 
PYTHON.32 = $(PYTHON.$(PYTHON_VERSION).$(BITS)) 

185 
PYTHON.64 = $(PYTHON.$(PYTHON_VERSION).$(BITS)) 

186 

116
ae6a90899b42
7022452 move ant to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
109
diff
changeset

187 
JAVA_HOME = /usr/jdk/instances/jdk1.6.0 
ae6a90899b42
7022452 move ant to userland
Petr Sumbera <petr.sumbera@oracle.com>
parents:
109
diff
changeset

188 

127
3e3c266b3a81
7013705 userland build needs local tarball caching
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
120
diff
changeset

189 
PERL = /usr/perl5/bin/perl 
3e3c266b3a81
7013705 userland build needs local tarball caching
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
120
diff
changeset

190 

2  191 
GMAKE = /usr/gnu/bin/make 
192 
GPATCH = /usr/gnu/bin/patch 

82
2f155565730b
7017244 move ggrep to userland (fix mismerge)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
80
diff
changeset

193 
PATCH_LEVEL = 1 
99
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

194 
GPATCH_BACKUP = backup versioncontrol=numbered 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

195 
GPATCH_FLAGS = p$(PATCH_LEVEL) $(GPATCH_BACKUP) 
2  196 

105
da9e87a40aec
7021891 repo created by build should be v4, not v3
Danek Duvall <danek.duvall@oracle.com>
parents:
102
diff
changeset

197 
PKGREPO = /usr/bin/pkgrepo 
2  198 
PKGSEND = /usr/bin/pkgsend 
70
c610cf9d3d5d
7016863 userland build fails in parallel
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
64
diff
changeset

199 
PKGLINT = /usr/bin/pkglint 
2  200 

201 
TOUCH = /usr/bin/touch 

202 
MKDIR = /bin/mkdir p 

203 
RM = /bin/rm f 

7
d42300cb8715
add license/copyright info for ips generation
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
6
diff
changeset

204 
CP = /bin/cp f 
43
9f5ebe30300c
switch to CBE sunstudio12.1 compilers
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
40
diff
changeset

205 
LN = /bin/ln 
9f5ebe30300c
switch to CBE sunstudio12.1 compilers
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
40
diff
changeset

206 
SYMLINK = /bin/ln s 
16
33aaaec59991
update _DATE/_TIME compiler chatter reduction bits.
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
12
diff
changeset

207 
ENV = /usr/bin/env 
43
9f5ebe30300c
switch to CBE sunstudio12.1 compilers
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents:
40
diff
changeset

208 
INSTALL = /usr/bin/ginstall 
61
7684fe2a9eb5
7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
59
diff
changeset

209 

7684fe2a9eb5
7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
59
diff
changeset

210 
INS.dir= $(INSTALL) d [email protected] 
7684fe2a9eb5
7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
59
diff
changeset

211 
INS.file= $(INSTALL) m 444 $< $(@D) 
7684fe2a9eb5
7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
59
diff
changeset

212 

7684fe2a9eb5
7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
59
diff
changeset

213 
# 
99
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

214 
# C preprocessor flag sets to ease feature selection. Add the required 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

215 
# feature to your Makefile with CPPFLAGS += $(FEATURE_MACRO) and add to 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

216 
# the component build with CONFIGURE_OPTIONS += CPPFLAGS="$(CPPFLAGS)" or 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

217 
# similiar. 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

218 
# 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

219 

c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

220 
# Enables visibility of some c99 math functions that aren't visible by default. 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

221 
# What other sideeffects are there? 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

222 
CPP_C99_EXTENDED_MATH = D_STDC_99 
61
7684fe2a9eb5
7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
59
diff
changeset

223 

99
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

224 
# Enables large file support for components that have no other means of doing 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

225 
# so. Use CPP_LARGEFILES and not the .32/.64 variety directly 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

226 
CPP_LARGEFILES.32 = $(shell getconf LFS_CFLAGS) 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

227 
CPP_LARGEFILES.64 = $(shell getconf LFS64_CFLAGS) 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

228 
CPP_LARGEFILES = $(CPP_LARGEFILES.$(BITS)) 
61
7684fe2a9eb5
7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
59
diff
changeset

229 

99
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

230 
# Enables some #pragma redefine_extname to POSIXcompliant Standard C Library 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

231 
# functions. Also avoids the component's #define _POSIX_C_SOURCE to some value 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

232 
# we currently do not support. 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

233 
CPP_POSIX = D_POSIX_C_SOURCE=200112L D_POSIX_PTHREAD_SEMANTICS 
61
7684fe2a9eb5
7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
59
diff
changeset

234 

7684fe2a9eb5
7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
59
diff
changeset

235 
# XPG6 mode. This option enables XPG6 conformance, plus extensions. 
7684fe2a9eb5
7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
59
diff
changeset

236 
# Amongst other things, this option will cause system calls like 
7684fe2a9eb5
7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
59
diff
changeset

237 
# popen (3C) and system (3C) to invoke the standardsconforming 
99
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

238 
# shell, /usr/xpg4/bin/sh, instead of /usr/bin/sh. Add studio_XPG6MODE to 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

239 
# CFLAGS instead of using this directly 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

240 
CPP_XPG6MODE= D_XOPEN_SOURCE=600 D__EXTENSIONS__=1 D_XPG6 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

241 

c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

242 

c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

243 
# 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

244 
# Studio C compiler flag sets to ease feature selection. Add the required 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

245 
# feature to your Makefile with CFLAGS += $(FEATURE_MACRO) and add to the 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

246 
# component build with CONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)" or similiar. 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

247 
# 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

248 

c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

249 
# Generate 32/64 bit objects 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

250 
CC_BITS = m$(BITS) 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

251 

c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

252 
# Code generation instruction set and optimization 'hints'. Use studio_XBITS 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

253 
# and not the .arch.bits variety directly. 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

254 
studio_XBITS.sparc.32 = xtarget=ultra2 xarch=sparcvis xchip=ultra2 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

255 
studio_XBITS.sparc.64 = xtarget=ultra2 xarch=sparcvis xchip=ultra2 
102
1a8b07a3e826
7020772 userland build should provide more macros for common flags (fix cflags)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
99
diff
changeset

256 
studio_XBITS.i386.32 = xchip=pentium 
108
2cfc48b87a85
7020772 userland build should provide more macros for common flags (fix cflags)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
105
diff
changeset

257 
studio_XBITS.i386.64 = xchip=generic Ui386 U__i386 
102
1a8b07a3e826
7020772 userland build should provide more macros for common flags (fix cflags)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
99
diff
changeset

258 
studio_XBITS = $(studio_XBITS.$(MACH).$(BITS)) 
61
7684fe2a9eb5
7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
59
diff
changeset

259 

99
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

260 
# Turn on recognition of supported C99 language features and enable the 1999 C 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

261 
# standard library semantics of routines that appear in both the 1990 and 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

262 
# 1999 C standard. To use set studio_C99MODE=$(studio_99_ENABLE) in your 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

263 
# component Makefile. 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

264 
studio_C99_ENABLE = xc99=all 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

265 

c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

266 
# Turn off recognition of C99 language features, and do not enable the 1999 C 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

267 
# standard library semantics of routines that appeared in both the 1990 and 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

268 
# 1999 C standard. To use set studio_C99MODE=$(studio_99_DISABLE) in your 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

269 
# component Makefile. 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

270 
studio_C99_DISABLE = xc99=none 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

271 

c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

272 
# Use the compiler default 'xc99=all,no_lib' 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

273 
studio_C99MODE = 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

274 

c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

275 
# Allow zerosized struct/union declarations and void functions with return 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

276 
# statements. 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

277 
studio_FEATURES_EXTENSIONS = features=extensions 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

278 

c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

279 
# Control the Studio optimization level. 
102
1a8b07a3e826
7020772 userland build should provide more macros for common flags (fix cflags)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
99
diff
changeset

280 
studio_OPT.sparc.32 = xO4 
1a8b07a3e826
7020772 userland build should provide more macros for common flags (fix cflags)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
99
diff
changeset

281 
studio_OPT.sparc.64 = xO4 
1a8b07a3e826
7020772 userland build should provide more macros for common flags (fix cflags)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
99
diff
changeset

282 
studio_OPT.i386.32 = xO4 
1a8b07a3e826
7020772 userland build should provide more macros for common flags (fix cflags)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
99
diff
changeset

283 
studio_OPT.i386.64 = xO4 
1a8b07a3e826
7020772 userland build should provide more macros for common flags (fix cflags)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
99
diff
changeset

284 
studio_OPT = $(studio_OPT.$(MACH).$(BITS)) 
99
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

285 

c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

286 
# Studio PIC code generation. Use CC_PIC instead to select PIC code generation. 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

287 
studio_PIC = KPIC DPIC 
61
7684fe2a9eb5
7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
59
diff
changeset

288 

7684fe2a9eb5
7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
59
diff
changeset

289 
# The Sun Studio 11 compiler has changed the behaviour of integer 
7684fe2a9eb5
7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
59
diff
changeset

290 
# wrap arounds and so a flag is needed to use the legacy behaviour 
7684fe2a9eb5
7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
59
diff
changeset

291 
# (without this flag panics/hangs could be exposed within the source). 
99
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

292 
# This is used through studio_IROPTS, not the 'sparc' variety. 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

293 
studio_IROPTS.sparc = W2,xwrap_int 
102
1a8b07a3e826
7020772 userland build should provide more macros for common flags (fix cflags)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
99
diff
changeset

294 
studio_IROPTS = $(studio_IROPTS.$(MACH)) 
99
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

295 

c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

296 
# Control register usage for generated code. SPARC ABI requires system 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

297 
# libraries not to use application registers. x86 requires 'no%frameptr' at 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

298 
# x04 or higher. 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

299 
studio_XREGS.sparc = xregs=no%appl,float 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

300 
studio_XREGS.i386 = xregs=no%frameptr 
102
1a8b07a3e826
7020772 userland build should provide more macros for common flags (fix cflags)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
99
diff
changeset

301 
studio_XREGS = $(studio_XREGS.$(MACH)) 
99
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

302 

109
07cc6a1a08ad
7020772 userland build should provide more macros for common flags (add missing)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
108
diff
changeset

303 
# Set data alignment on sparc to reasonable values, 8 byte alignment for 32 bit 
07cc6a1a08ad
7020772 userland build should provide more macros for common flags (add missing)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
108
diff
changeset

304 
# objects and 16 byte alignment for 64 bit objects. This is added to CFLAGS by 
07cc6a1a08ad
7020772 userland build should provide more macros for common flags (add missing)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
108
diff
changeset

305 
# default. 
07cc6a1a08ad
7020772 userland build should provide more macros for common flags (add missing)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
108
diff
changeset

306 
studio_ALIGN.sparc.32 = xmemalign=8s 
07cc6a1a08ad
7020772 userland build should provide more macros for common flags (add missing)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
108
diff
changeset

307 
studio_ALIGN.sparc.64 = xmemalign=16s 
07cc6a1a08ad
7020772 userland build should provide more macros for common flags (add missing)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
108
diff
changeset

308 
studio_ALIGN = $(studio_ALIGN.$(MACH).$(BITS)) 
07cc6a1a08ad
7020772 userland build should provide more macros for common flags (add missing)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
108
diff
changeset

309 

07cc6a1a08ad
7020772 userland build should provide more macros for common flags (add missing)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
108
diff
changeset

310 
# Studio shorthand for building multithreaded code, enables D_REENTRANT and 
07cc6a1a08ad
7020772 userland build should provide more macros for common flags (add missing)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
108
diff
changeset

311 
# linking with threadin support. This is added to CFLAGS by default, override 
07cc6a1a08ad
7020772 userland build should provide more macros for common flags (add missing)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
108
diff
changeset

312 
# studio_MT to turn this off. 
07cc6a1a08ad
7020772 userland build should provide more macros for common flags (add missing)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
108
diff
changeset

313 
studio_MT = mt 
07cc6a1a08ad
7020772 userland build should provide more macros for common flags (add missing)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
108
diff
changeset

314 

99
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

315 
# See CPP_XPG6MODE comment above. 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

316 
studio_XPG6MODE = $(studio_C99MODE) $(CPP_XPG6MODE) 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

317 
XPG6MODE = $(studio_XPG6MODE) 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

318 

c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

319 
# Default Studio C compiler flags. Add the required feature to your Makefile 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

320 
# with CFLAGS += $(FEATURE_MACRO) and add to the component build with 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

321 
# CONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)" or similiar. In most cases, it 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

322 
# should not be necessary to add CFLAGS to any environment other than the 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

323 
# configure environment. 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

324 
CFLAGS.studio += $(studio_OPT) $(studio_XBITS) $(studio_XREGS) \ 
109
07cc6a1a08ad
7020772 userland build should provide more macros for common flags (add missing)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
108
diff
changeset

325 
$(studio_IROPTS) $(studio_C99MODE) $(studio_ALIGN) \ 
07cc6a1a08ad
7020772 userland build should provide more macros for common flags (add missing)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
108
diff
changeset

326 
$(studio_MT) 
61
7684fe2a9eb5
7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
59
diff
changeset

327 

99
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

328 
# 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

329 
# GNU C compiler flag sets to ease feature selection. Add the required 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

330 
# feature to your Makefile with CFLAGS += $(FEATURE_MACRO) and add to the 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

331 
# component build with CONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)" or similiar. 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

332 
# 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

333 

c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

334 
# GCC Compiler optimization flag 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

335 
gcc_OPT = O3 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

336 

c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

337 
# GCC PIC code generation. Use CC_PIC instead to select PIC code generation. 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

338 
gcc_PIC = fPIC DPIC 
61
7684fe2a9eb5
7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
59
diff
changeset

339 

99
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

340 
# Generic macro for PIC code generation. Use this macro instead of the 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

341 
# compiler specific variant. 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

342 
CC_PIC = $($(COMPILER)_PIC) 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

343 

c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

344 

c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

345 
# Default GNU C compiler flags. Add the required feature to your Makefile 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

346 
# with CFLAGS += $(FEATURE_MACRO) and add to the component build with 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

347 
# CONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)" or similiar. In most cases, it 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

348 
# should not be necessary to add CFLAGS to any environment other than the 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

349 
# configure environment. 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

350 
CFLAGS.gcc += $(gcc_OPT) 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

351 

c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

352 

c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

353 
# Build 32 or 64 bit objects. 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

354 
CFLAGS += $(CC_BITS) 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

355 

c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

356 
# Add compiler specific 'default' features 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

357 
CFLAGS += $(CFLAGS.$(COMPILER)) 
61
7684fe2a9eb5
7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
59
diff
changeset

358 

99
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

359 

c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

360 
# 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

361 
# Solaris linker flag sets to ease feature selection. Add the required 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

362 
# feature to your Makefile with LDFLAGS += $(FEATURE_MACRO) and add to the 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

363 
# component build with CONFIGURE_OPTIONS += LDFLAGS="$(LDFLAGS)" or similiar. 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

364 
# 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

365 

c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

366 
# Reduce the symbol table size, effectively conflicting with g. We should 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

367 
# get linker guidance here. 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

368 
LD_Z_REDLOCSYM = z redlocsym 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

369 

c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

370 
# Cause the linker to rescan archive libraries and resolve remaining unresolved 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

371 
# symbols recursively until all symbols are resolved. Components should be 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

372 
# linking in the libraries they need, in the required order. This should 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

373 
# only be required if the component's native build is horribly broken. 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

374 
LD_Z_RESCAN_NOW = z rescannow 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

375 

c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

376 
LD_Z_TEXT = z direct 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

377 

c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

378 
# make sure all symbols are defined. 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

379 
LD_Z_DEFS = z defs 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

380 

c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

381 
# use direct binding 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

382 
LD_B_DIRECT = Bdirect 
61
7684fe2a9eb5
7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
59
diff
changeset

383 

99
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

384 
# 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

385 
# More Solaris linker flags that we want to be sure that everyone gets. This 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

386 
# is automatically added to the calling environment during the 'build' and 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

387 
# 'install' phases of the component build. Each individual feature can be 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

388 
# turned off by adding FEATURE_MACRO= to the component Makefile. 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

389 
# 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

390 

c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

391 
# Create a nonexecutable stack when linking. 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

392 
LD_MAP_NOEXSTK = M /usr/lib/ld/map.noexstk 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

393 

c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

394 
# Create a nonexecutable bss segment when linking. 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

395 
LD_MAP_NOEXBSS = M /usr/lib/ld/map.noexbss 
61
7684fe2a9eb5
7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
59
diff
changeset

396 

99
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

397 
# Create a nonexecutable data segment when linking. Due to PLT needs, the 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

398 
# data segment must be executable on sparc, but the bss does not. 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

399 
# see mapfile comments for more information 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

400 
LD_MAP_NOEXDATA.i386 = M /usr/lib/ld/map.noexdata 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

401 
LD_MAP_NOEXDATA.sparc = $(LD_MAP_NOEXBSS) 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

402 

c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

403 
# Page alignment 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

404 
LD_MAP_PAGEALIGN = M /usr/lib/ld/map.pagealign 
61
7684fe2a9eb5
7011958 some things lost during move to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
59
diff
changeset

405 

99
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

406 
# Linker options to add when only building libraries 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

407 
LD_OPTIONS_SO += $(LD_Z_TEXT) $(LD_Z_DEFS) 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

408 

c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

409 
# Default linker options that everyone should get. Do not add additional 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

410 
# libraries to this macro, as it will apply to everything linked during the 
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

411 
# component build. 
102
1a8b07a3e826
7020772 userland build should provide more macros for common flags (fix cflags)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
99
diff
changeset

412 
LD_OPTIONS += $(LD_MAP_NOEXSTK) $(LD_MAP_NOEXDATA.$(MACH)) \ 
99
c15c9099bb44
6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
94
diff
changeset

413 
$(LD_MAP_PAGEALIGN) $(LD_B_DIRECT) 
64
a4b12971cf99
7014330 has userland lost its mapfile mind?
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
62
diff
changeset

414 

62
519e6e3788ce
7013265 userland could use a tool to aid in SUNW package generation
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
61
diff
changeset

415 
# Environment variables and arguments passed into the build and install 
64
a4b12971cf99
7014330 has userland lost its mapfile mind?
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
62
diff
changeset

416 
# environment(s). These are the initial settings. 
a4b12971cf99
7014330 has userland lost its mapfile mind?
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
62
diff
changeset

417 
COMPONENT_BUILD_ENV= \ 
82
2f155565730b
7017244 move ggrep to userland (fix mismerge)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
80
diff
changeset

418 
LD_OPTIONS="$(LD_OPTIONS)" 
64
a4b12971cf99
7014330 has userland lost its mapfile mind?
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
62
diff
changeset

419 
COMPONENT_INSTALL_ENV= \ 
82
2f155565730b
7017244 move ggrep to userland (fix mismerge)
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
80
diff
changeset

420 
LD_OPTIONS="$(LD_OPTIONS)" 
64
a4b12971cf99
7014330 has userland lost its mapfile mind?
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
62
diff
changeset

421 

a4b12971cf99
7014330 has userland lost its mapfile mind?
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
62
diff
changeset

422 
# Add any bitspecific settings 
62
519e6e3788ce
7013265 userland could use a tool to aid in SUNW package generation
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
61
diff
changeset

423 
COMPONENT_BUILD_ENV += $(COMPONENT_BUILD_ENV.$(BITS)) 
519e6e3788ce
7013265 userland could use a tool to aid in SUNW package generation
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
61
diff
changeset

424 
COMPONENT_BUILD_ARGS += $(COMPONENT_BUILD_ARGS.$(BITS)) 
519e6e3788ce
7013265 userland could use a tool to aid in SUNW package generation
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
61
diff
changeset

425 
COMPONENT_INSTALL_ENV += $(COMPONENT_INSTALL_ENV.$(BITS)) 
519e6e3788ce
7013265 userland could use a tool to aid in SUNW package generation
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
61
diff
changeset

426 
COMPONENT_INSTALL_ARGS += $(COMPONENT_INSTALL_ARGS.$(BITS)) 