bebbo / amiga-gcc

The GNU C-Compiler with Binutils and other useful tools for cross development for Amiga
GNU General Public License v2.0
312 stars 66 forks source link

Binaries build with 13.1.1 not executable #343

Closed isoriano1968 closed 1 year ago

isoriano1968 commented 1 year ago

Hi,

did some testing using the Docker Crosstools (https://github.com/AmigaPorts/docker-amiga-gcc) from AmigaPorts with your 6.5 and 13.1.1 AMIGA gcc-cc using the P96Developer Examples.

While the 6.5b executables run as expected the 13.1.1 binaries thow an error.

No magic used when compiling: gcc test.c -o test

gcc

bebbo commented 1 year ago

please check the version of the linker, current is:

GNU ld (GNU Binutils) 2.39.0.230505-185525
jeffv03 commented 1 year ago

Hello :)

Le 13/05/2023 à 07:30, isoriano1968 a écrit :

Hi,

did some testing using the Docker Crosstools (https://github.com/AmigaPorts/docker-amiga-gcc) from AmigaPorts with your 6.5 and 13.1.1 AMIGA gcc-cc using the P96Developer Examples.

While the 6.5b executables run as expected the 13.1.1 binaries thow an error.

No magic used when compiling: gcc test.c -o test

hum, perhaps the 13.1.1 haven't set the right protection bits on the file when saving the exe just created ? did you've check it ?

Jeff

isoriano1968 commented 1 year ago

Hi Jeff,

attributes "rwed" were not set on both executables .. but made no difference to the execution. Added rwed to both no change in the execution of the failing one.

isoriano1968 commented 1 year ago

please check the version of the linker, current is:

GNU ld (GNU Binutils) 2.39.0.230505-185525

Can confirm the same version for ld.

Screenshot from 2023-05-13 11-01-43

MBeijer commented 1 year ago

@isoriano1968 with gcc 13.1, have you tried explicitly defining -mcrt=nix20?

isoriano1968 commented 1 year ago

@isoriano1968 with gcc 13.1, have you tried explicitly defining -mcrt=nix20?

Mate, that did it! Works now.

MBeijer commented 1 year ago

Which means something with newlib is broken then? or default crt is different on gcc 13.1?

bebbo commented 1 year ago

no idea how recent that docker thing is. sorry.

MBeijer commented 1 year ago

It's super recent, I built a new version yesterday...

bebbo commented 1 year ago

There's always a next version.

MBeijer commented 1 year ago

I mean, I update the amigadev/crosstools docker image regularly, especially now when 13.1 is in development.

bebbo commented 1 year ago

and I mean, that it is time to update the docker image.

MBeijer commented 1 year ago
#9 683.2 /root/projects/newlib-cygwin/newlib/libc/sys/amigaos/crt0.c:90:1: error: expected identifier or '(' before 'asm'
#9 683.2    90 | asm("___exit: .globl ___exit");
#9 683.2       | ^~~
#9 683.2 /root/projects/newlib-cygwin/newlib/libc/sys/amigaos/crt0.c: In function '__openliberror':
#9 683.2 /root/projects/newlib-cygwin/newlib/libc/sys/amigaos/crt0.c:153:1: warning: 'noreturn' function does return
#9 683.2   153 | }
#9 683.2       | ^
#9 683.2 make[8]: *** [Makefile:294: crt0.o] Error 1
#9 683.2 make newlib...failed
bebbo commented 1 year ago

dang - baserel^^ rinse and repeat pls.

isoriano1968 commented 1 year ago

ei ei ei .. the "won't fix" label still accurate? :-)

bebbo commented 1 year ago

ei ei ei .. the "won't fix" label still accurate? :-)

I can't fix your docker image.

MBeijer commented 1 year ago

dang - baserel^^ rinse and repeat pls.

build problem fixed

bebbo commented 1 year ago

If you are still unable to make it work, what about providing some information, like

isoriano1968 commented 1 year ago

Thx!

I am using:

It is not that it does not work at all! The difference is that with your 6.5 build I did not have to specify neither -mcrt=xxxx nor -noixemul to have a working binary. If I do specify one the above mentioned options with your 13.1.1 build the binary works as well.

bebbo commented 1 year ago

That's not how it works, since that Picasso stuff does not compile out of the box and what I get to compile does work. Also that docker image seems to work, the tested files were identical.

Please provide a preprocessed file using -E of a file that does not work for you.