Unbreak non-amd64: check __LP64__ to detect 64 bits host OS

This fixes pointer truncation on sparc64 and probably mips64.
Bump REVISION since quickjs previously built on arm64 but with
different bignum sizing.

ok cwen@ bcallah@ (maintainer)
This commit is contained in:
jca 2020-01-15 14:30:50 +00:00
parent 22c0aa1bff
commit eaf409c2ea
3 changed files with 34 additions and 1 deletions

View File

@ -1,8 +1,9 @@
# $OpenBSD: Makefile,v 1.3 2020/01/15 14:24:23 jca Exp $
# $OpenBSD: Makefile,v 1.4 2020/01/15 14:30:50 jca Exp $
COMMENT = small, embeddable JavaScript engine in C
V = 2019.10.27
REVISION = 0
DISTNAME = quickjs-${V:S/./-/g}
PKGNAME = quickjs-${V}

View File

@ -0,0 +1,16 @@
$OpenBSD: patch-libbf_h,v 1.1 2020/01/15 14:30:50 jca Exp $
Use more generic test for 64 bits platform.
Index: libbf.h
--- libbf.h.orig
+++ libbf.h
@@ -27,7 +27,7 @@
#include <stddef.h>
#include <stdint.h>
-#if defined(__x86_64__)
+#if defined(__LP64__)
#define LIMB_LOG2_BITS 6
#else
#define LIMB_LOG2_BITS 5

View File

@ -0,0 +1,16 @@
$OpenBSD: patch-quickjs_h,v 1.1 2020/01/15 14:30:50 jca Exp $
Use more generic test for 64 bits platform.
Index: quickjs.h
--- quickjs.h.orig
+++ quickjs.h
@@ -53,7 +53,7 @@ typedef struct JSClass JSClass;
typedef uint32_t JSClassID;
typedef uint32_t JSAtom;
-#if defined(__x86_64__) || defined(__aarch64__)
+#if defined(__LP64__)
#define JS_PTR64
#define JS_PTR64_DEF(a) a
#else