English Amiga Board


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

 
 
Thread Tools
Old 07 May 2017, 18:04   #241
bebbo
bye
 
Join Date: Jun 2016
Location: Some / Where
Posts: 681
Quote:
Originally Posted by bebbo View Post
What's the output with '-v'? When I'm using '-nostdlib' then there is no lib in the parameters for 'collect'.
It's the file a500.ld. This is a linker command file and contains the directives what to link:

Code:
GROUP(-lc -lgcc)
bebbo is offline  
Old 07 May 2017, 21:04   #242
wawa
Registered User
 
Join Date: Aug 2007
Location: berlin/germany
Posts: 1,054
Quote:
Originally Posted by ross View Post
Yes, this is what I meant
if you have enbough programming expertise, you could even be the person to do that. unfortunatelly i dont think i do, but im starting to think about pinging toni again, about what would make sense in this respect given bebbos work.

thing is, probably aros would have to switch to gcc6 for good first, because earlier versions might stop working if another way of dealing with amiga baskend features was introduced.
wawa is offline  
Old 07 May 2017, 22:47   #243
ross
Defendit numerus
 
ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 54
Posts: 4,491
Quote:
Originally Posted by wawa View Post
if you have enbough programming expertise
I think it's not just a matter of programming expertise (which is important!) but also knowledge of compilers stuff (which I largely miss).
I like more low level programming and this is not properly my taste. But can be interesting..
[I would rather rewrite AROS exec/kernel.resource/mmu.library in 68k asm ]

Quote:
im starting to think about pinging toni again, about what would make sense in this respect given bebbos work
I hope Toni has followed Bebbo's progress.

Quote:
thing is, probably aros would have to switch to gcc6 for good first, because earlier versions might stop working if another way of dealing with amiga baskend features was introduced.
I agree.

Cheers!
ross
ross is offline  
Old 07 May 2017, 23:41   #244
ovale
Registered User
 
Join Date: Jun 2014
Location: milan / italy
Posts: 174
This is what I get with -v and -mcrt=clib2 :

m68k-amigaos-gcc -v -mcrt=clib2 exception_68000.o standalone.o hex.o pkt.o cmd.o stub_arch.o a500_init.o uart.o -T a500.ld -o main -Wl,-Map=main.map
Using built-in specs.
COLLECT_GCC=m68k-amigaos-gcc
COLLECT_LTO_WRAPPER=/opt/m68k-amigaos/libexec/gcc/m68k-amigaos/6.3.1b/lto-wrapper
Target: m68k-amigaos
Configured with: /root/amigaos-cross-toolchain/submodules/gcc-6/configure --prefix=/opt/m68k-amigaos --infodir=/opt/m68k-amigaos/m68k-amigaos/info --mandir=/opt/m68k-amigaos/share/man --prefix=/opt/m68k-amigaos --prefix=/opt/m68k-amigaos --target=m68k-amigaos --enable-languages=c,c++,objc --enable-version-specific-runtime-libs --disable-libssp --with-headers=/root/amigaos-cross-toolchain/.build-m68k/sources/ixemul-48.2/include
Thread model: single
gcc version 6.3.1b 20170320 (GCC)
COMPILER_PATH=/opt/m68k-amigaos/libexec/gcc/m68k-amigaos/6.3.1b/:/opt/m68k-amigaos/libexec/gcc/m68k-amigaos/6.3.1b/:/opt/m68k-amigaos/libexec/gcc/m68k-amigaos/:/opt/m68k-amigaos/lib/gcc/m68k-amigaos/6.3.1b/:/opt/m68k-amigaos/lib/gcc/m68k-amigaos/:/opt/m68k-amigaos/lib/gcc/m68k-amigaos/6.3.1b/../../../../m68k-amigaos/bin/
LIBRARY_PATH=/opt/m68k-amigaos/lib/gcc/m68k-amigaos/6.3.1b/:/opt/m68k-amigaos/lib/gcc/m68k-amigaos/6.3.1b/../../../../m68k-amigaos/lib/
COLLECT_GCC_OPTIONS='-v' '-mcrt=clib2' '-T' 'a500.ld' '-o' 'main' '-mcpu=68000'
/opt/m68k-amigaos/libexec/gcc/m68k-amigaos/6.3.1b/collect2 -L/opt/m68k-amigaos/m68k-amigaos/clib2/lib -o main /opt/m68k-amigaos/m68k-amigaos/clib2/lib/ncrt0.o -L/opt/m68k-amigaos/lib/gcc/m68k-amigaos/6.3.1b -L/opt/m68k-amigaos/lib/gcc/m68k-amigaos/6.3.1b/../../../../m68k-amigaos/lib exception_68000.o standalone.o hex.o pkt.o cmd.o stub_arch.o a500_init.o uart.o -Map=main.map -lc -lamiga -ldebug -lgcc -lc -T a500.ld
/opt/m68k-amigaos/lib/gcc/m68k-amigaos/6.3.1b/../../../../m68k-amigaos/bin/ld: final link failed: Invalid operation
collect2: error: ld returned 1 exit status
Makefile:31: recipe for target 'main' failed
make: *** [main] Error 1
ovale is offline  
Old 08 May 2017, 00:58   #245
bebbo
bye
 
Join Date: Jun 2016
Location: Some / Where
Posts: 681
Quote:
Originally Posted by bebbo View Post
It's the file a500.ld. This is a linker command file and contains the directives what to link:

Code:
GROUP(-lc -lgcc)
I compiled and linked "something". It's untested and required
  • some underscores for vasm <--> gcc-6
  • some linker hacking for -mpcrel linking
  • a strcpy function
maybe it's working... /duck

AGAIN: updated the zip file

asm source is looking ok now - but still no time to test this...

Last edited by bebbo; 26 October 2023 at 13:18.
bebbo is offline  
Old 08 May 2017, 02:58   #246
wawa
Registered User
 
Join Date: Aug 2007
Location: berlin/germany
Posts: 1,054
Quote:
Originally Posted by ross View Post
I think it's not just a matter of programming expertise (which is important!) but also knowledge of compilers stuff (which I largely miss).
unfortunatelly hardly anyone wants to take the responsibility to mess with it.

Quote:
I like more low level programming and this is not properly my taste. But can be interesting..
seems a bit of tonis profile, maybe you could help witha an issue that is bothering s all. aros has problems to boot up on a number of amiga ide pio controllers, including vampire/apollo stuff, we are a bit stuck in this area. imho, having it boot on "genuine" hardwre might enforce progress in areas an end user is interested in.

Quote:
[I would rather rewrite AROS exec/kernel.resource/mmu.library in 68k asm ]
well, you might be allowed to do that for arch/amiga-m68k if it gains anything significant, that is, but part of architecure related code is asmalready.

Quote:
I hope Toni has followed Bebbo's progress.
i think he has noticed it, but given the crowd bothering him in all kinds of areas im thankful for every peace of commitment..
wawa is offline  
Old 11 May 2017, 16:47   #247
Marlon_
AmigaDev.com
 
Marlon_'s Avatar
 
Join Date: Mar 2016
Location: Stockholm, Sweden
Age: 35
Posts: 625
One thing I've noticed with the toolchain is that it doesn't like to link stuff when using singletons. I've managed to compile MilkyTracker 0.9.86 with the toolchain, but as soon as it is trying to link ppui, it fails:
Code:
DialogResample.o(.text+0x92c): In function `_ZN14DialogResampleC4EP8PPScreenP15DialogResponderi':
/home/marlon/tmp/MilkyTracker/milkytracker-0.90.86/src/tracker/../../src/ppui/Singleton.h:44: undefined reference to `PPSingleton<PPUIConfig>::instance'
DialogResample.o(.text+0x910):/home/marlon/tmp/MilkyTracker/milkytracker-0.90.86/src/tracker/../../src/ppui/Singleton.h:43: undefined reference to `PPSingleton<PPUIConfig>::instance'
DialogResample.o(.text+0x932): In function `_ZN14DialogResampleC4EP8PPScreenP15DialogResponderi':
/home/marlon/tmp/MilkyTracker/milkytracker-0.90.86/src/tracker/../../src/ppui/PPUIConfig.h:65: undefined reference to `PPSingleton<PPUIConfig>::instance'
EnvelopeEditor.o(.text+0x18): In function `PPSingleton<EnvelopeEditor::ClipBoard>::getInstance()':
/home/marlon/tmp/MilkyTracker/milkytracker-0.90.86/src/tracker/../../src/ppui/Singleton.h:44: undefined reference to `PPSingleton<EnvelopeEditor::ClipBoard>::instance'
EnvelopeEditor.o(.text+0x2):/home/marlon/tmp/MilkyTracker/milkytracker-0.90.86/src/tracker/../../src/ppui/Singleton.h:43: undefined reference to `PPSingleton<EnvelopeEditor::ClipBoard>::instance'
EnvelopeEditor.o(.text+0x20):/home/marlon/tmp/MilkyTracker/milkytracker-0.90.86/src/tracker/../../src/ppui/Singleton.h:47: undefined reference to `PPSingleton<EnvelopeEditor::ClipBoard>::instance'
And it goes on like this for every function that references the PPSingleton template.

I'm not sure how that could be fixed. My solution right now is to reprogram the software not to use the PPSingleton template.
Marlon_ is offline  
Old 11 May 2017, 19:37   #248
bebbo
bye
 
Join Date: Jun 2016
Location: Some / Where
Posts: 681
Quote:
Originally Posted by Marlon_ View Post
One thing I've noticed with the toolchain is that it doesn't like to link stuff when using singletons. I've managed to compile MilkyTracker 0.9.86 with the toolchain, but as soon as it is trying to link ppui, it fails:
...
How?

Would look into it, if I could get that far.
bebbo is offline  
Old 11 May 2017, 19:46   #249
Marlon_
AmigaDev.com
 
Marlon_'s Avatar
 
Join Date: Mar 2016
Location: Stockholm, Sweden
Age: 35
Posts: 625
Quote:
Originally Posted by bebbo View Post
How?

Would look into it, if I could get that far.
To get it to configure properly I did this:
Code:
SDL_CONFIG=/opt/m68k-amigaos/bin/sdl-config CPPFLAGS="-g -Os -D__AMIGA__ -fpermissive -mcrt=clib2 -m68020 -I/opt/m68k-amigaos/include/SDL -I/opt/m68k-amigaos/include -L/opt/m68k-amigaos/lib -L/opt/m68k-amigaos/m68k-amigaos/lib -fomit-frame-pointer -lSDL -ldebug -ljpeg -lSDLstub -lSDL_image -Xlinker --allow-multiple-definition" CXXFLAGS="-g -Os -D__AMIGA__ -fpermissive -mcrt=clib2 -m68020 -I/opt/m68k-amigaos/include/SDL -I/opt/m68k-amigaos/include -L/opt/m68k-amigaos/lib -L/opt/m68k-amigaos/m68k-amigaos/lib -fomit-frame-pointer -lSDL -ldebug -ljpeg -lSDLstub -lSDL_image -Xlinker --allow-multiple-definition" CFLAGS="-g -Os -D__AMIGA__ -fpermissive -mcrt=clib2  -m68020 -I/opt/m68k-amigaos/include/SDL -I/opt/m68k-amigaos/include -L/opt/m68k-amigaos/lib -L/opt/m68k-amigaos/m68k-amigaos/lib -fomit-frame-pointer -lSDL -ldebug -ljpeg -lSDLstub -lSDL_image -Xlinker --allow-multiple-definition" ./configure --build x86_64 --host m68k-amigaos
Some of that might be redundant and unnecessary, but it gets it to compile.

After you've run that, all you need to do is "make". Eventually some code errors pops up, that requires minor edits which I can't remember at the moment. You'll notice! =)
Marlon_ is offline  
Old 11 May 2017, 20:01   #250
bebbo
bye
 
Join Date: Jun 2016
Location: Some / Where
Posts: 681
Quote:
Originally Posted by Marlon_ View Post
To get it to configure properly I did this:
Code:
...
Some of that might be redundant and unnecessary, but it gets it to compile.

After you've run that, all you need to do is "make". Eventually some code errors pops up, that requires minor edits which I can't remember at the moment. You'll notice! =)
The archive I got only contains a configure.in and autoconf (2.69) is complaining...

Guess you compiled and installed a bunch other stuff?
bebbo is offline  
Old 11 May 2017, 20:17   #251
Marlon_
AmigaDev.com
 
Marlon_'s Avatar
 
Join Date: Mar 2016
Location: Stockholm, Sweden
Age: 35
Posts: 625
Quote:
Originally Posted by bebbo View Post
The archive I got only contains a configure.in and autoconf (2.69) is complaining...

Guess you compiled and installed a bunch other stuff?
Oh, the archive I got had a proper configure and such, I didn't need to use autoconf, automake or autoreconf.
Let me dig it up for you!
Marlon_ is offline  
Old 11 May 2017, 20:20   #252
Marlon_
AmigaDev.com
 
Marlon_'s Avatar
 
Join Date: Mar 2016
Location: Stockholm, Sweden
Age: 35
Posts: 625
Here you go:
http://www.marlonbeijer.com/download....90.86.tar.bz2
Marlon_ is offline  
Old 11 May 2017, 20:24   #253
bebbo
bye
 
Join Date: Jun 2016
Location: Some / Where
Posts: 681
Quote:
Originally Posted by Marlon_ View Post
downloading... let's see how far I get ^^
bebbo is offline  
Old 11 May 2017, 20:27   #254
Marlon_
AmigaDev.com
 
Marlon_'s Avatar
 
Join Date: Mar 2016
Location: Stockholm, Sweden
Age: 35
Posts: 625
Quote:
Originally Posted by bebbo View Post
downloading... let's see how far I get ^^
Good luck!
Marlon_ is offline  
Old 11 May 2017, 20:38   #255
bebbo
bye
 
Join Date: Jun 2016
Location: Some / Where
Posts: 681
Quote:
Originally Posted by Marlon_ View Post
Good luck!
... missing:

libSDL -> SDL2-2.0.5.tar.gz ?
libjpeg -> jpegsrc.v9b.tar.gz ?
bebbo is offline  
Old 11 May 2017, 20:40   #256
Samurai_Crow
Total Chaos forever!
 
Samurai_Crow's Avatar
 
Join Date: Aug 2007
Location: Waterville, MN, USA
Age: 49
Posts: 2,200
SDL 1.2 on Aminet, I would imagine... since SDL 2 doesn't have an Amiga version.
Samurai_Crow is offline  
Old 11 May 2017, 20:42   #257
Marlon_
AmigaDev.com
 
Marlon_'s Avatar
 
Join Date: Mar 2016
Location: Stockholm, Sweden
Age: 35
Posts: 625
Quote:
Originally Posted by bebbo View Post
... missing:

libSDL -> SDL2-2.0.5.tar.gz ?
libjpeg -> jpegsrc.v9b.tar.gz ?
What? 0.90.86 is before they went over to SDL2 afaik. I haven't gotten that message yet and I've successfully linked with SDL-1.2.6.
SDL-1.2.6 and libjpeg is available on aminet.
Marlon_ is offline  
Old 11 May 2017, 20:44   #258
Marlon_
AmigaDev.com
 
Marlon_'s Avatar
 
Join Date: Mar 2016
Location: Stockholm, Sweden
Age: 35
Posts: 625
I have managed to compile SDL-1.2.15 for AmigaOS3.x with your toolchain, however I'm not done testing it yet, so I don't know how stable it is.
Marlon_ is offline  
Old 11 May 2017, 22:56   #259
bebbo
bye
 
Join Date: Jun 2016
Location: Some / Where
Posts: 681
Workaround for the missing template class member is adding
Code:
PPUIConfig * PPUIConfig::instance = NULL;
to PPUIConfig.cpp.

EDIT: correct (no warning)
Code:
template<> 
PPUIConfig * PPSingleton<PPUIConfig>::instance = NULL;


This creates the missing
Code:
	.globl	__ZN11PPSingletonI10PPUIConfigE8instanceE
And do the same for all others (e.g. GlobalColorConfig, ...)

Last edited by bebbo; 11 May 2017 at 23:05.
bebbo is offline  
Old 12 May 2017, 00:17   #260
Marlon_
AmigaDev.com
 
Marlon_'s Avatar
 
Join Date: Mar 2016
Location: Stockholm, Sweden
Age: 35
Posts: 625
Quote:
Originally Posted by bebbo View Post
Workaround for the missing template class member is adding
Code:
PPUIConfig * PPUIConfig::instance = NULL;
to PPUIConfig.cpp.

EDIT: correct (no warning)
Code:
template<> 
PPUIConfig * PPSingleton<PPUIConfig>::instance = NULL;


This creates the missing
Code:
	.globl	__ZN11PPSingletonI10PPUIConfigE8instanceE
And do the same for all others (e.g. GlobalColorConfig, ...)
Alright, sorted most of them now. The only ones left are PPSingleton<EnvelopeEditor::ClipBoard> and PPSingleton<SampleEditor::ClipBoard>, but when I try to sort it, it complains about the instance being private. I'll probably figure it out soon enough. :P
Marlon_ 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 19:21.

Top

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