On 10/04/2023 19:02, Pádraig Brady wrote:
1 new test failure on Solaris 10 on sparc
1 new test failure on FreeBSD 13 on amd64

Both are the same false failure fixed with the attached.

There is also a build failure on the Solaris 10 machine
(with GCC 3.4) which is fixed with the attached.

cheers,
Pádraig
From ae4dace2ec591fafd501badbcf75d51d2260cfbe Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?P=C3=A1draig=20Brady?= <p...@draigbrady.com>
Date: Mon, 10 Apr 2023 19:36:23 +0100
Subject: [PATCH] build: fix _Noreturn compilation failure

Fix a build failure seen on gcc 3.4 on Solaris 10 at least.

* src/crctab.c: Ensure we include config.h for all compilation units.
This is now required for new _Noreturn usage in gnulib for stdint.h.
* src/cksum.c: Update generation code to ensure config.h included.
* cfg.mk: Remove crctab.c exclusion from the config.h check.
---
 cfg.mk       | 2 +-
 src/cksum.c  | 5 +++--
 src/crctab.c | 1 +
 3 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/cfg.mk b/cfg.mk
index 7c88d0749..918c929e7 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -844,7 +844,7 @@ exclude_file_name_regexp--sc_trailing_blank = \
 exclude_file_name_regexp--sc_system_h_headers = \
   ^src/((die|system|copy|chown-core|find-mount-point)\.h|make-prime-list\.c)$$
 
-_src = (crctab|false|lbracket|ls-(dir|ls|vdir)|tac-pipe|uname-(arch|uname))
+_src = (false|lbracket|ls-(dir|ls|vdir)|tac-pipe|uname-(arch|uname))
 _gl_src = (xdecto.max|cl-strtold)
 exclude_file_name_regexp--sc_require_config_h_first = \
   (^lib/buffer-lcm\.c|gl/lib/$(_gl_src)\.c|src/$(_src)\.c)$$
diff --git a/src/cksum.c b/src/cksum.c
index 5e38fef3a..75d82e62c 100644
--- a/src/cksum.c
+++ b/src/cksum.c
@@ -116,8 +116,9 @@ main (void)
         }
     }
 
-  printf ("#include <stdint.h>\n\n");
-  printf ("uint_fast32_t const crctab[8][256] = {\n");
+  printf ("#include <config.h>\n");
+  printf ("#include <stdint.h>\n");
+  printf ("\nuint_fast32_t const crctab[8][256] = {\n");
   for (int y = 0; y < 8; y++)
     {
       printf ("{\n  0x%08x", crctab[y][0]);
diff --git a/src/crctab.c b/src/crctab.c
index 20a1e4127..fdf2fdf87 100644
--- a/src/crctab.c
+++ b/src/crctab.c
@@ -1,3 +1,4 @@
+#include <config.h>
 #include <stdint.h>
 
 uint_fast32_t const crctab[8][256] = {
-- 
2.26.2

Reply via email to