[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gm2] linking : `__gxx_personality_v0' question
From: |
Gaius Mulley |
Subject: |
Re: [Gm2] linking : `__gxx_personality_v0' question |
Date: |
Tue, 19 Apr 2011 12:21:56 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) |
Arnauld Michelizza <address@hidden> writes:
> Hi Gaius,
>
> thank you very much for your quick reply.
>
>> you could try:
>> gm2 -c -m32 -fno-exceptions Kernel.mod
>
> I already tried this, but curiously, that __gxx_personality_v0 symbol remains
> :
>
> $ gm2 -c -m32 -fno-exceptions Kernel.mod
> $ nm Kernel.o
> 00000000 b MyScreen
> 0000008a t PutCharOnXY
> 00000085 T _M2_Kernel_finish
> 00000000 T _M2_Kernel_init
> U __gxx_personality_v0
> $ gm2 --version
> GNU Modula-2 1.0.1 (20110223)
> grafted onto GCC 4.1.2
>
>
>> and then the link. C++ (libstdc++) is used to handle Modula-2
>> exceptions (which you probably don't want in your kernel). Some
>> embedded ports cannot use libstdc++ either so this option disables this
>> library.
>
> Ok, it's very clear.
>
> Option -fno-exceptions doesn't seem to work. Maybe a gm2 or gcc
> version problem ?
Hi Arnauld,
here is a command line I use for an embedded target.
avr-gm2 -mmcu=atmega8 -g -Os -fno-exceptions -O2 flashled.mod \
-flibs=min -o flashled.elf
However I suspect the reason for the __gxx_personality_v0 is that the
libraries have been built without the -fno-exceptions option.
I'll rerelease gm2 with minlibs built in this way (for a native gm2).
This is a trivial rebuild.
However a better solution will probably require a little more thought to
allow core functionality (basic string, input output libraries to be
built without exceptions).
regards,
Gaius