diff --git a/coreutils-8.9-singlethreaded-sort.patch b/coreutils-8.9-singlethreaded-sort.patch index ff789ad..9bf7857 100644 --- a/coreutils-8.9-singlethreaded-sort.patch +++ b/coreutils-8.9-singlethreaded-sort.patch @@ -1,15 +1,17 @@ Index: src/sort.c =================================================================== ---- src/sort.c.orig 2012-04-16 13:17:12.342019601 +0200 -+++ src/sort.c 2012-04-16 13:17:12.463016705 +0200 -@@ -5288,8 +5288,8 @@ main (int argc, char **argv) +--- src/sort.c.orig ++++ src/sort.c +@@ -5288,7 +5288,11 @@ main (int argc, char **argv) { if (!nthreads) { - unsigned long int np = num_processors (NPROC_CURRENT_OVERRIDABLE); -- nthreads = MIN (np, DEFAULT_MAX_THREADS); -+ //unsigned long int np = num_processors (NPROC_CURRENT_OVERRIDABLE); -+ nthreads = 1; //MIN (np, DEFAULT_MAX_THREADS); ++ unsigned long int np; ++ if (getenv("OMP_NUM_THREADS")) ++ np = num_processors (NPROC_CURRENT_OVERRIDABLE); ++ else ++ np = 1; + nthreads = MIN (np, DEFAULT_MAX_THREADS); } - /* Avoid integer overflow later. */ diff --git a/coreutils.changes b/coreutils.changes index 418981e..555ea6a 100644 --- a/coreutils.changes +++ b/coreutils.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Sep 21 11:55:12 UTC 2012 - froh@suse.com + +- fix coreutils-8.9-singlethreaded-sort.patch to + respect OMP_NUM_THREADS again. + ------------------------------------------------------------------- Tue Jun 19 12:37:47 CEST 2012 - pth@suse.de