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

Have a question about our Software Developer Kit? Ask them here.

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

Postby softwarefailure » Sun Apr 19, 2015 12:14 am

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?
softwarefailure
 
Posts: 64
Joined: Fri Feb 14, 2014 11:29 pm

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

Postby xenic » Sun Apr 19, 2015 7:36 pm

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
xenic
 
Posts: 1047
Joined: Sun Jun 19, 2011 1:06 am

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

Postby broadblues » Sun Apr 19, 2015 10:35 pm

@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?
User avatar
broadblues
AmigaOS Core Developer
AmigaOS Core Developer
 
Posts: 478
Joined: Sat Jun 18, 2011 3:40 am
Location: Portsmouth, UK

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

Postby softwarefailure » Sun Apr 19, 2015 10:47 pm

@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.
softwarefailure
 
Posts: 64
Joined: Fri Feb 14, 2014 11:29 pm

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

Postby broadblues » Sun Apr 19, 2015 11:14 pm

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.
User avatar
broadblues
AmigaOS Core Developer
AmigaOS Core Developer
 
Posts: 478
Joined: Sat Jun 18, 2011 3:40 am
Location: Portsmouth, UK

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

Postby softwarefailure » Sun Apr 19, 2015 11:36 pm

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.
softwarefailure
 
Posts: 64
Joined: Fri Feb 14, 2014 11:29 pm

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

Postby thomasrapp » Mon Apr 20, 2015 12:30 pm

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
thomasrapp
 
Posts: 241
Joined: Sun Jun 19, 2011 12:22 am

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

Postby broadblues » Mon Apr 20, 2015 5:09 pm

@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...
User avatar
broadblues
AmigaOS Core Developer
AmigaOS Core Developer
 
Posts: 478
Joined: Sat Jun 18, 2011 3:40 am
Location: Portsmouth, UK


Return to SDK Support

Who is online

Users browsing this forum: No registered users and 2 guests