summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #374 from saraedum/patch-1HEADmasterMartin Pool2022-11-110-0/+0
|\ | | | | Fix typo
| * Fix typoJulian Rüth2020-01-311-1/+1
| |
* | Merge pull request #315 from PeterDaveHelloKitchen/improve-DockerfileMartin Pool2022-10-074-16/+21
|\ \ | | | | | | Improve Dockerfile
| * | Update base Docker image to the latest buildPeter Dave Hello2022-10-041-1/+1
| | |
| * | Add `-y` to apt-get in Dockerfile to avoid manual inputPeter Dave Hello2022-10-044-15/+15
| | |
| * | Clean up apt lists cache in DockerfilePeter Dave Hello2022-10-044-1/+6
|/ /
* | Merge pull request #466 from mathcounts4/Xpreprocessorfergushenderson2022-06-171-1/+2
|\ \ | | | | | | Discard -Xpreprocessor and following argument for remote compilation,…
| * | Discard -Xpreprocessor and following argument for remote compilation, as ↵dfink2022-06-101-1/+2
|/ / | | | | | | this switch is recognized by gcc and clang, and clang warns about unused command-line args: -Wunused-command-line-argument warning
* | Merge pull request #464 from themightyoarfish/patch-1Martin Pool2022-05-211-1/+1
|\ \ | | | | | | typo fix
| * | typo fixRasmus2022-05-201-1/+1
|/ /
* | Merge pull request #458 from 00gh/joblimitMartin Pool2022-03-311-2/+2
|\ \ | | | | | | src/dopt.c: increase arg_max_jobs limit to max int
| * | src/dopt.c: increase arg_max_jobs limit to max int00gh2022-03-311-2/+2
|/ / | | | | | | Issue #452. jobs limit
* | Merge pull request #456 from luzpaz/typosMartin Pool2022-02-184-4/+4
|\ \ | | | | | | Fix various source documentation typos
| * | Fix varous source documentation typosluz paz2022-02-184-4/+4
| | | | | | | | | Found via `codespell -q 3 -S ./ChangeLog -L ake,ba,msdos,paralel,te`
* | | Merge pull request #446 from pholat/patch-1Martin Pool2022-02-181-1/+1
|\ \ \ | |/ / |/| | Update INSTALL
| * | Update INSTALLAdam Dobrowolski2021-11-191-1/+1
|/ / | | | | There was `autoconf` missing in ubuntu example :)
* | Merge pull request #427 from asheplyakov/native-compiler-triple-fixupShawn Landden2021-10-152-7/+19
|\ \ | | | | | | | | | | | | Improved cross-rewriting on non-x86 systems Tested on aarch64 (Debian).
| * | Improved cross-rewriting on non-x86 systemsAlexey Sheplyakov2021-09-302-7/+19
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unfortunately autoconf and GCC don't agree on the system name: - On arm (aarch64): `GNU_HOST` is `aarch64-unknown-linux-gnu`, and GCC triple is `aarch64-linux-gnu` instead. - On rpm-based x86_64 distros: `GNU_HOST` is `x86_64-pc-linux-gnu`, and GCC triple is `x86_64-redhat-linux` Therefore ask the compiler (when running distcc configure script) how to correctly identify it. Closes: #440 ALTBUG: 40425
* | Merge pull request #438 from asheplyakov/fix-434Shawn Landden2021-09-273-17/+41
|\ \ | | | | | | Restrict number of retries when backoff is disabled
| * | Restrict the number of retries when DISTCC_BACKOFF is disabledAlexey Sheplyakov2021-08-301-1/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since the commit a7dd5cf90e8c ("Try a new host after failing to connect instead of immediately falling back to localhost") distcc tries to choose a different host on connection/protocol errors. However when backoff is disabled (DISTCC_BACKOFF_PERIOD=0) distcc keeps retrying forever. To avoid the problem limit the number of retries (currently to 3) when backoff is disabled. Closes: #434
| * | backoff.c: added dcc_backof_is_enabled() helper functionAlexey Sheplyakov2021-08-302-16/+18
| | |
* | | Merge pull request #417 from asheplyakov/clang-distcc-linuxkernel-compileShawn Landden2021-09-273-0/+19
|\ \ \ | | | | | | | | Improved cross-compilation with clang
| * | | Improved cross-compilation with clangAlexey Sheplyakov2021-02-243-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With this patch I can cross-compile Linux kernel with clang and distcc. Otherwise both remote compilation and local fallback fail like this: cat > foo.c <<-EOF int main(int argc, char **argv) { return 0; } EOF env DISTCC_HOSTS=127.0.0.1 distcc clang -c --target=aarch64-linux-gnu- -o foo.o foo.c error: unknown target triple 'unknown', please use -triple or -arch distcc[304773] ERROR: compile foo.c on 127.0.0.1 failed distcc[304773] (dcc_build_somewhere) Warning: remote compilation of 'foo.c' failed, retrying locally distcc[304773] Warning: failed to distribute foo.c to 127.0.0.1, running locally instead error: unknown target triple 'unknown', please use -triple or -arch distcc[304773] ERROR: compile foo.c on localhost failed Linux' kernel makefiles specify the target arch with `--target=foo`, and distcc expects `-target foo`, hence the problem. Closes: #416
* | | | Merge pull request #439 from whitslack/oom-score-adjShawn Landden2021-09-256-0/+54
|\ \ \ \ | |_|/ / |/| | | distccd: add --oom-score-adj option (Linux only)
| * | | distccd: add --oom-score-adj option (Linux only)Matt Whitlock2021-09-046-0/+54
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This new option sets /proc/self/oom_score_adj in prefork worker child processes. This can afford users a bit of protection against a scenario in which many concurrent compilation jobs cause an out-of-memory condition that prompts the kernel's OOM killer to kill a process that is not so "disposable" as a distccd worker. This commit adds a new Autoconf test to check whether the host system type (that is, the type of the system on which the compiled binaries are to be run) is Linux. The new --oom-score-adj option is implemented only if the host system type is Linux.
* | | Merge pull request #436 from asheplyakov/update-symlinks-rpmbasedShawn Landden2021-07-262-54/+65
|\ \ \ | | | | | | | | masquerade mode improvements for rpm-based systems
| * | | update-distcc-symlinks works on rpm-based distros out of the box nowAlexey Sheplyakov2021-07-261-36/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On ARM64 rpm-based distros GCC bits are installed into `/usr/lib64/gcc` and `/usr/libexec/gcc` directories. However `update-distcc-symlinks` does not scan these directories. As a result `update-distcc-symlinks` does NOT create symlinks to * versioned GCC binaries (`gcc-8`, `gcc-10`, etc) * fully qualified GCC binaries (`aarch64-linux-gnu-gcc-8`, etc) With this patch `update-distcc-symlinks` correctly work on such systems. Closes: #435
| * | | Made update-distcc-symlinks.py pep8-cleanAlexey Sheplyakov2021-07-261-40/+48
| | | |
| * | | A better definition of masquerade directory for RPM-based distrosAlexey Sheplyakov2021-07-261-1/+1
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As of now distcc uses $libdir/distcc as a "masquerade" directory. However in RPM-based distros libdir is /usr/lib64 on 64-bit hosts. This patch changes symlinks directory to $prefix/lib so it's always /usr/lib (both for 64-bit and 32-bit hosts). As a result masquerading can be configured according to the manual, and exactly in the same way for 64-bit and 32-bit hosts, i.e. PATH=/usr/lib/distcc:$PATH make -j32
* | | Merge pull request #433 from asheplyakov/fix-431Shawn Landden2021-07-213-8/+5
|\ \ \ | | | | | | | | distccd: keep looking for approved compilers in /usr/lib/distcc ...
| * | | distccd: check for approved compilers in /usr/lib/distccAlexey Sheplyakov2021-07-211-6/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `dcc_check_compiler_whitelist` bails out if $prefix/lib/distcc directory does not exists. With this patch it keeps looking in /usr/lib/distcc instead. Closes: #431
| * | | update-distcc-symlinks: create symlinks in $prefixAlexey Sheplyakov2021-07-212-2/+4
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | distccd looks for approved compilers in $prefix/lib/distcc. However update-distcc-symlinks always creates symlinks in /usr/lib. Thus if distcc is installed in a custom directory (`--prefix=/opt`, or `--prefix=$HOME`) distccd will refuse compilation jobs even after running `update-distcc-symlinks`. This patch adjusts `update-distcc-symlinks` so it creates symlinks in $prefix/lib/distcc. As a side effect it's possible to use `update-distcc-symlinks` without root permissions. Related: #431
* | | Merge pull request #429 from asheplyakov/distribute-lto-againShawn Landden2021-07-161-3/+0
|\ \ \ | | | | | | | | Revert "Skip distributing LTO cc invocations"
| * | | Revert "Skip distributing LTO cc invocations"Alexey Sheplyakov2021-07-121-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 8dacd28d888210753e9457eb31175d8e2a1c348e. The "LTO invocations are not worth distributing" statement is in general wrong. GCC generates the (target) machine code for every compilation unit even with `-flto` (so it makes sense to distribute these). And the whole program analysis is not guaranteed to be the bottleneck of the build. As a matter of fact distributing LTO compilations reduces the build time of LLVM/clang, GCC, and other programs (especially C++ ones). Closes: #428
* | | | Merge pull request #425 from asheplyakov/heapcorruption-fixupShawn Landden2021-07-151-1/+1
|\ \ \ \ | |/ / / |/| | | dcc_gcc_rewrite_fqn: increase buffer size by one, hopefully avoiding heap corruption
| * | | dcc_gcc_rewrite_fqn: avoid heap corruptionAlexey Sheplyakov2021-07-101-1/+1
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On ALT Linux I've run into the following bug: distcc gcc -Wall -std=gnu89 -I. -O2 -o hello.o -c hello.c free(): invalid next size (fast) Aborted (core dumped) Apparently dcc_gcc_rewrite writes beyond the allocated memory: valgrind --leak-check=full -v ./distcc gcc -Wall -std=gnu89 -I. -O2 -o hello.o -c hello.c ==11382== ERROR SUMMARY: 53 errors from 5 contexts (suppressed: 0 from 0) ==11382== ==11382== 1 errors in context 1 of 5: ==11382== Invalid write of size 1 ==11382== at 0x4C349D8: strcat (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==11382== by 0x10D165: dcc_gcc_rewrite_fqn (compile.c:611) ==11382== by 0x10D4B4: dcc_build_somewhere (compile.c:725) ==11382== by 0x10DC01: dcc_build_somewhere_timed (compile.c:1014) ==11382== by 0x10E380: main (distcc.c:352) ==11382== Address 0x544e828 is 1 bytes after a block of size 23 alloc'd ==11382== at 0x4C31B0F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==11382== by 0x10D087: dcc_gcc_rewrite_fqn (compile.c:588) ==11382== by 0x10D4B4: dcc_build_somewhere (compile.c:725) ==11382== by 0x10DC01: dcc_build_somewhere_timed (compile.c:1014) ==11382== by 0x10E380: main (distcc.c:352) ==11382== ==11382== ==11382== 1 errors in context 2 of 5: ==11382== Invalid write of size 1 ==11382== at 0x4C349C8: strcat (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==11382== by 0x10D165: dcc_gcc_rewrite_fqn (compile.c:611) ==11382== by 0x10D4B4: dcc_build_somewhere (compile.c:725) ==11382== by 0x10DC01: dcc_build_somewhere_timed (compile.c:1014) ==11382== by 0x10E380: main (distcc.c:352) ==11382== Address 0x544e827 is 0 bytes after a block of size 23 alloc'd ==11382== at 0x4C31B0F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==11382== by 0x10D087: dcc_gcc_rewrite_fqn (compile.c:588) ==11382== by 0x10D4B4: dcc_build_somewhere (compile.c:725) ==11382== by 0x10DC01: dcc_build_somewhere_timed (compile.c:1014) ==11382== by 0x10E380: main (distcc.c:352) and ALT Linux' hardened glibc does not quite like that. Correctly compute the `newcmd_len` to avoid the problem. ALTBUG: #40425
* | | Merge pull request #424 from hudeng-go/masterShawn Landden2021-06-151-1/+1
|\ \ \ | | | | | | | | | | | | | | | | fix: make uninstall failed Inserts missing semicolon
| * | | fix: make uninstall failedhudeng2021-06-151-1/+1
|/ / /
* | | 3.4v3.4Shawn Landden2021-05-112-1/+11
| | |
* | | Merge pull request #419 from ddcc/masterShawn Landden2021-05-111-0/+1
|\ \ \ | | | | | | | | parse_command: pass through Xclang argument
| * | | parse_command: handle Xclang correctlyDominic Chen2021-03-161-0/+1
| | | |
* | | | Merge pull request #421 from asheplyakov/distccd-dontsleepShawn Landden2021-05-111-10/+7
|\ \ \ \ | |/ / / |/| | | prefork: use available cores more efficiently
| * | | prefork: use available cores more efficientlyAlexey Sheplyakov2021-04-271-10/+7
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Observed behavior ----------------- When compiling a big C project (Linux kernel) with distcc compilation nodes never use 100% of CPU time, instead a system is 25 -- 40% idle (despite --jobs is set to 3x the number of cores). Analysis -------- Linux kernel consists of many relatively small C sources and header files. Compiling a single source file typically takes a fraction of a second (although there are quite a number of "heavier" sources). `dcc_preforked_child` exits after 50 requests. Thus a typical lifetime of a worker process is just a few seconds. However `dcc_create_kids` sleeps for a second after every fork. Also `dcc_preforked_child` sleeps for yet another second. Which is >= 25% of a typical child lifetime. As a result distccd is unable to use available CPU time (system load is always <= 75% during the compilation). Fix --- Removed `sleep` from `dcc_preforking_parent` and `dcc_create_kids`. Also made `dcc_preforked_child` process compilation jobs for at least 60 seconds. Result ------ Kernel compilation time (two 6-core nodes) reduced almost 2x: before: 20 minutes, after: 12 minutes Closes: #420
* | | Merge pull request #413 from RX14/feature/ltoShawn Landden2021-03-111-0/+3
|\ \ \ | |/ / |/| | Skip distributing LTO cc invocations
| * | Skip distributing LTO cc invocationsStephanie Wilde-Hobbs2021-02-071-0/+3
|/ /
* | Merge pull request #404 from swegener/memory-and-file-descriptor-leaksShawn Landden2021-01-062-8/+18
|\ \ | | | | | | Fix memory and file descriptor leaks
| * | serve: Correctly check asprintf() result and free memorySven Wegener2020-11-261-8/+9
| | | | | | | | | | | | | | | asprintf() returns -1 on failure, which evaluates to true, and the resulting string is undefined in this case.
| * | Close directories after checkingSven Wegener2020-11-262-0/+9
| | |
* | | Merge pull request #411 from nickoe/remove_fiskShawn Landden2021-01-061-9/+0
|\ \ \ | | | | | | | | Remove debug print that is no longer needed
| * | | Get rid of very "retro" and dead codeNick Østergaard2021-01-051-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | At least that is what the experts in #gtk are telling me. "Unless you want to support libgnome, which was deprecated long before GNOME3 was released: yes, you can drop it."