default cflags to compile

Nuno Lopes ncpl@mega.ist.utl.pt
Mon Dec 12 19:58:00 GMT 2005


> On Mon, 12 Dec 2005, Nuno Lopes gibbered uncontrollably:
>>>> I need to generate a gcc binary that will always enable the
>>>> -fabi-version=1, because I have a library built with gcc 3.3 and I
>>>> need to link with it, but I would like to use gcc 4.
>>>
>>> The libstdc++ ABI broke between these releases, so unless your library
>>> doesn't use libstdc++ at all (somewhat unlikely), there is little point
>>> to this.q
>>
>> The problem is that we are using a closed-source library from Sony
>> (for their robots AIBO, which run on a MIPS) and they don't support
>> anything other than gcc 3.3.
>
> You're in trouble then.
>
>> If the library uses libstdc++, does it help if I compile it with
>> -fabi-version?
>
> Only if you *never* pass any objects manipulated by that old libstdc++
> to the newer version of libstdc++, or vice versa. This is likely to be
> hard to ensure.
>
> Probably the only maintainable way to do this would be to build a
> subprocess (using that closed-source library) with the old GCC and have
> it talk to the new one via some IPC mechanism. If this is an embedded
> environment this is probably impractical, and your best option is
> probably to stick with GCC 3.3.

Yes, this is an embeded system, and we cannot create processes or threads. 
Only Sony's mini OS can lauch new threads/processes.
I think we only pass integers, floats and chars* to sony's library, so I 
hope it will work... I'll try it tomorrow, and I'll let you know.


> (Why do you need to upgrade anyway?)

because gcc 3.3 doesn't support some c++ features that gcc 3.4 support. I'm 
also looking for increased performance. We can't waste cpu cicles.


> (This really belongs on gcc-help@, not gcc@. Moved accordingly.)

ok, sorry.

Thanks,
Nuno 



More information about the Gcc-help mailing list