bug-gnulib@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
* jit/cache: Fix compilation error on m68k, sparc, etc.
@ 2023-12-19 21:27 Bruno Haible
  0 siblings, 0 replies; only message in thread
From: Bruno Haible @ 2023-12-19 21:27 UTC (permalink / raw)
  To: bug-gnulib

On Linux/m68k platforms, I get this compilation error:

In file included from ../../gltests/jit/test-cache.c:20:
../../gltests/../gllib/jit/cache.h: In function ‘clear_cache’:
../../gltests/../gllib/jit/cache.h:106:12: error: unknown type name ‘uintptr_t’
  106 |   register uintptr_t addr __asm__ ("%d1") = (uintptr_t) start;
      |            ^~~~~~~~~

On Linux/sparc64, similarly:

In file included from ../../gltests/jit/test-cache.c:20:
../../gltests/../gllib/jit/cache.h: In function ‘clear_cache’:
../../gltests/../gllib/jit/cache.h:93:3: error: unknown type name ‘uintptr_t’
   93 |   uintptr_t addr = (uintptr_t) start & ~(intptr_t)7;
      |   ^~~~~~~~~

This patch fixes it.


2023-12-19  Bruno Haible  <bruno@clisp.org>

	jit/cache: Fix compilation error on m68k, sparc, etc.
	* lib/jit/cache.h: Include <stdint.h>.
	* modules/jit/cache (Depends-on): Add stdint.

diff --git a/lib/jit/cache.h b/lib/jit/cache.h
index ce470399e5..a6653fdc4e 100644
--- a/lib/jit/cache.h
+++ b/lib/jit/cache.h
@@ -17,6 +17,7 @@
 
 /* Written by Bruno Haible <bruno@clisp.org>, 2020.  */
 
+#include <stdint.h>
 #if ENABLE_VALGRIND_SUPPORT
 # include <valgrind/valgrind.h>
 #endif
diff --git a/modules/jit/cache b/modules/jit/cache
index f7af2be314..e836bddcf1 100644
--- a/modules/jit/cache
+++ b/modules/jit/cache
@@ -6,6 +6,7 @@ lib/jit/cache.h
 m4/valgrind-helper.m4
 
 Depends-on:
+stdint
 
 configure.ac:
 gl_VALGRIND_HELPER





^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2023-12-19 21:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-19 21:27 jit/cache: Fix compilation error on m68k, sparc, etc Bruno Haible

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).