English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Language > Coders. C/C++

 
 
Thread Tools
Old 20 April 2020, 15:19   #1
TomSoniq
Registered User
 
Join Date: Feb 2019
Location: Hannover / Germany
Posts: 22
GCC 3.4.0 and soft-float

Hi all,


I'm using gcc 3.4.0 as part of the good old amidevcpp package to cross-compile 68k code under MS Windows.


I've been trying to build non-FPU code but so far without success.


Here's my very small test program:
Code:
int main(void) {
    float a,b,c;
    a=4;
    b=2.5;
    c=a/b;
    return 0;
}
When I compile this using
Code:
m68k-amigaos-gcc -noixemul -msoft-float -o FloatTest FloatTest.c
then I instantly get the infamous #8000000B software failure on a non-FPU-system. Even adding -m68000 doesn't help.


Am I doing something wrong? Does this build of GCC support compiling code for FPU emulation at all?


Here's its version info:
Code:
Reading specs from /usr/bin/../lib/gcc/m68k-amigaos/3.4.0/specs
Configured with: ../gcc-3.4.0/configure --prefix=/usr/local/amiga --target=m68k-amigaos --enable-languages=c,c++,objc --enable-haifa --enable-sjlj-exceptions --disable-shared --disable-libstdcxx-pch
Thread model: single
gcc version 3.4.0
Any help appreciated.
Thanks,
Tom
TomSoniq is offline  
Old 20 April 2020, 16:23   #2
jotd
This cat is no more
 
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,164
can't you switch to Bebbo's gcc 6 ? it's supported and works good. And I'm pretty sure that it supports floating point AND amidevcpp as well. Plus it's cygwin-free and cygin is crap so all for the best.

http://eab.abime.net/showthread.php?t=85474&page=52

Last edited by jotd; 20 April 2020 at 18:14.
jotd is offline  
Old 20 April 2020, 17:09   #3
jeff b00toNic
Registered User
 
jeff b00toNic's Avatar
 
Join Date: Nov 2011
Location: Arnsberg Germany
Age: 45
Posts: 193
Well, I was able to compile your code on GCC 3.4.0 emulated in WinUAE
without guru, so it could be that very build.

As jotd already suggested Bebbo's gcc is very good!
jeff b00toNic is offline  
Old 21 April 2020, 18:57   #4
TomSoniq
Registered User
 
Join Date: Feb 2019
Location: Hannover / Germany
Posts: 22
Wow thanks! This looks very promising. I gave it a quick try. At the moment I get MuForce hits whenever I fopen() a file and then fseek() in it or rewind() it. I still need to figure out why. Whether it's a bug in the supplied link libraries or something I'm doing wrong.
I also need to find out why my test, when clearly compiled for mathieeesingbas.library, still crashes on my non-FPU WinUAE setup.
TomSoniq is offline  
Old 22 April 2020, 10:36   #5
TomSoniq
Registered User
 
Join Date: Feb 2019
Location: Hannover / Germany
Posts: 22
Ah, great, someone else noticed the lseek() bug as well, reported it, and it got fixed immediately!
https://github.com/bebbo/amiga-gcc/issues/152
Phantastic. Now switching the AmigaAMP3 68k build to gcc 6.5
TomSoniq is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
gcc .lib mritter0 Coders. C/C++ 13 27 October 2018 02:13
GCC problems Minuous Coders. C/C++ 3 08 September 2016 16:16
gcc linker mritter0 Coders. C/C++ 3 21 December 2014 16:54
From gcc to vbcc. Cowcat Coders. General 9 06 June 2014 14:45
GCC and GCCFindHit tygre Coders. Language 2 20 February 2012 16:45

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 19:26.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.13499 seconds with 13 queries