RE: Cross-compiling GLib 2.18 with arm-linux.
- From: "John Peterson" <j0hnp comcast net>
- To: "'Felipe Contreras'" <felipe contreras gmail com>
- Cc: gtk-devel-list gnome org
- Subject: RE: Cross-compiling GLib 2.18 with arm-linux.
- Date: Sat, 28 Mar 2009 07:42:53 -0700
-----Original Message-----
From: Felipe Contreras [mailto:felipe contreras gmail com]
Sent: Friday, March 27, 2009 4:01 AM
To: John Peterson
Cc: gtk-devel-list gnome org
Subject: Re: Cross-compiling GLib 2.18 with arm-linux.
2009/3/23 John Peterson <j0hnp comcast net>:
> Hello � I�m not sure I�ve got the right mailing list for this question, but
> I thought I�d try.
>
>
>
> I have downloaded glib-2.18.0 on Linux FC4, and am trying to cross-compile
> with an arm-linux-gcc compiler.� Most of the stuff goes smoothly until I hit
> the atomic_spin_trylock in the gatomic.c file.
>
>
>
> This function has some embedded assembly (denoted with the asm keyword).
> The particular error that I get is:
>
>
>
> /bin/sh ../libtool --tag=CC � --mode=compile arm-linux-gcc -DHAVE_CONFIG_H
> -I. -I.. -I.. -DG_LOG_DOMAIN=\"GLib\" -DG_DISABLE_CAST_CHECKS
> -DG_DISABLE_DEPRECATED -DGLIB_COMPILATION -DPCRE_STATIC
> -DG_DISABLE_SINGLE_INCLUDES -pthread -mbig-endian -std=c99 -Wall -MT
> gatomic.lo -MD -MP -MF .deps/gatomic.Tpo -c -o gatomic.lo gatomic.c
>
> arm-linux-gcc -DHAVE_CONFIG_H -I. -I.. -I.. -DG_LOG_DOMAIN=\"GLib\"
> -DG_DISABLE_CAST_CHECKS -DG_DISABLE_DEPRECATED -DGLIB_COMPILATION
> -DPCRE_STATIC -DG_DISABLE_SINGLE_INCLUDES -pthread -mbig-endian -std=c99
> -Wall -MT gatomic.lo -MD -MP -MF .deps/gatomic.Tpo -c gatomic.c -fPIC -DPIC
> -o .libs/gatomic.o
>
> gatomic.c: In function `atomic_spin_trylock':
>
> gatomic.c:570: `asm' undeclared (first use in this function)
>
> gatomic.c:570: (Each undeclared identifier is reported only once
>
> gatomic.c:570: for each function it appears in.)
>
> gatomic.c:570: parse error before "volatile"
>
>
>
> I�m guessing that my arm-linux-gcc compiler is not compatible with the
> embedded assembly directive, and that�s why I�m getting the error.� However,
> I thought I�d check to see if maybe there was some other setting that might
> make this work.
Which arm compiler are you using? I've tried with codesourcery and
scratchbox2... glib builds fine.
--
Felipe Contreras
[John Peterson]
Dear Felipe,
Thanks for the response. I'm not quite sure how to figure out what arm compiler I'm using. This came as part of a toolkit to support building applications for an SBC1625 embedded controller from Micro/sys.
When I try to determine the version, this is what I get:
[johnp fingerrock17 host]$ arm-linux-gcc --version
arm-linux-gcc (GCC) 3.2.1
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
I've tried just about everything to get the compiler to recognize/handle the asm directive, but no dice. It sure feels like it's not supported with my compiler. :-(
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]