English Amiga Board


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

 
 
Thread Tools
Old 02 December 2017, 03:05   #521
fstltna
Indie Game Dev
 
fstltna's Avatar
 
Join Date: May 2017
Location: South San Francisco, US
Age: 56
Posts: 227
Send a message via AIM to fstltna Send a message via Yahoo to fstltna
Quote:
Originally Posted by bebbo View Post
which version did you pick?
I haven't, still not working...
fstltna is offline  
Old 20 December 2017, 00:15   #522
emufan
Registered User
 
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
I may have found a solution to prevent the freeze feature when using 'make -jN' under cygwin.
same with building gcc6 using "--threads N".
Code:
export SHELL=CMD
I put that into my ~/.bashrc - otherwise I would forget about that sooner or later.
for now it does work.

#1) btw. I build SDL_image with gcc6 "-noixemul -m68020-40 -msoft-float -g -O2"
this does crash the gcc3 linker --> when building without "-O2" - the lib does link without problem.

Last edited by emufan; 20 December 2017 at 00:43.
emufan is offline  
Old 20 December 2017, 01:17   #523
Marlon_
AmigaDev.com
 
Marlon_'s Avatar
 
Join Date: Mar 2016
Location: Stockholm, Sweden
Age: 35
Posts: 625
Quote:
Originally Posted by emufan View Post
I may have found a solution to prevent the freeze feature when using 'make -jN' under cygwin.
same with building gcc6 using "--threads N".
Code:
export SHELL=CMD
I put that into my ~/.bashrc - otherwise I would forget about that sooner or later.
for now it does work.

#1) btw. I build SDL_image with gcc6 "-noixemul -m68020-40 -msoft-float -g -O2"
this does crash the gcc3 linker --> when building without "-O2" - the lib does link without problem.
When you're compiling libSDL-1.2.15 from github, which Makefile are you using? Because Makefile.bax is the only one enabling the Vampire exclusive instructions.
Marlon_ is offline  
Old 20 December 2017, 01:26   #524
emufan
Registered User
 
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
Quote:
Originally Posted by Marlon_ View Post
When you're compiling libSDL-1.2.15 from github, which Makefile are you using? Because Makefile.bax is the only one enabling the Vampire exclusive instructions.
I was using the default Makefile and did some editing, until it fit, see the attached one.

Last edited by emufan; 20 December 2017 at 01:38.
emufan is offline  
Old 20 December 2017, 01:30   #525
Marlon_
AmigaDev.com
 
Marlon_'s Avatar
 
Join Date: Mar 2016
Location: Stockholm, Sweden
Age: 35
Posts: 625
Quote:
Originally Posted by emufan View Post
I was using the default Makefile and did some editing, until it fit, see the attached one.
Ah, well, then none of your ports are actually getting any AMMX benefits on Vampire systems. Just fyi. Use the bax makefile like the readme says on the github page in order to get Vamp support.
Marlon_ is offline  
Old 20 December 2017, 01:39   #526
emufan
Registered User
 
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
Quote:
Originally Posted by Marlon_ View Post
Ah, well, then none of your ports are actually getting any AMMX benefits on Vampire systems. Just fyi. Use the bax makefile like the readme says on the github page in order to get Vamp support.
ok, thnx for info. I'll build a *.bax one now.
does it retain compatibility to non-AMMX machines?

Code:
video/amigaos/SDL_cgxvideo.c:34:23: error: expected identifier or
‘(’ before numeric constant
 #define Apollo_AMMXon 0
                       ^
./video/apollo/apolloammxenable.h:24:22: note: in expansion of macro ‘Apollo_AMMXon’
 extern unsigned char Apollo_AMMXon;
                      ^~~~~~~~~~~~~


video/amigaos/SDL_cgxvideo.c:
34: #define Apollo_AMMXon 0
35:
36: #include "SDL_config.h"
any idea?

Last edited by emufan; 20 December 2017 at 01:45.
emufan is offline  
Old 20 December 2017, 01:41   #527
Marlon_
AmigaDev.com
 
Marlon_'s Avatar
 
Join Date: Mar 2016
Location: Stockholm, Sweden
Age: 35
Posts: 625
Yes, the AMMX asm-files checks which CPU it is and uses the appropriate instructions depending on CPU. Makefile.bax uses VASM to compile these files before including them in the gcc6 linker.
Marlon_ is offline  
Old 20 December 2017, 01:50   #528
emufan
Registered User
 
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
Quote:
Originally Posted by Marlon_ View Post
Yes, the AMMX asm-files checks which CPU it is and uses the appropriate instructions depending on CPU. Makefile.bax uses VASM to compile these files before including them in the gcc6 linker.
ok, good news. any idea about the error I added above? using gcc6.
emufan is offline  
Old 20 December 2017, 02:11   #529
Marlon_
AmigaDev.com
 
Marlon_'s Avatar
 
Join Date: Mar 2016
Location: Stockholm, Sweden
Age: 35
Posts: 625
Quote:
Originally Posted by emufan View Post
ok, good news. any idea about the error I added above? using gcc6.
Hmm, no clue. I had to modify the makefile a bit and some sources to get it to compile on the gcc6 toolchain myself. Make sure the prefixes are correct and such.
Marlon_ is offline  
Old 20 December 2017, 02:16   #530
emufan
Registered User
 
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
somehoiw I made a makefile mix with the non-AMMX version, it did build a lib,
which has some apollo functions included. differs in size.
I'll let xboxnow test the one (edgar)
emufan is offline  
Old 21 December 2017, 20:07   #531
bebbo
bye
 
Join Date: Jun 2016
Location: Some / Where
Posts: 681
Merry Christmas!

I just switched the binutils to amiga hunk format to enable the now supported memory qualifiers
Code:
__chip int yeah_in_chip = 1234;
__fast int oh_so_fast = 999;
__far int no_base_rel = 456; // never use baserel (a4) addressing
.bss* is selected if there is no intializer, .data* if there is some.

The examples do work and way more.

Happy New Year :-)
bebbo is offline  
Old 21 December 2017, 20:16   #532
Samurai_Crow
Total Chaos forever!
 
Samurai_Crow's Avatar
 
Join Date: Aug 2007
Location: Waterville, MN, USA
Age: 49
Posts: 2,200
Sweet!
Samurai_Crow is offline  
Old 21 December 2017, 20:38   #533
alpine9000
Registered User
 
Join Date: Mar 2016
Location: Australia
Posts: 882
Nice work bebbo!
alpine9000 is offline  
Old 21 December 2017, 20:39   #534
emufan
Registered User
 
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
Quote:
Originally Posted by bebbo View Post
I just switched the binutils to amiga hunk format to enable the now supported memory qualifiers
do we now have amiga-hunk-format object files - like seen with StormC4?
emufan is offline  
Old 21 December 2017, 21:03   #535
bebbo
bye
 
Join Date: Jun 2016
Location: Some / Where
Posts: 681
Quote:
Originally Posted by emufan View Post
do we now have amiga-hunk-format object files - like seen with StormC4?
Yes.

  • The new version of m68k-amigaos-as creates object (.o) files in amiga-hunk-format.
  • The new version of m68-amigaos-ar creates libs (.a) files in amiga-hunk-format
  • The linker m68k-amigaos-ld is still creating programs in amiga-hunk-format plus it can still handle objects and libraries in aout format.
  • The aout specific constructors via .stab/.stabstr are supported in amiga-hunk-format: the content is passed in debug sections and processed by the linker.
bebbo is offline  
Old 21 December 2017, 21:10   #536
bebbo
bye
 
Join Date: Jun 2016
Location: Some / Where
Posts: 681
Here a simple test program which creates all kind of memory hunks:

mem.c:
Code:
#include <stdio.h>

int dat[] = {1, 2, 3, 4};
__chip int cdat[] = {11, 12, 13, 14};
__far int fdat[] = {121, 122, 123, 124};
__fast int adat[] = {221, 222, 223, 224};

__chip int ucdat[4];
__far int ufdat[4];
__fast int uadat[4];

int iii;

int foo(int i) {
  return iii += i;
}

int main(int argc, char ** argv) {
  printf("%08x %08x %08x %08x\n", dat, cdat, fdat, adat);
  foo(dat[2] + cdat[2] + fdat[2] + adat[2]);

  adat[2] = ucdat[3] = cdat[3];
  fdat[2] = uadat[3] = adat[3];
  cdat[2] = ufdat[3] = fdat[3];

  return dat[1] + cdat[1] + fdat[1] + adat[1] + iii;
}
compile it with
Code:
m68k-amigaos-gcc -noixemul -Os -fbaserel mem.c -o mem -s
and you get these hunks:
Code:
hunk 000003f3,      HUNK_HEADER,          0
8 sections, 0 - 7
sizes: 6400, 964, 16(c), 16(f), 16, 16(c), 16(f), 16
hunk 000003e9,        HUNK_CODE,       6400
hunk 000003ec,     HUNK_RELOC32,        376
hunk 000003ea,        HUNK_DATA,        796
hunk 000003ec,     HUNK_RELOC32,         68
hunk 000003ea,        HUNK_DATA,         16
hunk 000003ea,        HUNK_DATA,         16
hunk 000003ea,        HUNK_DATA,         16
hunk 000003eb,         HUNK_BSS,         16
hunk 000003eb,         HUNK_BSS,         16
hunk 000003eb,         HUNK_BSS,         16
bebbo is offline  
Old 21 December 2017, 21:32   #537
alkis
Registered User
 
Join Date: Dec 2010
Location: Athens/Greece
Age: 53
Posts: 723
Man, that's sweet! Thanks for your effort.
alkis is offline  
Old 21 December 2017, 21:55   #538
arti
Registered User
 
Join Date: Jul 2008
Location: Poland
Posts: 665
Any chance we get gprof?
arti is offline  
Old 21 December 2017, 22:45   #539
emufan
Registered User
 
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
Quote:
Originally Posted by bebbo View Post
Yes.
cool, thanks
emufan is offline  
Old 21 December 2017, 22:51   #540
pipper
Registered User
 
Join Date: Jul 2017
Location: San Jose
Posts: 677
Next on my wishlist would be a gdbserver / gdbclient that can allow for remote, source level debugging. I would love to fully use qtcreator on a Linux or Windows box to do cross platform development :-D
pipper 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 12:56.

Top

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