From 1a402cbf6b92bb2e0243ba7f881d093d9e9d4fa7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Deuc=D0=B5?= <shurd@sasktel.net>
Date: Mon, 15 Mar 2021 18:57:56 -0400
Subject: [PATCH] Disable tracejit on OSs it's not supported on.

Only supported on FreeBSD, Linux, Solaris, OS/2, GNU, Cygwin, and Darwin
Should allow OpenBSD to build JS engine.
---
 3rdp/build/GNUmakefile | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/3rdp/build/GNUmakefile b/3rdp/build/GNUmakefile
index b39700ade4..491709b24a 100644
--- a/3rdp/build/GNUmakefile
+++ b/3rdp/build/GNUmakefile
@@ -27,6 +27,17 @@ ifeq ($(shell perl -e 'print "$(machine)"=~/\.arm/?"YES":"NO"'),YES)
   endif
  endif
 endif
+# OS/2 and "GNU" (HURD?) also need this, but we never plan to support them.
+ifneq ($(os),darwin)
+ ifneq ($(os),linux)
+  ifneq ($(os),freebsd)
+   ifneq ($(os),sunos)
+    JS_CONFIGURE_ARGS += '--disable-tracejit'
+   endif
+  endif
+ endif
+endif
+
 JS_CONFIGURE_ENV += 'CXXFLAGS=$(CXXFLAGS)'
 
 .PHONY: cryptlib libmozjs
-- 
GitLab