master hovercats/oakiss / repo / luajit / patches / 0001-fix-check-for-toolchain-generateing-unwind-tables.patch
 1From c5a326cc3911b0e498522aab845a5e32fcaa1280 Mon Sep 17 00:00:00 2001
 2From: hovercats <hovercatswithlasereyes@protonmail.com>
 3Date: Thu, 19 Sep 2024 21:13:15 +0200
 4Subject: [PATCH] fix check for toolchain generateing unwind tables
 5
 6---
 7 src/Makefile | 2 +-
 8 1 file changed, 1 insertion(+), 1 deletion(-)
 9
10diff --git a/src/Makefile b/src/Makefile
11index 71857ed6..e85a9448 100644
12--- a/src/Makefile
13+++ b/src/Makefile
14@@ -342,7 +342,7 @@ ifeq (iOS,$(TARGET_SYS))
15 else
16   ifeq (,$(findstring LJ_NO_UNWIND 1,$(TARGET_TESTARCH)))
17     # Find out whether the target toolchain always generates unwind tables.
18-    TARGET_TESTUNWIND=$(shell exec 2>/dev/null; echo 'extern void b(void);int a(void){b();return 0;}' | $(TARGET_CC) -c -x c - -o tmpunwind.o && { grep -qa -e eh_frame -e __unwind_info tmpunwind.o || grep -qU -e eh_frame -e __unwind_info tmpunwind.o; } && echo E; rm -f tmpunwind.o)
19+    TARGET_TESTUNWIND=$(shell exec 2>/dev/null; echo 'extern void b(void);int a(void){b();return 0;}' | $(TARGET_CC) -c -x c - -o tmpunwind.o && { strings tmpunwind.o | grep -q -e eh_frame -e __unwind_info; } && echo E; rm -f tmpunwind.o)
20     ifneq (,$(findstring E,$(TARGET_TESTUNWIND)))
21       TARGET_XCFLAGS+= -DLUAJIT_UNWIND_EXTERNAL
22     endif
23-- 
242.45.1
25