flame / blis

BLAS-like Library Instantiation Software Framework

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Compilation errors with clang 13 on MacOS with ARM

maparent opened this issue · comments

Compiling on clang 13.0.0 with latest Xcode (13.2.1) on Monterey 13.1. On HEAD (08174a2)
Configured with configure firestorm. I get the following error:

kernels/armv8a/3/bli_gemm_armv8a_asm_d6x8.c:171:49: fatal error: invalid symbol redefinition
        "                                            \n\t"
                                                       ^
<inline asm>:90:5: note: instantiated into assembly here
           LSLOOPKITER:
           ^

Solvable with the following patch:

--- a/kernels/armv8a/3/armv8a_asm_utils.h
+++ b/kernels/armv8a/3/armv8a_asm_utils.h
@@ -36,10 +36,10 @@

 // Apple's local label requirements.
 #if defined(__APPLE__)
-#define LABEL(str) "   L" #str": \n\t"
-#define BEQ(str) "b.eq L" #str"  \n\t"
-#define BNE(str) "b.ne L" #str"  \n\t"
-#define BRANCH(str) "b L" #str"  \n\t"
+#define LABEL(str) "   L" #str"%=: \n\t"
+#define BEQ(str) "b.eq L" #str"%=  \n\t"
+#define BNE(str) "b.ne L" #str"%=  \n\t"
+#define BRANCH(str) "b L" #str"%=  \n\t"
 #else
 #define LABEL(str) "   ." #str": \n\t"
 #define BEQ(str) "b.eq ." #str"  \n\t"

@maparent thanks for the report, it should be fixed now. If this is your first bug report, @fgvanzee will want to ask if you want your name included in the CREDITS file.

It's a small contribution, I can live without credits. Thank you for the fix!

Thanks, @maparent. We credit all contributions, even small ones like this. I would normally just include you in CREDITS without asking. 🙂

But if you still object, I can leave you out.

Then I will accept and thank you for honouring even small contributions.

Done! 🙂