diff options
author | Khem Raj <raj.khem@gmail.com> | 2024-05-09 17:21:26 -0700 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2024-05-12 08:43:19 -0700 |
commit | 587edc5e8dc22d283a4d725deef210ce7911a966 (patch) | |
tree | 0cf3f1eac550390cf3100da056aaaed386f994b9 /meta-oe/recipes-graphics | |
parent | 88cc44c35983e3bde8f2c3461dfdd7f5ded1ec50 (diff) | |
download | meta-openembedded-587edc5e8dc22d283a4d725deef210ce7911a966.tar.gz |
fvwm: Fix build with gcc-14
Fixes for C99 compatibility
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-graphics')
4 files changed, 115 insertions, 0 deletions
diff --git a/meta-oe/recipes-graphics/fvwm/fvwm/0001-configure-Do-not-require-support-for-implicit-ints.patch b/meta-oe/recipes-graphics/fvwm/fvwm/0001-configure-Do-not-require-support-for-implicit-ints.patch new file mode 100644 index 000000000..356bd73f8 --- /dev/null +++ b/meta-oe/recipes-graphics/fvwm/fvwm/0001-configure-Do-not-require-support-for-implicit-ints.patch | |||
@@ -0,0 +1,45 @@ | |||
1 | From cbba378a23410241176d62f3bb43965c044615e3 Mon Sep 17 00:00:00 2001 | ||
2 | From: Florian Weimer <fweimer@redhat.com> | ||
3 | Date: Thu, 24 Nov 2022 13:06:50 +0100 | ||
4 | Subject: [PATCH 1/3] configure: Do not require support for implicit ints | ||
5 | |||
6 | Implicit ints have not been part of C since 1999, and future | ||
7 | compilers will disable support for them by default. Fortunatenly, | ||
8 | only one configure check needs adjusting. | ||
9 | |||
10 | Upstream-Status: Submitted [https://github.com/fvwmorg/fvwm/pull/100] | ||
11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
12 | --- | ||
13 | acinclude.m4 | 2 +- | ||
14 | configure.ac | 2 +- | ||
15 | 2 files changed, 2 insertions(+), 2 deletions(-) | ||
16 | |||
17 | diff --git a/acinclude.m4 b/acinclude.m4 | ||
18 | index 8b74ff1e..b66042f9 100644 | ||
19 | --- a/acinclude.m4 | ||
20 | +++ b/acinclude.m4 | ||
21 | @@ -30,7 +30,7 @@ if test "$ac_cv_func_select" = yes; then | ||
22 | #ifdef HAVE_SYS_SOCKET_H | ||
23 | #include <sys/socket.h> | ||
24 | #endif], | ||
25 | -[extern select ($ac_cv_type_fd_set_size_t, | ||
26 | +[extern int select ($ac_cv_type_fd_set_size_t, | ||
27 | $ac_cv_type_fd_set *, $ac_cv_type_fd_set *, $ac_cv_type_fd_set *, | ||
28 | $ac_type_timeval *);], | ||
29 | [ac_found=yes ; break 3],ac_found=no) | ||
30 | diff --git a/configure.ac b/configure.ac | ||
31 | index 97ab9e7a..c9fcede6 100644 | ||
32 | --- a/configure.ac | ||
33 | +++ b/configure.ac | ||
34 | @@ -220,7 +220,7 @@ AC_MINIX | ||
35 | |||
36 | # catch -Werror and similar options when running configure | ||
37 | AC_TRY_COMPILE([#include <stdio.h>], | ||
38 | -[int i; static j; int *p; char *c; | ||
39 | +[int i; int *p; char *c; | ||
40 | switch (*p = p = *c) { case 0: printf("%Q", c, p); } | ||
41 | *c = &i; c = p; | ||
42 | while (1 || (unsigned int)3 >= 0 || ((int)-1) == ((unsigned int)1)); | ||
43 | -- | ||
44 | 2.45.0 | ||
45 | |||
diff --git a/meta-oe/recipes-graphics/fvwm/fvwm/0002-acinclude.m4-Add-missing-unistd.h-to-AM_SAFETY_CHECK.patch b/meta-oe/recipes-graphics/fvwm/fvwm/0002-acinclude.m4-Add-missing-unistd.h-to-AM_SAFETY_CHECK.patch new file mode 100644 index 000000000..50ecb20c7 --- /dev/null +++ b/meta-oe/recipes-graphics/fvwm/fvwm/0002-acinclude.m4-Add-missing-unistd.h-to-AM_SAFETY_CHECK.patch | |||
@@ -0,0 +1,32 @@ | |||
1 | From 51287fb60263530f61b14df5519e10dabe67d2ad Mon Sep 17 00:00:00 2001 | ||
2 | From: Florian Weimer <fweimer@redhat.com> | ||
3 | Date: Thu, 24 Nov 2022 13:07:56 +0100 | ||
4 | Subject: [PATCH 2/3] acinclude.m4: Add missing <unistd.h> to | ||
5 | AM_SAFETY_CHECK_MKSTEMP | ||
6 | |||
7 | Otherwise, the check fails on a compiler which does not support | ||
8 | implicit function declarations (a language feature removed in 1999). | ||
9 | |||
10 | Upstream-Status: Submitted [https://github.com/fvwmorg/fvwm/pull/100] | ||
11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
12 | --- | ||
13 | acinclude.m4 | 3 +++ | ||
14 | 1 file changed, 3 insertions(+) | ||
15 | |||
16 | diff --git a/acinclude.m4 b/acinclude.m4 | ||
17 | index b66042f9..4dee2abe 100644 | ||
18 | --- a/acinclude.m4 | ||
19 | +++ b/acinclude.m4 | ||
20 | @@ -1154,6 +1154,9 @@ AC_DEFUN([AM_SAFETY_CHECK_MKSTEMP],[ | ||
21 | #include <stdio.h> | ||
22 | #include <stdlib.h> | ||
23 | #include <string.h> | ||
24 | +#ifdef HAVE_UNISTD_H | ||
25 | +#include <unistd.h> | ||
26 | +#endif | ||
27 | int main(void) | ||
28 | { | ||
29 | char template[128]; | ||
30 | -- | ||
31 | 2.45.0 | ||
32 | |||
diff --git a/meta-oe/recipes-graphics/fvwm/fvwm/0003-configure-Further-defang-the-Werror-check.patch b/meta-oe/recipes-graphics/fvwm/fvwm/0003-configure-Further-defang-the-Werror-check.patch new file mode 100644 index 000000000..e9d780ddc --- /dev/null +++ b/meta-oe/recipes-graphics/fvwm/fvwm/0003-configure-Further-defang-the-Werror-check.patch | |||
@@ -0,0 +1,35 @@ | |||
1 | From 542c6f25327587d5a6bffb8a45b457ec85dcf8e1 Mon Sep 17 00:00:00 2001 | ||
2 | From: Florian Weimer <fweimer@redhat.com> | ||
3 | Date: Tue, 19 Dec 2023 13:24:50 +0100 | ||
4 | Subject: [PATCH 3/3] configure: Further defang the -Werror check | ||
5 | |||
6 | Incompatible pointer types are actually errors (in the sense | ||
7 | that they are invalid C). Compilers have merely tolerated them as | ||
8 | warnings for backwards compatibility. This is changing with Clang 16 | ||
9 | and GCC 14, so relax the check a little. | ||
10 | |||
11 | Upstream-Status: Submitted [https://github.com/fvwmorg/fvwm/pull/100] | ||
12 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
13 | --- | ||
14 | configure.ac | 5 ++--- | ||
15 | 1 file changed, 2 insertions(+), 3 deletions(-) | ||
16 | |||
17 | diff --git a/configure.ac b/configure.ac | ||
18 | index c9fcede6..2e9615b2 100644 | ||
19 | --- a/configure.ac | ||
20 | +++ b/configure.ac | ||
21 | @@ -220,9 +220,8 @@ AC_MINIX | ||
22 | |||
23 | # catch -Werror and similar options when running configure | ||
24 | AC_TRY_COMPILE([#include <stdio.h>], | ||
25 | -[int i; int *p; char *c; | ||
26 | - switch (*p = p = *c) { case 0: printf("%Q", c, p); } | ||
27 | - *c = &i; c = p; | ||
28 | +[int unused; int *p; char *c; | ||
29 | + printf("%Q", c, p); | ||
30 | while (1 || (unsigned int)3 >= 0 || ((int)-1) == ((unsigned int)1)); | ||
31 | ], , AC_MSG_ERROR(" | ||
32 | configure is not able to compile programs with warnings. Please | ||
33 | -- | ||
34 | 2.45.0 | ||
35 | |||
diff --git a/meta-oe/recipes-graphics/fvwm/fvwm_2.7.0.bb b/meta-oe/recipes-graphics/fvwm/fvwm_2.7.0.bb index 8daf38a0b..df349494a 100644 --- a/meta-oe/recipes-graphics/fvwm/fvwm_2.7.0.bb +++ b/meta-oe/recipes-graphics/fvwm/fvwm_2.7.0.bb | |||
@@ -34,6 +34,9 @@ DEPENDS = " \ | |||
34 | SRC_URI = " \ | 34 | SRC_URI = " \ |
35 | git://github.com/fvwmorg/fvwm.git;protocol=https;branch=master \ | 35 | git://github.com/fvwmorg/fvwm.git;protocol=https;branch=master \ |
36 | file://0001-Fix-compilation-for-disabled-gnome.patch \ | 36 | file://0001-Fix-compilation-for-disabled-gnome.patch \ |
37 | file://0001-configure-Do-not-require-support-for-implicit-ints.patch \ | ||
38 | file://0002-acinclude.m4-Add-missing-unistd.h-to-AM_SAFETY_CHECK.patch \ | ||
39 | file://0003-configure-Further-defang-the-Werror-check.patch \ | ||
37 | " | 40 | " |
38 | 41 | ||
39 | SRCREV = "7baf540e56fb1a3e91752acba872a88543529d46" | 42 | SRCREV = "7baf540e56fb1a3e91752acba872a88543529d46" |