File 0631-Undo-perform-degradation-on-macOS.patch of Package erlang

From 459580742734f117d6bc3e3965349b4d45562aa3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= <bjorn@erlang.org>
Date: Thu, 24 Sep 2020 08:15:13 +0200
Subject: [PATCH] Undo perform degradation on macOS

Apple Clang 12 included in Xcode 12 reports an error when a
function without a declaration is used. That change causes
the configure test for jump table support to wrongly assume
that jump table support is missing, and therefore a `switch`
would be used, degrading the performance of BEAM.
---
 erts/aclocal.m4 | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/erts/aclocal.m4 b/erts/aclocal.m4
index 8926ad728e..d237f7ae08 100644
--- a/erts/aclocal.m4
+++ b/erts/aclocal.m4
@@ -243,6 +243,7 @@ AC_TRY_COMPILE([],[
 #endif
     __label__ lbl1;
     __label__ lbl2;
+    extern int magic(void);
     int x = magic();
     static void *jtab[2];
 
@@ -288,6 +289,7 @@ if test "$ac_cv_prog_emu_cc" != no; then
 #endif
     	__label__ lbl1;
     	__label__ lbl2;
+	extern int magic(void);
     	int x = magic();
     	static void *jtab[2];
 
-- 
2.26.2

openSUSE Build Service is sponsored by