author | Mike Sullivan <Mike.Sullivan@Oracle.COM> |
Fri, 24 Jan 2014 09:19:10 -0800 | |
branch | s11-update |
changeset 2914 | 4f1967424876 |
parent 2434 | 6c9bb5cf5610 |
child 3367 | ed5024e47b53 |
permissions | -rw-r--r-- |
458 | 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 |
# |
|
2914
4f1967424876
18065425 parfait gcc wrappers should force gcc3 for now
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
2434
diff
changeset
|
21 |
# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved. |
458 | 22 |
|
23 |
# |
|
24 |
include ../../../make-rules/shared-macros.mk |
|
25 |
||
26 |
PATH=/usr/bin:/usr/gnu/bin:/usr/sbin |
|
27 |
||
28 |
COMPONENT_NAME= Python |
|
885
2af25a1da825
7177355 python 2.7.1 should be updated to the latest 2.7.X release
Rich Burridge <rich.burridge@oracle.com>
parents:
800
diff
changeset
|
29 |
COMPONENT_VERSION= 2.7.3 |
609
775168282b2f
7037821 Userland migration of data from Makefile to manifest may have been a little overzealous
Rich Burridge <rich.burridge@oracle.com>
parents:
578
diff
changeset
|
30 |
COMPONENT_PROJECT_URL= http://python.org/ |
458 | 31 |
COMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION) |
32 |
COMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.bz2 |
|
800
2ad056ed89ec
7163771 sha1 should not be used in userland-fetch and userland component/*/Makefile
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
774
diff
changeset
|
33 |
COMPONENT_ARCHIVE_HASH= \ |
885
2af25a1da825
7177355 python 2.7.1 should be updated to the latest 2.7.X release
Rich Burridge <rich.burridge@oracle.com>
parents:
800
diff
changeset
|
34 |
sha256:726457e11cb153adc3f428aaf1901fc561a374c30e5e7da6742c0742a338663c |
609
775168282b2f
7037821 Userland migration of data from Makefile to manifest may have been a little overzealous
Rich Burridge <rich.burridge@oracle.com>
parents:
578
diff
changeset
|
35 |
COMPONENT_ARCHIVE_URL= $(COMPONENT_PROJECT_URL)ftp/python/$(COMPONENT_VERSION)/$(COMPONENT_ARCHIVE) |
2434
6c9bb5cf5610
15930486 - Auto-generation of Userland gate list for the Solaris 11 Update Release
Rich Burridge <rich.burridge@oracle.com>
parents:
896
diff
changeset
|
36 |
COMPONENT_BUGDB= utility/python |
458 | 37 |
|
38 |
include $(WS_TOP)/make-rules/prep.mk |
|
39 |
include $(WS_TOP)/make-rules/configure.mk |
|
40 |
include $(WS_TOP)/make-rules/ips.mk |
|
578
4f51372decaf
7053223 python needs lint libraries
Danek Duvall <danek.duvall@oracle.com>
parents:
458
diff
changeset
|
41 |
include $(WS_TOP)/make-rules/lint-libraries.mk |
458 | 42 |
|
43 |
# We patch auto* files, so regenerate headers and configure |
|
44 |
COMPONENT_PREP_ACTION = \ |
|
45 |
(cd $(@D) ; autoheader ; autoconf) |
|
46 |
||
896
50be262e44f7
7155369 mdb should work with python 2.7 bits
Rich Burridge <rich.burridge@oracle.com>
parents:
885
diff
changeset
|
47 |
# we don't want to leak $(CC_BITS) into BASECFLAGS as it causes problems with |
50be262e44f7
7155369 mdb should work with python 2.7 bits
Rich Burridge <rich.burridge@oracle.com>
parents:
885
diff
changeset
|
48 |
# python-config |
50be262e44f7
7155369 mdb should work with python 2.7 bits
Rich Burridge <rich.burridge@oracle.com>
parents:
885
diff
changeset
|
49 |
CC += $(CFLAGS) |
50be262e44f7
7155369 mdb should work with python 2.7 bits
Rich Burridge <rich.burridge@oracle.com>
parents:
885
diff
changeset
|
50 |
|
50be262e44f7
7155369 mdb should work with python 2.7 bits
Rich Burridge <rich.burridge@oracle.com>
parents:
885
diff
changeset
|
51 |
C99MODE= |
50be262e44f7
7155369 mdb should work with python 2.7 bits
Rich Burridge <rich.burridge@oracle.com>
parents:
885
diff
changeset
|
52 |
CPPFLAGS += -IPython |
50be262e44f7
7155369 mdb should work with python 2.7 bits
Rich Burridge <rich.burridge@oracle.com>
parents:
885
diff
changeset
|
53 |
|
458 | 54 |
# to find the ncurses headers |
55 |
CPPFLAGS += -I/usr/include/ncurses |
|
896
50be262e44f7
7155369 mdb should work with python 2.7 bits
Rich Burridge <rich.burridge@oracle.com>
parents:
885
diff
changeset
|
56 |
# enable large files how they did in JDS |
50be262e44f7
7155369 mdb should work with python 2.7 bits
Rich Burridge <rich.burridge@oracle.com>
parents:
885
diff
changeset
|
57 |
CPPFLAGS += -D_LARGEFILE64_SOURCE |
458 | 58 |
|
59 |
# libffi for _ctypes |
|
60 |
CPPFLAGS += $(shell pkg-config --cflags-only-I libffi) |
|
61 |
||
62 |
# because python links with $(CC) ... $(LDFLAGS) ... |
|
63 |
LDFLAGS = $(CC_BITS) $(CC_PIC) |
|
64 |
||
65 |
# build pic |
|
66 |
CFLAGS += $(CC_PIC) |
|
67 |
||
634
bd9c94f9f6e0
6771457 explore compiler performance improvements for python
Shawn Walker <shawn.walker@oracle.com>
parents:
609
diff
changeset
|
68 |
# The python build is profile-guided for studio; to see the benefits of that, |
bd9c94f9f6e0
6771457 explore compiler performance improvements for python
Shawn Walker <shawn.walker@oracle.com>
parents:
609
diff
changeset
|
69 |
# Python must be compiled with -xO5 and a different build target must be used. |
bd9c94f9f6e0
6771457 explore compiler performance improvements for python
Shawn Walker <shawn.walker@oracle.com>
parents:
609
diff
changeset
|
70 |
# Use of xprofile requires that the same options be used during compilation and |
bd9c94f9f6e0
6771457 explore compiler performance improvements for python
Shawn Walker <shawn.walker@oracle.com>
parents:
609
diff
changeset
|
71 |
# linking. The targets chosen are based on Solaris 11 minimum supported system |
bd9c94f9f6e0
6771457 explore compiler performance improvements for python
Shawn Walker <shawn.walker@oracle.com>
parents:
609
diff
changeset
|
72 |
# requirements. |
bd9c94f9f6e0
6771457 explore compiler performance improvements for python
Shawn Walker <shawn.walker@oracle.com>
parents:
609
diff
changeset
|
73 |
COMPONENT_BUILD_TARGETS = profile-opt |
bd9c94f9f6e0
6771457 explore compiler performance improvements for python
Shawn Walker <shawn.walker@oracle.com>
parents:
609
diff
changeset
|
74 |
XPROFILE_DIR = $(BUILD_DIR_$(BITS))/.profile |
2914
4f1967424876
18065425 parfait gcc wrappers should force gcc3 for now
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
2434
diff
changeset
|
75 |
PYFLAGS.i386 = -xtarget=opteron -xarch=sse2 -xcache=generic |
634
bd9c94f9f6e0
6771457 explore compiler performance improvements for python
Shawn Walker <shawn.walker@oracle.com>
parents:
609
diff
changeset
|
76 |
PYFLAGS.sparc = |
bd9c94f9f6e0
6771457 explore compiler performance improvements for python
Shawn Walker <shawn.walker@oracle.com>
parents:
609
diff
changeset
|
77 |
CFLAGS += -xO5 $(PYFLAGS.$(MACH)) |
bd9c94f9f6e0
6771457 explore compiler performance improvements for python
Shawn Walker <shawn.walker@oracle.com>
parents:
609
diff
changeset
|
78 |
LDFLAGS += -xO5 $(PYFLAGS.$(MACH)) |
bd9c94f9f6e0
6771457 explore compiler performance improvements for python
Shawn Walker <shawn.walker@oracle.com>
parents:
609
diff
changeset
|
79 |
|
458 | 80 |
# add /usr/gnu/lib to the library search/run path |
81 |
LDFLAGS.32 = -R/usr/gnu/lib -L/usr/gnu/lib |
|
82 |
LDFLAGS.64 = -R/usr/gnu/lib/$(MACH64) -L/usr/gnu/lib/$(MACH64) |
|
83 |
LDFLAGS += $(LDFLAGS.$(BITS)) |
|
84 |
||
578
4f51372decaf
7053223 python needs lint libraries
Danek Duvall <danek.duvall@oracle.com>
parents:
458
diff
changeset
|
85 |
# Python puts its header files in a special place. |
4f51372decaf
7053223 python needs lint libraries
Danek Duvall <danek.duvall@oracle.com>
parents:
458
diff
changeset
|
86 |
LINT_FLAGS += -I$(SOURCE_DIR)/Include |
4f51372decaf
7053223 python needs lint libraries
Danek Duvall <danek.duvall@oracle.com>
parents:
458
diff
changeset
|
87 |
|
458 | 88 |
CONFIGURE_OPTIONS += --infodir=$(CONFIGURE_INFODIR) |
89 |
CONFIGURE_OPTIONS += --enable-shared |
|
90 |
CONFIGURE_OPTIONS += --with-system-expat |
|
91 |
CONFIGURE_OPTIONS += --with-system-ffi |
|
92 |
CONFIGURE_OPTIONS += --without-gcc |
|
93 |
CONFIGURE_OPTIONS += --enable-ipv6 |
|
94 |
CONFIGURE_OPTIONS += ac_cv_opt_olimit_ok=no |
|
95 |
CONFIGURE_OPTIONS += ac_cv_olimit_ok=no |
|
96 |
CONFIGURE_OPTIONS += CPPFLAGS="$(CPPFLAGS)" |
|
97 |
CONFIGURE_OPTIONS += LDFLAGS="$(LDFLAGS)" |
|
896
50be262e44f7
7155369 mdb should work with python 2.7 bits
Rich Burridge <rich.burridge@oracle.com>
parents:
885
diff
changeset
|
98 |
CONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)" |
458 | 99 |
CONFIGURE_OPTIONS += DFLAGS="-$(BITS)" |
634
bd9c94f9f6e0
6771457 explore compiler performance improvements for python
Shawn Walker <shawn.walker@oracle.com>
parents:
609
diff
changeset
|
100 |
CONFIGURE_OPTIONS += XPROFILE_DIR="$(XPROFILE_DIR)" |
458 | 101 |
|
102 |
COMPONENT_BUILD_ENV += DFLAGS="-$(BITS)" |
|
634
bd9c94f9f6e0
6771457 explore compiler performance improvements for python
Shawn Walker <shawn.walker@oracle.com>
parents:
609
diff
changeset
|
103 |
COMPONENT_BUILD_ENV += XPROFILE_DIR="$(XPROFILE_DIR)" |
458 | 104 |
|
105 |
# patches/00-bits.patch removes some AC_CHECK_SIZEOF tests in order to |
|
106 |
# generate a pyconfig.h that is both 32 and 64 bit compatible. We add this |
|
107 |
# back to the environment so that configure can still work. configure.in and |
|
108 |
# pyconfig.h.in should probably be rewhacked to do this more cleanly in the |
|
109 |
# future. |
|
110 |
CONFIGURE_OPTIONS.32 += ac_cv_sizeof_long=4 |
|
111 |
CONFIGURE_OPTIONS.64 += ac_cv_sizeof_long=8 |
|
112 |
||
113 |
# 64 bit shared objects need to go in a 64-bit directory |
|
114 |
COMPONENT_INSTALL_ARGS.64 += DESTSHARED=$(CONFIGURE_PREFIX)/lib/python2.7/lib-dynload |
|
115 |
||
116 |
# common targets |
|
117 |
build: $(BUILD_32_and_64) |
|
118 |
||
119 |
$(INSTALL_32): $(INSTALL_64) |
|
120 |
||
121 |
install: $(INSTALL_32_and_64) |
|
122 |
||
123 |
COMPONENT_TEST_TARGETS = test |
|
124 |
||
125 |
test: $(TEST_32_and_64) |
|
126 |
||
127 |
BUILD_PKG_DEPENDENCIES = $(BUILD_TOOLS) |
|
128 |
||
129 |
include $(WS_TOP)/make-rules/depend.mk |