summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBernhard Rosenkränzer <bernhard.rosenkraenzer.ext@huawei.com>2021-03-11 21:24:37 +0100
committerKhem Raj <raj.khem@gmail.com>2021-07-14 09:53:49 -0700
commitcf8aac3eb49192400634db109cb9bd53f562d397 (patch)
treea5cb786d93fd4a21336dcf14c4b5137055e1f68d
parentc8139a4dcb3560cfb70ad3965bd35289a7ff819e (diff)
downloadmeta-clang-cf8aac3eb49192400634db109cb9bd53f562d397.tar.gz
Add patches to make dhcp and distcc build with clang 12
(Patches used without toolchain_clang condition because they also fix gcc >= 11 and don't hurt with older compilers) Signed-off-by: Bernhard Rosenkränzer <bernhard.rosenkraenzer.ext@huawei.com>
-rw-r--r--recipes-connectivity/dhcp/dhcp/dhcp-4.4.2-clang-12.patch19
-rw-r--r--recipes-connectivity/dhcp/dhcp_4.4.2%.bbappend7
-rw-r--r--recipes-devtools/distcc/distcc/distcc-3.3.3-clang-12.patch19
-rw-r--r--recipes-devtools/distcc/distcc_3.3.3%.bbappend4
4 files changed, 49 insertions, 0 deletions
diff --git a/recipes-connectivity/dhcp/dhcp/dhcp-4.4.2-clang-12.patch b/recipes-connectivity/dhcp/dhcp/dhcp-4.4.2-clang-12.patch
new file mode 100644
index 0000000..4901b91
--- /dev/null
+++ b/recipes-connectivity/dhcp/dhcp/dhcp-4.4.2-clang-12.patch
@@ -0,0 +1,19 @@
1# SPDX-FileCopyrightText: Huawei Inc.
2# SPDX-License-Identifier: Apache-2.0
3
4Fix building with modern compilers, such as clang 12 and gcc 11.
5
6Signed-off-by: Bernhard Rosenkraenzer <bernhard.rosenkraenzer.ext@huawei.com>
7
8diff -up dhcp-4.4.2/server/mdb.c.omv~ dhcp-4.4.2/server/mdb.c
9--- dhcp-4.4.2/server/mdb.c.omv~ 2021-03-11 18:08:56.890166779 +0100
10+++ dhcp-4.4.2/server/mdb.c 2021-03-11 18:09:01.930189762 +0100
11@@ -67,7 +67,7 @@ static host_id_info_t *host_id_info = NU
12
13 int numclasseswritten;
14
15-omapi_object_type_t *dhcp_type_host;
16+extern omapi_object_type_t *dhcp_type_host;
17
18 isc_result_t enter_class(cd, dynamicp, commit)
19 struct class *cd;
diff --git a/recipes-connectivity/dhcp/dhcp_4.4.2%.bbappend b/recipes-connectivity/dhcp/dhcp_4.4.2%.bbappend
new file mode 100644
index 0000000..f1fffde
--- /dev/null
+++ b/recipes-connectivity/dhcp/dhcp_4.4.2%.bbappend
@@ -0,0 +1,7 @@
1# SPDX-FileCopyrightText: Huawei Inc.
2# SPDX-License-Identifier: Apache-2.0
3
4FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
5SRC_URI_append = "\
6 file://dhcp-4.4.2-clang-12.patch \
7"
diff --git a/recipes-devtools/distcc/distcc/distcc-3.3.3-clang-12.patch b/recipes-devtools/distcc/distcc/distcc-3.3.3-clang-12.patch
new file mode 100644
index 0000000..61a26a7
--- /dev/null
+++ b/recipes-devtools/distcc/distcc/distcc-3.3.3-clang-12.patch
@@ -0,0 +1,19 @@
1# SPDX-FileCopyrightText: Huawei Inc.
2# SPDX-License-Identifier: Apache-2.0
3
4Fix build with modern compilers, such as clang 12 and gcc 11
5
6Signed-off-by: Bernhard Rosenkraenzer <bernhard.rosenkraenzer.ext@huawei.com>
7
8diff -up git/src/stats.h.omv~ git/src/stats.h
9--- git/src/stats.h.omv~ 2021-03-11 18:38:55.022070855 +0100
10+++ git/src/stats.h 2021-03-11 18:38:59.498751697 +0100
11@@ -33,7 +33,7 @@ enum stats_e { STATS_TCP_ACCEPT, STATS_R
12 STATS_COMPILE_OK, STATS_COMPILE_ERROR, STATS_COMPILE_TIMEOUT,
13 STATS_CLI_DISCONN, STATS_OTHER, STATS_ENUM_MAX };
14
15-const char *stats_text[20];
16+extern const char *stats_text[20];
17
18 int dcc_stats_init(void);
19 void dcc_stats_init_kid(void);
diff --git a/recipes-devtools/distcc/distcc_3.3.3%.bbappend b/recipes-devtools/distcc/distcc_3.3.3%.bbappend
new file mode 100644
index 0000000..d2bf964
--- /dev/null
+++ b/recipes-devtools/distcc/distcc_3.3.3%.bbappend
@@ -0,0 +1,4 @@
1FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
2SRC_URI_append = "\
3 file://distcc-3.3.3-clang-12.patch \
4"