[adtools] Re: changes to make the gcc buildsystem make shares objects automatically

  • From: "Henning Nielsen Lund" <hnl_dk@xxxxxxxxxx>
  • To: adtools@xxxxxxxxxxxxx
  • Date: Fri, 20 Jun 2008 00:27:33 +0200 (CEST)

> Hallo Jörg,
>
> Am Thu, 19 Jun 2008 20:26:42 +0200 schrieb Jörg Strohmayer folgendes:
>
> [...]
>>> Have you please any instruction how exactly you did that? perhaps a
>>> step-by-step explaination?
>>
>> IIRC there is only one source file which has to be compiled for each
>> function with different defines (gcc -DL_negdi2 -fPIC -O3 -c libgcc2.c
>> ..., gcc -DL_addvsi3 -fPIC -O3 -c libgcc2.c ..., etc.), to link
>> libgcc.so you have to use "gcc -shared -olibgcc.so {object files}".
>> Maybe you have to link it with -nostdlib -lc to make sure libgcc.so
>> doesn't need libgcc.so ;-)
>
> Ah, I see.
>
>>> Well, but the libgcc.so and libgcc_s.so is substantly different.
>>
>> I have no idea what you have built, but the Linux libgcc_s.so.1 is
>> identical to the AmigaOS4 libgcc.so, except for the name, that it
>> depends on glibc instead of newlib and that the Linux one is from a
>> GCC 4.3.x:
>> # nm -D /lib/libgcc_s.so.1 | grep __
>> 00002a80 T __absvdi2
>> 00002a70 T __absvsi2
>> 00007d40 T __adddf3
>> 00008700 T __addsf3
>> 00002b30 T __addvdi3
>> [...]
>> 00006bd0 T __udivdi3
>> 000074f0 T __udivmoddi4
>> 00007060 T __umoddi3
>> 0000c860 T __unorddf2
>> 0000c8f0 T __unordsf2
>
> Oh yes, you are right. I just checked the libgcc_s.so.1 I have on Linux
> here
> and it is indeed not only significant larger (96kb vs. 3kb) but also shows
> more functions when analysed with "nm -D". So there must really must be
> something wrong with how we currently build the libgcc_s.so for our
> ppc-amigaos target.
>
> Henning, do you have any idea why our libgcc_s.so only contains 2 main
> functions like __shlib_call_XXXXX while the linux version and every other
> libgcc_s.so contains a lot more functions like Jörg has pointed out?

As there has not been set any defines... please unpack and try the
attached gcc/gcc/config/t-amigaos file instead of the original one.

-- 
best regards,
hnl_dk - Henning Nielsen Lund

µA1-C (IBM PowerPC 750 FX V2.2 @ 800MHz), 256MB RAM, NEC ND-3500A DVD/CD
RW, Samsung SP1604N 160GB PATA Harddisk drive, Acer AL1721 17" TFT,
modified Tyan M2042 1->3 PCI Riser...

Other related posts: