summaryrefslogtreecommitdiff
path: root/debian/patches
diff options
context:
space:
mode:
authorLuca Falavigna <dktrkranz@debian.org>2011-07-02 13:32:49 +0200
committerLuca Falavigna <dktrkranz@debian.org>2011-07-02 13:32:49 +0200
commite4bcdb8e72622730de7ab841990f59170a5a4e5e (patch)
treeaa28d6454674e4fc5c528cacb17c6c15b194fa9f /debian/patches
parent6202869907e63240e6a111d474077191b8b21889 (diff)
Disable parallel build on sparc machines
Diffstat (limited to 'debian/patches')
-rw-r--r--debian/patches/parallel_build.patch38
-rw-r--r--debian/patches/series1
2 files changed, 39 insertions, 0 deletions
diff --git a/debian/patches/parallel_build.patch b/debian/patches/parallel_build.patch
new file mode 100644
index 0000000..3af9a90
--- /dev/null
+++ b/debian/patches/parallel_build.patch
@@ -0,0 +1,38 @@
+Description: Disable parallel build on sparc machines
+Origin: Debian
+Bug-Debian: http://bugs.debian.org/632228
+Forwarded: no
+
+Index: scons/engine/SCons/Job.py
+===================================================================
+--- scons.orig/engine/SCons/Job.py 2011-07-02 13:09:20.281651892 +0200
++++ scons/engine/SCons/Job.py 2011-07-02 13:12:49.925651735 +0200
+@@ -83,7 +83,7 @@
+ """
+
+ self.job = None
+- if num > 1:
++ if num > 1 and not self._check_sparc_machine():
+ stack_size = explicit_stack_size
+ if stack_size is None:
+ stack_size = default_stack_size
+@@ -163,6 +163,19 @@
+ except AttributeError:
+ pass
+
++ def _check_sparc_machine(self):
++ """ Check whether machine is sparc"""
++ try:
++ from platform import machine
++ except ImportError:
++ pass
++ else:
++ if 'sparc' in machine():
++ SCons.Warnings.warn(SCons.Warnings.StackSizeWarning,
++ 'Parallel build disabled on sparc, '
++ 'see Debian bug #632228')
++ return True
++
+ class Serial(object):
+ """This class is used to execute tasks in series, and is more efficient
+ than Parallel, but is only appropriate for non-parallel builds. Only
diff --git a/debian/patches/series b/debian/patches/series
index 5d3d8a7..8192aea 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
java_ignore_nonexistent_files.patch
remove_stale_files.patch
fortran03.patch
+parallel_build.patch