[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Libunwind-devel] compile error on ARM

From: Sven Neumann
Subject: Re: [Libunwind-devel] compile error on ARM
Date: Thu, 30 Jun 2011 11:37:48 +0200

On Thu, 2011-06-30 at 10:48 +0200, Sven Neumann wrote:
> Hi,
> I am trying to cross-compile a recent git snapshot (e09f970) and ran
> into this error:
> compile:  
> /home/sven/git/buildroot/output/host/usr/bin/arm-unknown-linux-uclibcgnueabi-gcc
>  -DHAVE_CONFIG_H -I. -I../include -I../include -I../include/tdep-arm -I. 
> -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -fexceptions -Wall 
> -Wsign-compare -MT arm/Lresume.lo -MD -MP -MF arm/.deps/Lresume.Tpo -c 
> arm/Lresume.c  -fPIC -DPIC -o arm/.libs/Lresume.o
> In file included from arm/Lresume.c:4:
> arm/Gresume.c: In function '_ULarm_local_resume':
> arm/Gresume.c:59: error: expected string literal before ')' token
> arm/Gresume.c:91: error: expected string literal before ')' token
> make[3]: *** [arm/Lresume.lo] Error 1

Compilation seems to be fixed by this change (I have not tested the
resulting library though):

diff --git a/src/arm/Gresume.c b/src/arm/Gresume.c
index c870f5f..f496e99 100644
--- a/src/arm/Gresume.c
+++ b/src/arm/Gresume.c
@@ -55,7 +55,7 @@ arm_local_resume (unw_addr_space_t as, unw_cursor_t *cursor, 
void *arg)
        "ldmia %0, {r4-r12, lr}\n"
        "mov sp, r12\n"
        "bx lr\n"
-       : : "r" (regs) :
+       : : "r" (regs)
@@ -87,7 +87,7 @@ arm_local_resume (unw_addr_space_t as, unw_cursor_t *cursor, 
void *arg)
       asm __volatile__ (
        "mov sp, %0\n"
        "bx %1\n"
-       : : "r" (c->sigcontext_sp), "r" (c->sigcontext_pc) :
+       : : "r" (c->sigcontext_sp), "r" (c->sigcontext_pc)

Now the compilation breaks in the 'tests' directory:

Making all in tests
make[2]: Entering directory 
/bin/bash ../libtool --tag=CC   --mode=link 
-D_FILE_OFFSET_BITS=64 -fexceptions -Wall -Wsign-compare   -o test-varargs 
/bin/bash ../libtool --tag=CC   --mode=link 
-D_FILE_OFFSET_BITS=64 -fexceptions -Wall -Wsign-compare   -o Lperf-trace 
Lperf-trace.o ../src/ 
libtool: link: 
-D_FILE_OFFSET_BITS=64 -fexceptions -Wall -Wsign-compare -o test-varargs 
test-varargs.o: In function `a':
test-varargs.c:(.text+0x60): undefined reference to `backtrace'
collect2: ld returned 1 exit status


reply via email to

[Prev in Thread] Current Thread [Next in Thread]