[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Libunwind-devel] [PATCH] libunwind-arm: fix build failure due to asm()
From: |
Romain Naour |
Subject: |
[Libunwind-devel] [PATCH] libunwind-arm: fix build failure due to asm() |
Date: |
Mon, 3 Jul 2017 15:31:10 +0200 |
mesa3d on ARM build with libunwind support enabled fail to build due to asm()
function used when building with -std=c99.
The gcc documentation [1] suggest to use __asm__ instead of asm.
Fixes:
http://autobuild.buildroot.net/results/3ef/3efe156b6494e4392b6c31de447ee2c72acc1a53
[1]
https://gcc.gnu.org/onlinedocs/gcc/Alternate-Keywords.html#Alternate-Keywords
Signed-off-by: Romain Naour <address@hidden>
Cc: Bernd Kuhls <address@hidden>
---
include/libunwind-arm.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/libunwind-arm.h b/include/libunwind-arm.h
index f208487..1c856fa 100644
--- a/include/libunwind-arm.h
+++ b/include/libunwind-arm.h
@@ -265,7 +265,7 @@ unw_tdep_context_t;
#ifndef __thumb__
#define unw_tdep_getcontext(uc) (({ \
unw_tdep_context_t *unw_ctx = (uc); \
- register unsigned long *unw_base asm ("r0") = unw_ctx->regs; \
+ register unsigned long *unw_base __asm__ ("r0") = unw_ctx->regs; \
__asm__ __volatile__ ( \
"stmia %[base], {r0-r15}" \
: : [base] "r" (unw_base) : "memory"); \
@@ -273,7 +273,7 @@ unw_tdep_context_t;
#else /* __thumb__ */
#define unw_tdep_getcontext(uc) (({ \
unw_tdep_context_t *unw_ctx = (uc); \
- register unsigned long *unw_base asm ("r0") = unw_ctx->regs; \
+ register unsigned long *unw_base __asm__ ("r0") = unw_ctx->regs; \
__asm__ __volatile__ ( \
".align 2\nbx pc\nnop\n.code 32\n" \
"stmia %[base], {r0-r15}\n" \
--
2.9.4
- [Libunwind-devel] [PATCH] libunwind-arm: fix build failure due to asm(),
Romain Naour <=