Add GNU/Hurd build support.

Note: this is not an officially supported target.
Contributed by Pino Toscano and Samuel Thibault. #1383 #1384
This commit is contained in:
Mike Pall
2025-10-16 13:17:45 +02:00
parent a69aef43fe
commit a21ba1c9b5
3 changed files with 7 additions and 1 deletions

View File

@@ -357,6 +357,9 @@ else
ifeq (GNU/kFreeBSD,$(TARGET_SYS))
TARGET_XLIBS+= -ldl
endif
ifeq (GNU,$(TARGET_SYS))
TARGET_XLIBS+= -ldl
endif
endif
endif
endif

View File

@@ -96,6 +96,9 @@
#elif defined(__QNX__)
#define LJ_TARGET_QNX 1
#define LUAJIT_OS LUAJIT_OS_POSIX
#elif defined(__GNU__)
#define LJ_TARGET_HURD 1
#define LUAJIT_OS LUAJIT_OS_POSIX
#else
#define LUAJIT_OS LUAJIT_OS_OTHER
#endif

View File

@@ -125,7 +125,7 @@ static PRGR libfunc_rgr;
#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200
#define LJ_TARGET_HAS_GETENTROPY 1
#endif
#elif (LJ_TARGET_BSD && !defined(__NetBSD__)) || LJ_TARGET_SOLARIS || LJ_TARGET_CYGWIN || LJ_TARGET_QNX
#elif (LJ_TARGET_BSD && !defined(__NetBSD__)) || LJ_TARGET_SOLARIS || LJ_TARGET_CYGWIN || LJ_TARGET_QNX || LJ_TARGET_HURD
#define LJ_TARGET_HAS_GETENTROPY 1
#endif