--- a/components/python/python27/patches/12-studio-profile.patch Wed Oct 08 05:29:12 2014 -0700
+++ b/components/python/python27/patches/12-studio-profile.patch Mon Oct 06 13:15:36 2014 -0700
@@ -2,10 +2,11 @@
Studio instead of gcc. The unfortunate repetition of options seen below
is a workaround for build peculiarities and to meet Studio's requirement
that the profiling options be used at all steps of the build -- not just
-compilation.
---- Python-2.6.4/Makefile.pre.in.orig Thu Nov 3 15:14:03 2011
-+++ Python-2.6.4/Makefile.pre.in Thu Nov 3 15:14:11 2011
-@@ -360,9 +360,9 @@
+compilation. As it is Solaris-specific, it is not suitable for upstream.
+
+--- Python-2.7.8/Makefile.pre.in.~2~ 2014-07-17 20:46:10.626664937 -0700
++++ Python-2.7.8/Makefile.pre.in 2014-07-17 20:46:10.736821411 -0700
+@@ -413,28 +413,37 @@
profile-opt:
@echo "Building with support for profile generation:"
$(MAKE) clean
@@ -16,7 +17,6 @@
$(MAKE) run_profile_task
@echo "Rebuilding with profile guided optimizations:"
$(MAKE) clean
-@@ -369,18 +369,27 @@
$(MAKE) build_all_use_profile
build_all_generate_profile:
@@ -27,6 +27,7 @@
+ BLDSHARED="$(BLDSHARED) -xprofile=collect:$(XPROFILE_DIR)"
run_profile_task:
+ : # FIXME: can't run for a cross build
- ./$(BUILDPYTHON) $(PROFILE_TASK)
+ LD_LIBRARY_PATH=. ./$(BUILDPYTHON) $(PROFILE_TASK)
@@ -48,19 +49,7 @@
# Build the interpreter
-@@ -395,10 +404,7 @@
-
- # Build the shared modules
- sharedmods: $(BUILDPYTHON)
-- @case $$MAKEFLAGS in \
-- *s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py -q build;; \
-- *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py build;; \
-- esac
-+ $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py build
-
- # Build static library
- # avoid long command lines, same as LIBRARY_OBJS
-@@ -1173,7 +1179,7 @@
+@@ -1298,7 +1307,7 @@
-rm -f Lib/lib2to3/*Grammar*.pickle
profile-removal: