Page 1 of 1

Where's libgcc for -mcrt=clib2-ts?

Posted: Sat Apr 18, 2015 11:14 pm
by softwarefailure
I just updated to OS4 FE and SDK 53.24, tried to compile a simple C program using

Code: Select all

gcc -mcrt=clib2-ts helloworld.c
but it doesn't link because ld can't find libgcc.a. SnoopDOS log shows it's looking for libgcc.a all over the place but it's just not there. Using -mcrt=clib2 works fine but I need the thread-safe variant of clib2.

How to fix this?

Re: Where's libgcc for -mcrt=clib2-ts?

Posted: Sun Apr 19, 2015 6:36 pm
by xenic
softwarefailure wrote:I just updated to OS4 FE and SDK 53.24, tried to compile a simple C program using

gcc -mcrt=clib2-ts helloworld.c

but it doesn't link because ld can't find libgcc.a. SnoopDOS log shows it's looking for libgcc.a all over the place but it's just not there. Using -mcrt=clib2 works fine but I need the thread-safe variant of clib2.
How to fix this?
It works with my SDK 53.24 which was installed long ago but when I did a fresh install it didn't work for me either. In "SDK:gcc/lib/gcc/ppc-amigaos/4.2.4/" my SDK has a link from "clib2-ts" to "clib" in the same directory. I don't know how or when that link was put in my SDK but compiling with -mcrt=clib2-ts works because of the link.

Re: Where's libgcc for -mcrt=clib2-ts?

Posted: Sun Apr 19, 2015 9:35 pm
by broadblues
@xenic

You kost likely made that link yourself same as I did for the old perl port.

@softwarefailure

why do you need clib2-ts?

Why not use newlib?

Re: Where's libgcc for -mcrt=clib2-ts?

Posted: Sun Apr 19, 2015 9:47 pm
by softwarefailure
@broadblues: Let's not turn this into another newlib vs clib debate... I've had enough of those already on the internal OS4 developer mailing lists. I need to use clib2-ts. Full stop. Is this officially unsupported now or what is the current state? Then I'd have to revert to an older SDK.

Re: Where's libgcc for -mcrt=clib2-ts?

Posted: Sun Apr 19, 2015 10:14 pm
by broadblues
Let's not turn this into another newlib vs clib debate...
Not at all, use whichever you like, but if you were to have answeded because I need access to the AmigaDOS file handles (which was always my reason to sticking to clib2 for a couple of prohects) , I would simply have pointed out that that is available in newlib now.
Is this officially unsupported now or what is the current state? Then I'd have to revert to an older SDK.
I think it's just a small glitch in the SDK fix as we mentioned above by copying the file over or making a link. I never had any issues with clib2-ts and that link.

Re: Where's libgcc for -mcrt=clib2-ts?

Posted: Sun Apr 19, 2015 10:36 pm
by softwarefailure
broadblues wrote: Not at all, use whichever you like, but if you were to have answeded because I need access to the AmigaDOS file handles (which was always my reason to sticking to clib2 for a couple of prohects) , I would simply have pointed out that that is available in newlib now.
Here's why: http://www.hollywood-mal.com/docs/html/ ... lib2_.html
I think it's just a small glitch in the SDK fix as we mentioned above by copying the file over or making a link. I never had any issues with clib2-ts and that link.
Thanks, it's working now.

Re: Where's libgcc for -mcrt=clib2-ts?

Posted: Mon Apr 20, 2015 11:30 am
by thomasrapp
Is libgcc thread safe? Copying or linking a non-thead safe version to the thread safe directory does not make it thread safe by magic.

Re: Where's libgcc for -mcrt=clib2-ts?

Posted: Mon Apr 20, 2015 4:09 pm
by broadblues
@Thomaswrap

In earlier SDKs the libgcc.a was indentical, and I never had any crashes resulting from using clib2-ts that I could blame of threading...