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

Have a question about our Software Developer Kit? Ask them here.
Post Reply
softwarefailure
Posts: 103
Joined: Fri Feb 14, 2014 10:29 pm

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

Post 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?

xenic
Posts: 1165
Joined: Sun Jun 19, 2011 12:06 am

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

Post 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.
AmigaOne X1000 with 2GB memory - OS4.1 FE

User avatar
broadblues
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 591
Joined: Sat Jun 18, 2011 2:40 am
Location: Portsmouth, UK
Contact:

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

Post 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?

softwarefailure
Posts: 103
Joined: Fri Feb 14, 2014 10:29 pm

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

Post 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.

User avatar
broadblues
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 591
Joined: Sat Jun 18, 2011 2:40 am
Location: Portsmouth, UK
Contact:

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

Post 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.

softwarefailure
Posts: 103
Joined: Fri Feb 14, 2014 10:29 pm

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

Post 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.

User avatar
thomasrapp
Posts: 286
Joined: Sat Jun 18, 2011 11:22 pm

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

Post 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.

User avatar
broadblues
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 591
Joined: Sat Jun 18, 2011 2:40 am
Location: Portsmouth, UK
Contact:

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

Post 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...

Post Reply