File 0731-erts-Do-not-use-named-no_cpuid-label-in-asm.patch of Package erlang

From eb0f74a6281eb7498d36a2ed5d15c442057aa1b2 Mon Sep 17 00:00:00 2001
From: "Matwey V. Kornilov" <matwey.kornilov@gmail.com>
Date: Fri, 26 Jul 2019 20:26:37 +0300
Subject: [PATCH] erts: Do not use named no_cpuid label in asm

Ask compiler to generate unique label name. Using named label has implications
on optimizer, that may lead to the compilation errors as the following:

    pthread/ethread.c: Assembler messages:
    pthread/ethread.c:213: Error: symbol `no_cpuid' is already defined
    pthread/ethread.c:213: Error: symbol `no_cpuid' is already defined
    pthread/ethread.c:213: Error: symbol `no_cpuid' is already defined
---
 erts/lib_src/pthread/ethread.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/erts/lib_src/pthread/ethread.c b/erts/lib_src/pthread/ethread.c
index b4b12fcd86..b567ed81b0 100644
--- a/erts/lib_src/pthread/ethread.c
+++ b/erts/lib_src/pthread/ethread.c
@@ -208,9 +208,9 @@ ethr_x86_cpuid__(int *eax, int *ebx, int *ecx, int *edx)
              "popl %%eax\n\t"
              "movl $0x0, %0\n\t"
              "xorl %%ecx, %%eax\n\t"
-             "jz no_cpuid\n\t"
+             "jz 1f\n\t"
 	     "movl $0x1, %0\n\t"
-             "no_cpuid:\n\t"
+             "1:\n\t"
              : "=r"(have_cpuid)
              :
              : "%eax", "%ecx", "cc");
-- 
2.16.4

openSUSE Build Service is sponsored by