File 0629-erts-Remove-old-gcc-flag-fno-remove-tree-copyrenam.patch of Package erlang

From 01707ea8ed0937a5c3e975ab34cebd5f6590aad7 Mon Sep 17 00:00:00 2001
From: Lukas Larsson <lukas@erlang.org>
Date: Wed, 9 Sep 2020 11:27:23 +0200
Subject: [PATCH] erts: Remove old gcc flag -fno-remove-tree-copyrenam

This flag was removed from gcc a long time ago.
---
 erts/configure.in | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/erts/configure.in b/erts/configure.in
index 308e1288ba..12dfb9b19b 100644
--- a/erts/configure.in
+++ b/erts/configure.in
@@ -1903,8 +1903,9 @@ fi
 
 if test "x$ac_compiler_gnu" = "xyes"; then
 AC_MSG_CHECKING([if we should add -fno-tree-copyrename to CFLAGS for computed gotos to work properly])
+## tree-copyrename was broken in gcc 4.3 and then removed in gcc 6
 AC_TRY_COMPILE([],[
-		#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
+		#if (__GNUC__ > 4 && __GNUC__ < 6)  || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
 			;
 			#else
 			#error old and ok
-- 
2.26.2

openSUSE Build Service is sponsored by