Weddington, Eric | 1 Apr 2012 06:25
Favicon

RE: GCC 4.7.0 as a AVR cross compiler


> -----Original Message-----
> From: Ian Lance Taylor [mailto:iant <at> google.com]
> Sent: Friday, March 30, 2012 1:22 PM
> To: stuart
> Cc: gcc <at> gcc.gnu.org
> Subject: Re: GCC 4.7.0 as a AVR cross compiler
> 
> stuart <stuart <at> trognet.demon.co.uk> writes:
> 
> > I am not sure this is the right place to ask this
> 
> It's not.  The right place is gcc-help <at> gcc.gnu.org.  Please take any
> followups there.  Thanks.
> 
> 
> > I can not seem to get gcc 4.7.0 to compile; it will not complete the
> > configuration stage complaining about missing packages (GMP, MPFR
and
> > MPC). I have tried to cross compile these packages for the Atmel AVR
> > Mega series but the only one that seems to complete is the GMP
> > package. The cross compile did produce a lib file (and install it
and
> > the gpm.h file in the correct place) but nothing else would accept
that
> > GMP was present on the system.
> 
> You need to have GMP, MPFR, and MPC for the host.  You do not need to
> cross-compile them for AVR.

(Continue reading)

Lawrence Crowl | 1 Apr 2012 07:44
Picon
Favicon

Re: GCC 4.7 and atomic_flag on PowerPC

On 3/28/12, Sebastian Huber <sebastian.huber <at> embedded-brains.de> wrote:
> I have a small test program for the new <stdatomic.h> features
> which should implement a simple spin lock:
>
> #include <stdatomic.h>
>
> void lock_int(atomic_int *x)
> {
>    int expected = 0;
>    _Bool success;
>
>    do {
>      success = atomic_compare_exchange_weak_explicit(
>        x,
>        &expected,
>        1,
>        memory_order_acquire,
>        memory_order_relaxed
>      );
>    } while (!success);
> }

The normal idiom for using compare-exchange, using your variable
names and memory orders, is:

  expected = atomic_load_explicit( x, memory_order_relaxed );
  do {
    desired = function(expected);
  } while (!atomic_compare_exchange_weak_explicit(x, &expected,
            desired, memory_order_acquire, memory_order_relaxed));
(Continue reading)

Andrew Haley | 1 Apr 2012 14:59
Picon
Favicon

Re: segfault using _Unwind_ForcedUnwind()

On 03/30/2012 08:26 PM, Ian Lance Taylor wrote:
> Oliver Kowalke <oliver.kowalke <at> gmx.de> writes:
> 
>> Am 30.03.2012 17:08, schrieb Ian Lance Taylor:
>>> "Oliver Kowalke"<oliver.kowalke <at> gmx.de>  writes:
>>>
>>>> I get a segfault with following app - could you verify this?
>>> This program works fine for me (gcc 4.4.3, glibc 2.11.1, Ubuntu Lucid)
>>> in 64-bit mode.  But now I see that you are using 32-bit mode.  I can
>>> confirm that the program crashes for me in that mode.
>>>
>>> Looking at the 32-bit implementation of makecontext in glibc, I can see
>>> that the problem is that it doesn't set up correct unwind information
>>> for the parameters pushed on the stack.  The effect is that the first
>>> parameter on the stack appears to be a PC value.  I think this is a bug
>>> in glibc.  It should be possible to arrange for unwind information which
>>> skips %ebx words on the stack.
>>
>> I think the test app is not correct - on ppc32/linux it never returns.
> 
> Any application that tries to walk up the stack to the end is
> unfortunately going to be tricky and non-portable.  If you want a
> portable program you should always have some way to stop the stack
> unwind yourself.  That is unfortunate but true.

I'm not at all happy about that.  Any system that supports backtrace()
should be able to get this right.  I've had to fix more than one
system to make unwinding work right; if it doesn't, that can (and IMO
should) be treated as a bug.

(Continue reading)

Andrew Haley | 1 Apr 2012 15:03
Picon
Favicon

Re: About ARM-cross-compile

Hi,

[redirected gcc-help]

On 03/30/2012 05:03 PM, Mao Ito wrote:
> I am a grad student at UW-Madison who asked a question before about gcc-cross compiler.
> I got stuck on a problem. 
> Actually, I could install "arm-eabi" cross-compiler for c, c++.

Cross-compiler from what host to what target?

> The problem is about "arm-eabi-gcj" (i.e. for Java).
> "arm-elf" version cross-compiler was successfully installed for c, c++, Java. But, after that, I
realized that my simulator does not accept OABI binary code (i.e. binary code "arm-elf" compiler
generates). So, I need to install "arm-eabi" version cross-compiler because the simulator can accept
EABI binary code.
> 
> So, recently, I was struggling to install "arm-eabi-gcj" into my laptop. 
> The problem is about "libgcj.jar" file. 
> I could download "libgcj-4.1.2-51.el5.x86_64.rpm" from this web-site http://rpm.pbone.net/index.php3/stat/4/idpl/16997778/dir/scientific_linux_5/com/libgcj-4.1.2-51.el5.x86_64.rpm.html.
> The problem is that this is RPM file so that I need to get "RPM-GPG-KEY" for this rpm file to unlock it. 

This file will install on a Scientific Linux system with the program "rpm".
It requires the rest of gcc for that system.

> However, I cannot find this key. Does somebody have some idea about where I can get this key?
> Actually, I could install "arm-eabi" for c, c++. So, we are thinking that we use c++. But, we would like to
use Java. So, does someone know about how I can get GPG-KEY for libgcj.jar or other way.

This is one of the most confusing questions I've ever read.
(Continue reading)

Me Myself and I | 2 Apr 2012 04:34
Picon

URL link for built GCJ


Irrespective either way of Cygwin or Mingw, Can someone give me
a web link for a working instance of the built
Gnu Compiler for Java for use on Windows?

I really can't succeed in building it!

(32 bit version, and 64 bit if available)?
 		 	   		  

Christer Solskogen | 2 Apr 2012 08:05
Picon

unwind-problems

Hi!

While compiling a stage2 cross-compiler (with kernel headers, and eglibc 
headers, and some some libs(crt1.o crti.o crtn.o and libc.so) I get this:

/private/chsols/obj/gcc.cross.mips-linux-gnu.stage2/./gcc/xgcc 
-B/private/chsols/obj/gcc.cross.mips-linux-gnu.stage2/./gcc/ 
-B/private/chsols/cross-tools/mips-linux-gnu/bin/ 
-B/private/chsols/cross-tools/mips-linux-gnu/lib/ -isystem 
/private/chsols/cross-tools/mips-linux-gnu/include -isystem 
/private/chsols/cross-tools/mips-linux-gnu/sys-include    -O2 -pipe 
-march=loongson3a -minterlink-mips16 -O2  -O2 -pipe -march=loongson3a 
-minterlink-mips16 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE  -W -Wall 
-Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes 
-Wold-style-definition  -isystem ./include   -fPIC -g -DIN_LIBGCC2 
-fbuilding-libgcc -fno-stack-protector   -fPIC -I. -I. -I../.././gcc 
-I/private/chsols/src/gcc/libgcc -I/private/chsols/src/gcc/libgcc/. 
-I/private/chsols/src/gcc/libgcc/../gcc 
-I/private/chsols/src/gcc/libgcc/../include  -DHAVE_CC_TLS  -o 
unwind-dw2.o -MT unwind-dw2.o -MD -MP -MF unwind-dw2.dep -fexceptions -c 
/private/chsols/src/gcc/libgcc/unwind-dw2.c -fvisibility=hidden 
-DHIDE_EXPORTS
In file included from /private/chsols/src/gcc/libgcc/unwind-dw2.c:376:0:
./md-unwind-support.h: In function 'mips_fallback_frame_state':
./md-unwind-support.h:78:17: error: field 'info' has incomplete type
make[2]: *** [unwind-dw2.o] Error 1
make[2]: Leaving directory 
`/var/tmp/chsols/obj/gcc.cross.mips-linux-gnu.stage2/mips-linux-gnu/libgcc'
make[1]: *** [all-target-libgcc] Error 2
make[1]: Leaving directory 
(Continue reading)

Christer Solskogen | 2 Apr 2012 08:10
Picon

Re: Building GCC on Solaris 10

On 30/3/2012 4:15 PM, Dennis Clarke wrote:

> OKay, do not use the binutils gas or gld. Just use the ones in the
> regular /usr/ccs/bin directory.
>
> I can get into a long long discussion why but for now take my word
> for it that you are going down a deep and old rabbit hole there.
>

Why not put up this rant as an article on blastwave.org? They would 
probably have some good points (and whenever this questions some up they 
can point to it)

--

-- 
chs

Alberich de megres | 2 Apr 2012 10:11
Picon

gcc + uclibc

Hello!

I'm trying to understand the toolchain creation, by building one. I
want to learn how they work.
I'm building one for arm, with:
- binutils 2.22
- kernel 3.1.8 headers
- gcc 4.6.2

When compiling gcc final stage I got the following error:

/home/abm/kr/xenv-0.3.01/work/rpi/build/gcc-4.6.2/./gcc/xgcc
-B/home/abm/kr/xenv-0.3.01/work/rpi/build/gcc-4.6.2/./gcc/
-B/opt/xenv/x-tools/arm-none-eabi/bin/
-B/opt/xenv/x-tools/arm-none-eabi/lib/ -isystem
/opt/xenv/x-tools/arm-none-eabi/include -isystem
/opt/xenv/x-tools/arm-none-eabi/sys-include    -g -O2 -O2  -g -O2
-DIN_GCC -DCROSS_DIRECTORY_STRUCTURE  -W -Wall -Wwrite-strings
-Wcast-qual -Wstrict-prototypes -Wmissing-prototypes
-Wold-style-definition  -isystem ./include  -fno-inline
-Wno-missing-prototypes -g  -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED
-fno-stack-protector   -I. -I. -I../.././gcc
-I/home/abm/kr/xenv-0.3.01/work/rpi/src/gcc-4.6.2/libgcc
-I/home/abm/kr/xenv-0.3.01/work/rpi/src/gcc-4.6.2/libgcc/.
-I/home/abm/kr/xenv-0.3.01/work/rpi/src/gcc-4.6.2/libgcc/../gcc
-I/home/abm/kr/xenv-0.3.01/work/rpi/src/gcc-4.6.2/libgcc/../include
-DHAVE_CC_TLS  -o _muldi3.o -MT _muldi3.o -MD -MP -MF _muldi3.dep
-DL_muldi3 -c /home/abm/kr/xenv-0.3.01/work/rpi/src/gcc-4.6.2/libgcc/../gcc/libgcc2.c
\
In file included from
(Continue reading)

Jonathan Wakely | 2 Apr 2012 10:15
Picon

Re: URL link for built GCJ

On 2 April 2012 03:34, Me Myself and I wrote:
>
> Irrespective either way of Cygwin or Mingw, Can someone give me
> a web link for a working instance of the built
> Gnu Compiler for Java for use on Windows?

Maybe the answer is No.

> I really can't succeed in building it!
>
> (32 bit version, and 64 bit if available)?

I've got an idea, why don't you keep sending emails asking the same
thing, with a different subject line.   I don't think anyone's noticed
your question yet.

Either that or the answer is no.

Andrew Haley | 2 Apr 2012 11:03
Picon
Favicon

Re: gcc + uclibc

On 04/02/2012 09:11 AM, Alberich de megres wrote:
> I'm trying to understand the toolchain creation, by building one. I
> want to learn how they work.
> I'm building one for arm, with:
> - binutils 2.22
> - kernel 3.1.8 headers
> - gcc 4.6.2
> 
> 
> When compiling gcc final stage I got the following error:

You need the C libraries for your target system.

Install them somewhere, and then configure --with-sysroot=

Something like this:

  $ /home/aph/gcc/trunk/configure \
  --target=armv7hl-redhat-linux-gnueabi \
  --prefix=/home/aph/gcc/trunk/x-armv7hl-redhat-linux-gnueabi-install \
  --with-sysroot=/home/aph/fedora_armv7hl_rootfs/ \
  --enable-languages=c,c++

Andrew.


Gmane