Репозитории ALT
S: | 4.4.0-alt2 |
5.1: | 3.81-alt5 |
4.1: | 3.81-alt2 |
4.0: | 3.81-alt2 |
3.0: | 3.81beta3-alt4 |
Группа :: Разработка/Прочее
Пакет: make
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
Патч: 0002-ALT-job_slots.patch
Скачать
Скачать
From 7838048f43ddcc17ef5762675f2060d5afa1bc70 Mon Sep 17 00:00:00 2001
From: Alexey Gladkov <legion@altlinux.org>
Date: Tue, 31 Mar 2020 23:53:12 +0300
Subject: [PATCH] ALT: job_slots
Signed-off-by: Alexey Gladkov <legion@altlinux.org>
---
make/src/main.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/make/src/main.c b/make/src/main.c
index 78a27d7..8b08620 100644
--- a/make/src/main.c
+++ b/make/src/main.c
@@ -2070,6 +2070,21 @@ main (int argc, char **argv, char **envp)
arg_job_slots = INVALID_JOB_SLOTS;
job_slots = 1;
}
+#else
+# if defined(PIPE_BUF)
+# define MAX_JOB_SLOTS PIPE_BUF
+# elif defined(_POSIX_PIPE_BUF)
+# define MAX_JOB_SLOTS _POSIX_PIPE_BUF
+# else
+# define MAX_JOB_SLOTS 512
+# endif
+ if (job_slots > MAX_JOB_SLOTS)
+ {
+ O (error, NILF,
+ _("Requested more parallel jobs (-jN) than this platform can handle."));
+ O (error, NILF, _("Resetting to single job (-j1) mode."));
+ job_slots = 1;
+ }
#endif
/* If we have >1 slot at this point, then we're a top-level make.
--
2.24.1