1
0
forked from ports/contrib

distcc: few patches for compatibility

This commit is contained in:
Danny Rawlins 2020-07-15 23:29:49 +10:00
parent ed2ac04564
commit 6c5bd38ed4
4 changed files with 92 additions and 4 deletions

View File

@ -1,6 +1,8 @@
untrusted comment: verify with /etc/ports/contrib.pub
RWSagIOpLGJF3zSQHvqBKxQHWXcO8HEc8c6VY9yvtukcdhj/NSv7K7VGVaeB3KCFm+q9okEMaqKEr7+zU2Ap6yosj/uw3K4nXA8=
SHA256 (Pkgfile) = bae8ad528bc728efb13331347d4cfcc676d91a9f67ad4a951a17088dd0d9776e
RWSagIOpLGJF34bUIX11CuBZDmIQP4MedeygN2vKG2f3oY2ZQ1hBF0IsAua2XMHWEWpjihgoXcP+mGlTRgzF73YTDK+T5otdrQU=
SHA256 (Pkgfile) = 0e7a08a1d22c5cbfaa00cadecc73fd2f9076c86a0debcc1af3751039c06eb99e
SHA256 (.footprint) = 96261a14be1f68dc197a6eeab9ce9ffa685b7921e7802d2e62313e11e68575d4
SHA256 (distcc-3.3.3.tar.gz) = bead25471d5a53ecfdf8f065a6fe48901c14d5008956c318c700e56bc87bf0bc
SHA256 (distccd) = d440c68490aab6c4552848d9253d033a0169cae56a0b94d75f68fa81642bb847
SHA256 (distcc-3.3.3-py38.patch) = bc6d940980a24df9d5023a85d2b6869e8014967b561e14ab12cff7b3ff159497
SHA256 (distcc-3.3.3-gcc-10-fix.patch) = bdb625de75400a79f873f323691fb980bbbe5373b24300e055edd475c6c23144

View File

@ -5,9 +5,11 @@
name=distcc
version=3.3.3
release=1
release=2
source=(https://github.com/distcc/distcc/releases/download/v$version/$name-$version.tar.gz
distccd)
distccd
distcc-3.3.3-py38.patch
distcc-3.3.3-gcc-10-fix.patch)
build() {
cd $name-$version
@ -16,6 +18,9 @@ build() {
[ -e '/usr/lib/pkgconfig/gtk+-2.0.pc' ] || PKGMK_DISTCC+=' --without-gtk'
[ -e '/usr/lib/pkgconfig/popt.pc' ] || PKGMK_DISTCC+=' --with-included-popt'
patch -p1 -i $SRC/distcc-3.3.3-py38.patch
patch -p1 -i $SRC/distcc-3.3.3-gcc-10-fix.patch
./autogen.sh
./configure ${PKGMK_DISTCC} \

View File

@ -0,0 +1,28 @@
From 377969cc762569f4a5ec409a1e7ad6a7be3e51b3 Mon Sep 17 00:00:00 2001
From: Romain Geissler <romain.geissler@amadeus.com>
Date: Mon, 27 Jan 2020 09:28:43 +0000
Subject: [PATCH] Fix build with gcc 10 which defaults to -fno-common (cf
https://gcc.gnu.org/gcc-10/porting_to.html)
This fixes the following link error I see when I use the latest gcc 10
git branch:
/opt/1A/toolchain/x86_64-v20.0.7/lib/gcc/x86_64-1a-linux-gnu/10.0.1/../../../../x86_64-1a-linux-gnu/bin/ld: src/serve.o:(.bss+0x0): multiple definition of `stats_text'; src/prefork.o:(.bss+0x0): first defined here
/opt/1A/toolchain/x86_64-v20.0.7/lib/gcc/x86_64-1a-linux-gnu/10.0.1/../../../../x86_64-1a-linux-gnu/bin/ld: src/stats.o:(.data+0x20): multiple definition of `stats_text'; src/prefork.o:(.bss+0x0): first defined here
collect2: error: ld returned 1 exit status
---
src/stats.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/stats.h b/src/stats.h
index 9bde285..74d4690 100644
--- a/src/stats.h
+++ b/src/stats.h
@@ -33,7 +33,7 @@ enum stats_e { STATS_TCP_ACCEPT, STATS_REJ_BAD_REQ, STATS_REJ_OVERLOAD,
STATS_COMPILE_OK, STATS_COMPILE_ERROR, STATS_COMPILE_TIMEOUT,
STATS_CLI_DISCONN, STATS_OTHER, STATS_ENUM_MAX };
-const char *stats_text[20];
+extern const char *stats_text[20];
int dcc_stats_init(void);
void dcc_stats_init_kid(void);

View File

@ -0,0 +1,53 @@
From c52a023b8a17e4346c66a8fddee69b40b327eae7 Mon Sep 17 00:00:00 2001
From: MartB <mart.b@outlook.de>
Date: Thu, 28 Nov 2019 21:00:59 +0100
Subject: [PATCH] Replace time.clock() with time.perf_counter()
.clock() got removed in python 3.8 and was marked as deprecated since 3.3
(https://github.com/python/cpython/pull/13270)
---
include_server/parse_file.py | 4 ++--
include_server/statistics.py | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/include_server/parse_file.py b/include_server/parse_file.py
index d1dcc74..f5d78b7 100755
--- a/include_server/parse_file.py
+++ b/include_server/parse_file.py
@@ -272,7 +272,7 @@ def Parse(self, filepath, symbol_table):
assert isinstance(filepath, str)
self.filepath = filepath
- parse_file_start_time = time.clock()
+ parse_file_start_time = time.perf_counter()
statistics.parse_file_counter += 1
includepath_map_index = self.includepath_map.Index
@@ -338,6 +338,6 @@ def Parse(self, filepath, symbol_table):
expr_includes, next_includes)
- statistics.parse_file_total_time += time.clock() - parse_file_start_time
+ statistics.parse_file_total_time += time.perf_counter() - parse_file_start_time
return (quote_includes, angle_includes, expr_includes, next_includes)
diff --git a/include_server/statistics.py b/include_server/statistics.py
index 9677af3..7bc9cb8 100755
--- a/include_server/statistics.py
+++ b/include_server/statistics.py
@@ -62,13 +62,13 @@ def StartTiming():
global start_time, translation_unit_counter
"""Mark the start of a request to find an include closure."""
translation_unit_counter += 1
- start_time = time.clock()
+ start_time = time.perf_counter()
def EndTiming():
"""Mark the end of an include closure calculation."""
global translation_unit_time, min_time, max_time, total_time
- translation_unit_time = time.clock() - start_time
+ translation_unit_time = time.perf_counter() - start_time
min_time = min(translation_unit_time, min_time)
max_time = max(translation_unit_time, max_time)
total_time += translation_unit_time