libunwind-devel
[Top][All Lists]
Advanced

[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_GNU_SOURCE -DNDEBUG -O2 -pipe -O2 -g1 -D_LARGEFILE_SOURCE 
> -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)
       );
     }
   else
@@ -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 
`/home/sven/git/buildroot/output/build/libunwind-e09f970/tests'
/bin/bash ../libtool --tag=CC   --mode=link 
/home/sven/git/buildroot/output/host/usr/bin/arm-unknown-linux-uclibcgnueabi-gcc
  -O2 -pipe -O2 -g1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE 
-D_FILE_OFFSET_BITS=64 -fexceptions -Wall -Wsign-compare   -o test-varargs 
test-varargs.o  
/bin/bash ../libtool --tag=CC   --mode=link 
/home/sven/git/buildroot/output/host/usr/bin/arm-unknown-linux-uclibcgnueabi-gcc
  -O2 -pipe -O2 -g1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE 
-D_FILE_OFFSET_BITS=64 -fexceptions -Wall -Wsign-compare   -o Lperf-trace 
Lperf-trace.o ../src/libunwind.la 
libtool: link: 
/home/sven/git/buildroot/output/host/usr/bin/arm-unknown-linux-uclibcgnueabi-gcc
 -O2 -pipe -O2 -g1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE 
-D_FILE_OFFSET_BITS=64 -fexceptions -Wall -Wsign-compare -o test-varargs 
test-varargs.o 
test-varargs.o: In function `a':
test-varargs.c:(.text+0x60): undefined reference to `backtrace'
collect2: ld returned 1 exit status


Regards,
Sven





reply via email to

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