English Amiga Board


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

 
 
Thread Tools
Old 11 April 2023, 11:43   #1461
bebbo
bye
 
Join Date: Jun 2016
Location: Some / Where
Posts: 681
Quote:
Originally Posted by Nightfox View Post
That was left over from the project from the Amiga C vscode extension. What do I need to change about it to fix it for this tool chain?

try this:

Code:
LDFLAGS = -Wl,-Map=$(OUT).map
bebbo is offline  
Old 13 April 2023, 04:49   #1462
Nightfox
Registered User
 
Nightfox's Avatar
 
Join Date: Apr 2016
Location: Perth, Australia
Posts: 409
Thanks that works!
Nightfox is offline  
Old 26 April 2023, 16:06   #1463
bebbo
bye
 
Join Date: Jun 2016
Location: Some / Where
Posts: 681
I just added the branch `amiga13.1` to my gcc repo. For those who want to test it...

=> switch the gcc repo to that branch, use a different prefix and try it out.

Code:
git clone https://github.com/bebbo/amiga-gcc
cd amiga-gcc
sudo mkdir /opt/amiga
sudo chown username /opt/amiga
make update-gcc
pushd project/gcc
git fetch origin amiga13.1:amiga13.1 --depth=10
git checkout amiga13.1
popd
make clean
make min -j28

Last edited by bebbo; 26 April 2023 at 18:08.
bebbo is offline  
Old 26 April 2023, 16:50   #1464
Marlon_
AmigaDev.com
 
Marlon_'s Avatar
 
Join Date: Mar 2016
Location: Stockholm, Sweden
Age: 35
Posts: 625
Quote:
Originally Posted by bebbo View Post
I just added the branch `amiga13.1` to my gcc repo. For those who want to test it...

=> switch the gcc repo to that branch, use a different prefix and try it out.
Will try it!
Marlon_ is offline  
Old 26 April 2023, 17:05   #1465
Marlon_
AmigaDev.com
 
Marlon_'s Avatar
 
Join Date: Mar 2016
Location: Stockholm, Sweden
Age: 35
Posts: 625
Code:
make libnix...failed
/root/projects/libnix/sources/socket/socket/sendmsg.c
/root/projects/libnix/sources/socket/socket/send.c
/root/projects/libnix/sources/socket/socket/sendto.c
/root/projects/libnix/sources/socket/socket/recfrom.c
/root/projects/libnix/sources/socket/socket/addrinfo.c
/root/projects/libnix/sources/socket/socket/shutdown.c
/root/projects/libnix/sources/socket/socket/recv.c
/root/projects/libnix/sources/socket/socket/connect.c
/root/projects/libnix/sources/socket/socket/socket.c
/root/projects/libnix/sources/socket/socket/getsockopt.c
/root/projects/libnix/sources/socket/socket/getpeername.c
/root/projects/libnix/sources/socket/socket/socketpair.c
/root/projects/libnix/sources/socket/socket/setsockopt.c
/root/projects/libnix/sources/socket/socket/getsockname.c
/root/projects/libnix/sources/socket/unistd/gethostname.c
/root/projects/libnix/sources/socket/unistd/getdomainname.c
/root/projects/libnix/sources/socket/unistd/crypt.c
/root/projects/libnix/sources/socket/unistd/select.c
/root/projects/libnix/sources/socket/unistd/getpwent.c
/root/projects/libnix/sources/socket/unistd/__inituser.c
/root/projects/libnix/sources/socket/unistd/gethostid.c
/root/projects/libnix/sources/socket/unistd/getgrent.c
In file included from /opt/m68k-amigaos-gcc10/m68k-amigaos/ndk-include/proto/bsdsocket.h:74,
                 from /root/projects/libnix/sources/socket/socket/addrinfo.c:2:
/root/projects/libnix/sources/socket/socket/addrinfo.c: In function '__freeaddrinfo':
/root/projects/libnix/sources/socket/socket/addrinfo.c:6:9: error: 'asm' specifier for variable '__freeaddrinfo_ai' conflicts with 'asm' clobber list
    6 |         freeaddrinfo(ai);
Marlon_ is offline  
Old 26 April 2023, 17:12   #1466
bebbo
bye
 
Join Date: Jun 2016
Location: Some / Where
Posts: 681
Quote:
Originally Posted by Marlon_ View Post
Code:
make libnix...failed
/root/projects/libnix/sources/socket/socket/sendmsg.c
/root/projects/libnix/sources/socket/socket/send.c
/root/projects/libnix/sources/socket/socket/sendto.c
/root/projects/libnix/sources/socket/socket/recfrom.c
/root/projects/libnix/sources/socket/socket/addrinfo.c
/root/projects/libnix/sources/socket/socket/shutdown.c
/root/projects/libnix/sources/socket/socket/recv.c
/root/projects/libnix/sources/socket/socket/connect.c
/root/projects/libnix/sources/socket/socket/socket.c
/root/projects/libnix/sources/socket/socket/getsockopt.c
/root/projects/libnix/sources/socket/socket/getpeername.c
/root/projects/libnix/sources/socket/socket/socketpair.c
/root/projects/libnix/sources/socket/socket/setsockopt.c
/root/projects/libnix/sources/socket/socket/getsockname.c
/root/projects/libnix/sources/socket/unistd/gethostname.c
/root/projects/libnix/sources/socket/unistd/getdomainname.c
/root/projects/libnix/sources/socket/unistd/crypt.c
/root/projects/libnix/sources/socket/unistd/select.c
/root/projects/libnix/sources/socket/unistd/getpwent.c
/root/projects/libnix/sources/socket/unistd/__inituser.c
/root/projects/libnix/sources/socket/unistd/gethostid.c
/root/projects/libnix/sources/socket/unistd/getgrent.c
In file included from /opt/m68k-amigaos-gcc10/m68k-amigaos/ndk-include/proto/bsdsocket.h:74,
                 from /root/projects/libnix/sources/socket/socket/addrinfo.c:2:
/root/projects/libnix/sources/socket/socket/addrinfo.c: In function '__freeaddrinfo':
/root/projects/libnix/sources/socket/socket/addrinfo.c:6:9: error: 'asm' specifier for variable '__freeaddrinfo_ai' conflicts with 'asm' clobber list
    6 |         freeaddrinfo(ai);

What NDK are you using? I used NDK3.2 since NDK3.9 is no longer available...

... looking into it too
bebbo is offline  
Old 26 April 2023, 18:08   #1467
alkis
Registered User
 
Join Date: Dec 2010
Location: Athens/Greece
Age: 53
Posts: 725
Quote:
Originally Posted by bebbo View Post
I just added the branch `amiga13.1` to my gcc repo. For those who want to test it...

=> switch the gcc repo to that branch, use a different prefix and try it out.
You mean like that?

Code:
make branch branch=amiga13.1 mod=gcc
or something else?
alkis is offline  
Old 26 April 2023, 18:09   #1468
bebbo
bye
 
Join Date: Jun 2016
Location: Some / Where
Posts: 681
Quote:
Originally Posted by alkis View Post
You mean like that?

Code:
make branch branch=amiga13.1 mod=gcc
or something else?

that should work too.
Or do it the hard way...
bebbo is offline  
Old 26 April 2023, 21:11   #1469
Marlon_
AmigaDev.com
 
Marlon_'s Avatar
 
Join Date: Mar 2016
Location: Stockholm, Sweden
Age: 35
Posts: 625
Quote:
Originally Posted by bebbo View Post
What NDK are you using? I used NDK3.2 since NDK3.9 is no longer available...

... looking into it too
It's the 3.9 NDK, same as it was on haage and partner, just on a new mirror. I had too many issues with 3.2 NDK, which is the reason why I kept using 3.9

EDIT:
For what it's worth, I use the 3.9 NDK for amiga6 gcc branch too without issue.

Last edited by Marlon_; 26 April 2023 at 21:18.
Marlon_ is offline  
Old 26 April 2023, 21:27   #1470
Marlon_
AmigaDev.com
 
Marlon_'s Avatar
 
Join Date: Mar 2016
Location: Stockholm, Sweden
Age: 35
Posts: 625
You can always trust web.archive.org:
https://web.archive.org/web/20221205...gaOS/NDK39.lha

Also, alinea now hosts the 3.9 NDK. BSzili even has a PR for you: https://github.com/bebbo/amiga-gcc/pull/339

Last edited by Marlon_; 26 April 2023 at 21:37.
Marlon_ is offline  
Old 26 April 2023, 21:31   #1471
Marlon_
AmigaDev.com
 
Marlon_'s Avatar
 
Join Date: Mar 2016
Location: Stockholm, Sweden
Age: 35
Posts: 625
Quote:
Originally Posted by bebbo View Post
What NDK are you using? I used NDK3.2 since NDK3.9 is no longer available...

... looking into it too
I tried compiling again, and now libnix does not throw an error, but instead libgcc:
Code:
/root/build-Linux-m68k-amigaos/gcc/./gcc/xgcc -B/root/build-Linux-m68k-amigaos/gcc/./gcc/ -B/opt/m68k-amigaos-gcc10/m68k-amigaos/bin/ -B/opt/m68k-amigaos-gcc10/m68k-amigaos/lib/ -isystem /opt/m68k-amigaos-gcc10/m68k-amigaos/include -isystem /opt/m68k-amigaos-gcc10/m68k-amigaos/ndk-include -isystem /opt/m68k-amigaos-gcc10/m68k-amigaos/sys-include    -O2 -fomit-frame-pointer -fbaserel -c /root/projects/gcc/libgcc/config/m68k/new_op.c 
/opt/m68k-amigaos-gcc10/m68k-amigaos/bin/ranlib libgcc.a
/opt/m68k-amigaos-gcc10/m68k-amigaos/bin/ranlib: libgcc.a: file in wrong format
make[2]: *** [Makefile:943: libgcc.a] Error 1
make libgcc...failed
Marlon_ is offline  
Old 26 April 2023, 21:31   #1472
alkis
Registered User
 
Join Date: Dec 2010
Location: Athens/Greece
Age: 53
Posts: 725
libnix fails with
Code:
/home/alex/t/amiga-gcc13.1/projects/libnix/sources/socket/socket/addrinfo.c:6:9: error: 'asm' specifier for variable '__freeaddrinfo_ai' conflicts with 'asm' clobber list
    6 |         freeaddrinfo(ai);
      |         ^~~~~~~~~~~~
alkis is offline  
Old 27 April 2023, 10:47   #1473
bebbo
bye
 
Join Date: Jun 2016
Location: Some / Where
Posts: 681
I added some fixes and `make all` completed succesfully on a new ubuntu VM.
The easiest way to build from scratch is:
Code:
sudo mkdir -p /opt/amiga
sudo chown $USER /opt/amiga
git clone https://github.com/bebbo/amiga-gcc
cd amiga-gcc
make branch branch=amiga13.1 mod=gcc
make all -j20
Existing installations should use
Code:
git pull
make update
make clean
make branch branch=amiga13.1 mod=gcc
make all -j20
if `make update` fails remove the failing module folder in projects and retry.
bebbo is offline  
Old 27 April 2023, 11:56   #1474
Marlon_
AmigaDev.com
 
Marlon_'s Avatar
 
Join Date: Mar 2016
Location: Stockholm, Sweden
Age: 35
Posts: 625
Quote:
Originally Posted by bebbo View Post
I added some fixes and `make all` completed succesfully on a new ubuntu VM.
The easiest way to build from scratch is:
Code:
sudo mkdir -p /opt/amiga
sudo chown $USER /opt/amiga
git clone https://github.com/bebbo/amiga-gcc
cd amiga-gcc
make branch branch=amiga13.1 mod=gcc
make all -j20
Existing installations should use
Code:
git pull
make update
make clean
make branch branch=amiga13.1 mod=gcc
make all -j20
if `make update` fails remove the failing module folder in projects and retry.
I always start with a clean build within docker just to make sure everything is as it should be.

Code:
#9 1907.2 build/mui/libmui.c: In function 'MUI_Offset':
#9 1907.2 build/mui/libmui.c:494:3: error: 'asm' specifier for variable 'obj' conflicts with 'asm' clobber list
#9 1907.2   494 |   __asm volatile ("jsr a6@(-234:W)"
#9 1907.2       |   ^~~~~
#9 1907.2 build/mui/libmui.c:494:3: error: 'asm' specifier for variable 'y' conflicts with 'asm' clobber list
#9 1907.2 sdk mui...failed
Marlon_ is offline  
Old 27 April 2023, 12:27   #1475
bebbo
bye
 
Join Date: Jun 2016
Location: Some / Where
Posts: 681
Quote:
Originally Posted by Marlon_ View Post
I always start with a clean build within docker just to make sure everything is as it should be.

Code:
#9 1907.2 build/mui/libmui.c: In function 'MUI_Offset':
#9 1907.2 build/mui/libmui.c:494:3: error: 'asm' specifier for variable 'obj' conflicts with 'asm' clobber list
#9 1907.2   494 |   __asm volatile ("jsr a6@(-234:W)"
#9 1907.2       |   ^~~~~
#9 1907.2 build/mui/libmui.c:494:3: error: 'asm' specifier for variable 'y' conflicts with 'asm' clobber list
#9 1907.2 sdk mui...failed

... dang - all that wrong asm stuff...
bebbo is offline  
Old 27 April 2023, 13:03   #1476
bebbo
bye
 
Join Date: Jun 2016
Location: Some / Where
Posts: 681
Quote:
Originally Posted by bebbo View Post
... dang - all that wrong asm stuff...

added a patch for the mui sdk.
bebbo is offline  
Old 27 April 2023, 13:07   #1477
Marlon_
AmigaDev.com
 
Marlon_'s Avatar
 
Join Date: Mar 2016
Location: Stockholm, Sweden
Age: 35
Posts: 625
Quote:
Originally Posted by bebbo View Post
added a patch for the mui sdk.
Neat! Will give it a go again and report back!
Marlon_ is offline  
Old 27 April 2023, 13:48   #1478
Marlon_
AmigaDev.com
 
Marlon_'s Avatar
 
Join Date: Mar 2016
Location: Stockholm, Sweden
Age: 35
Posts: 625
Toolchain builds successfully with GCC 13.1 branch now. Now to test building some projects and see how that works out!
Marlon_ is offline  
Old 27 April 2023, 16:18   #1479
bebbo
bye
 
Join Date: Jun 2016
Location: Some / Where
Posts: 681
Quote:
Originally Posted by bebbo View Post
added a patch for the mui sdk.

now sfdc got fixed, and the recent mui patch got removed.


sfdc no longer adds registers of asm variables to the clobber list of the library call.
bebbo is offline  
Old 27 April 2023, 16:39   #1480
bebbo
bye
 
Join Date: Jun 2016
Location: Some / Where
Posts: 681
and: m68k-amigaos-gdb does not yet work with gcc-13.1 since it's a new debug format - same as in elf.
bebbo 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
New GCC based dev toolchain for AmigaOS 3.x cla Coders. Releases 8 24 December 2017 10:18
Issue with photon/xxxx WinUAE Toolchain arpz Coders. Asm / Hardware 2 26 September 2015 22:33
New 68k gcc toolchain arti Coders. C/C++ 17 31 July 2015 03:59
Hannibal's WinUAE Demo Toolchain 5 Bobic Amiga scene 1 23 July 2015 21:04
From gcc to vbcc. Cowcat Coders. General 9 06 June 2014 14: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 09:05.

Top

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