English Amiga Board


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

 
 
Thread Tools
Old 10 February 2018, 02:03   #81
grelbfarlk
Registered User

 
Join Date: Dec 2015
Location: USA
Posts: 1,150
I think we need either a new stdlib or something is not right in translating the MorphOS symbols to WarpOS, something like that. GCC 4.4.5 works fine but G++ is a no-go for now for me.

I keep meaning to try Marlon's idea of using one of the other MorphOS cross compilers via Windows or whatever then running elf2exe2 on the output on the Amiga.
grelbfarlk is offline  
AdSense AdSense  
Old 10 February 2018, 02:26   #82
emufan
Registered User
 
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,546
ah, ok. AmiDevCpp comes with MorphOS toolchain:
Code:
bash-3.2$ ppc-morphos-g++.exe --version
2.95.3
not good enough

#1) Marlon himself made a MorphOS toolchain. I had no clue

Last edited by emufan; 10 February 2018 at 02:36.
emufan is offline  
Old 10 February 2018, 03:02   #83
grelbfarlk
Registered User

 
Join Date: Dec 2015
Location: USA
Posts: 1,150
Quote:
Originally Posted by emufan View Post
ah, ok. AmiDevCpp comes with MorphOS toolchain:
Code:
bash-3.2$ ppc-morphos-g++.exe --version
2.95.3
not good enough

#1) Marlon himself made a MorphOS toolchain. I had no clue
And he has WarpOS in there too...

Just remembered an idea I had a long time ago, unrelated to any of this.

Here we go...
EMUFAN DO YOU THINK YOU CAN PORT THIS!?!!!!!

Take the Adoom code for Six Button Megadrive/Genesis gamepad support, add it to SDL. Make an ENV variable for SDL_Joystick_Genesis=1 to turn it on.
That's it. My old idea was for someone (not me) to write a new lowlevel.library which would be even better, but I'll settle for this. If you can have this done by Monday so I can ship out to Hedeon a Genesis Six-button controller that'd be good.

Last edited by grelbfarlk; 10 February 2018 at 03:07.
grelbfarlk is offline  
Old 10 February 2018, 17:02   #84
emufan
Registered User
 
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,546
already in the making of "./toolchain-morphos -warpup"
I struggle with the installation here on my cygwin 32bit setup.
my lha refuses to extract the sdk-20160605.lha, even repacked with my local lha.exe :/
rather strange

#1) some install script fixing, now it does build the binutils.
cannot predict the success of building the toolchain,
but where is the adoom src you mention above?

Last edited by emufan; 10 February 2018 at 17:15.
emufan is offline  
Old 10 February 2018, 17:08   #85
Marlon_
Amiga Programmer

Marlon_'s Avatar
 
Join Date: Mar 2016
Location: Sundsvall, Sweden
Age: 29
Posts: 378
Quote:
Originally Posted by emufan View Post
already in the making of "./toolchain-morphos -warpup"
I struggle with the installation here on my cygwin 32bit setup.
my lha refuses to extract the sdk-20160605.lha, even repacked with my local lha.exe :/
rather strange
I have only tried my toolchain on Linux, and the WarpUP stuff is work in progress.

The best way is to install the MorphOS toolchain in it's own prefix, but select gcc4 and get Hedeon's toolchain and copy over the files necessary.

For regular MorphOS stuff, I'd recommend gcc-5

Let me know your progress! =)
Marlon_ is offline  
Old 10 February 2018, 17:22   #86
emufan
Registered User
 
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,546
oh, ok. so for warpos: ./toolchain-morphos -warpup --gcc gcc4 ?

where is Hedeon's toolchain, and what files I have to use from it?
emufan is offline  
Old 10 February 2018, 17:25   #87
Marlon_
Amiga Programmer

Marlon_'s Avatar
 
Join Date: Mar 2016
Location: Sundsvall, Sweden
Age: 29
Posts: 378
Quote:
Originally Posted by emufan View Post
oh, ok. so for warpos: ./toolchain-morphos -warpup --gcc gcc4 ?
Just skip the warpup altogether, it doesn't work as it should yet. the "-warpup"-flag is supposed to download Hedeon's toolchain and copy over the required files automatically, however it doesn't do that yet.

This will suffice:
./toolchain-morphos --gcc gcc4 --prefix /opt/ppc-warpos

Then manually download Hedeon's toolchain: http://aminet.net/package/dev/gcc/gcc-mos2wos
Marlon_ is offline  
Old 10 February 2018, 17:35   #88
emufan
Registered User
 
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,546
ok. restarted again, with your settings.
so we build now the cross-compiler version of hedeons's native gcc?
emufan is offline  
Old 10 February 2018, 17:50   #89
Marlon_
Amiga Programmer

Marlon_'s Avatar
 
Join Date: Mar 2016
Location: Sundsvall, Sweden
Age: 29
Posts: 378
If you actually read the description for the gcc-mos2wos package, you'd know what's up.

Quote:
When looking at the warpup/powerup gcc compiler version 2.95.3
I noticed that it was actually a powerup compiler with the warpup extensions
bolted on top of it using a custom gcc spec file.

As powerup evolved into MorphOS, they actually use the same ABI. The only
difference as I can tell is the __abox__ symbol being present in MorphOS
binaries and not in powerup ELF binaries.
You're building the MorphOS cross-compiler and then apply the includes and libraries and spec files needed for WarpOS.
Marlon_ is offline  
Old 10 February 2018, 17:51   #90
Marlon_
Amiga Programmer

Marlon_'s Avatar
 
Join Date: Mar 2016
Location: Sundsvall, Sweden
Age: 29
Posts: 378
I suggest you read the whole description so you understand what it does.
Marlon_ is offline  
Old 10 February 2018, 17:54   #91
emufan
Registered User
 
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,546
Code:
...
Building gcc4.
patching file toplev.h
Failed to build gcc4 for whatever reason. You're unfortunately on
your own now.
...
configure: error: C preprocessor "cpp-5" fails sanity check
See `config.log' for more details.
does the setup look for all tools with -5 extension?
cygwin already has gcc 6.x, so all the "...-5" are symlinks.

#1) hopefully those only: "CC=gcc-5 CXX=g++-5 CPP=cpp-5" - from setup script.
you should add a check for the three above, before the build starts:
"not there, should I create symlinks (y/n)"

Last edited by emufan; 10 February 2018 at 18:08.
emufan is offline  
Old 10 February 2018, 17:55   #92
Marlon_
Amiga Programmer

Marlon_'s Avatar
 
Join Date: Mar 2016
Location: Sundsvall, Sweden
Age: 29
Posts: 378
gcc-5 + surrounding tools are required by the MorphOS toolchain to compile, afaik.
Marlon_ is offline  
Old 10 February 2018, 18:04   #93
Marlon_
Amiga Programmer

Marlon_'s Avatar
 
Join Date: Mar 2016
Location: Sundsvall, Sweden
Age: 29
Posts: 378
Quote:
Originally Posted by emufan View Post
you should add a check for the three above, before the build starts.
yup, will do. 90% of the toolchain installer script is unmodified from the older manual script: http://bigfoot.morphos-team.net/file...p-cross-sdk.sh

Will sort that out. But usually if you have gcc-5 you will have cpp-5 as well.

I will not help tainting someones system with false symlinks. gcc-6 != gcc-5 and can give odd behaviour.
Marlon_ is offline  
Old 10 February 2018, 18:11   #94
emufan
Registered User
 
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,546
cygwin did so already with gcc-4 --> gcc6.exe.
with cpp-5 now, it continues, where it failed before. we'll see.

#1) already some binaries in /opt/ppc-warpos/bin/
emufan is offline  
Old 10 February 2018, 19:31   #95
emufan
Registered User
 
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,546
Code:
Failed to build gcc4 for whatever reason. You're unfortunately on
your own now.
....
mkdir -p -- ./gcc
Configuring in ./gcc
configure: creating cache ./config.cache
checking build system type... i686-pc-cygwin
checking host system type... i686-pc-cygwin
checking target system type... powerpc-unknown-morphos
checking LIBRARY_PATH variable... ok
checking GCC_EXEC_PREFIX variable... ok
checking whether to place generated files in the source directory... no
configure: error: cannot execute: /gg/ppc-morphos/bin/ld: check --with-ld or env.
 var. DEFAULT_LINKER
make[2]: *** [Makefile:4813: configure-gcc] Error 1
make[2]: Leaving directory '/tmp/tmp.Jz3dhpLTPg/gcc4/gcc-4.4.5/build'
make[1]: *** [Makefile:745: all] Error 2
make[1]: Leaving directory '/tmp/tmp.Jz3dhpLTPg/gcc4/gcc-4.4.5/build'
make: *** [Makefile:121: gcc4_make] Error 2
results from:
Code:
mkdir gcc-4.4.5/build
cd gcc-4.4.5/build && ../configure --target=ppc-morphos \
 --with-ld=/gg/ppc-morphos/bin/ld ....
doesnt check the prefix used before :/
./toolchain-morphos --gcc gcc4 --prefix /opt/ppc-warpos
Code:
$ /opt/ppc-warpos/bin/ld.exe --version
GNU ld 2.9.1
Copyright 1997 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License.  This program has absolutely no warranty.
  Supported emulations:
   morphos
   morphos_baserel

Last edited by emufan; 10 February 2018 at 19:37.
emufan is offline  
Old 10 February 2018, 19:34   #96
Marlon_
Amiga Programmer

Marlon_'s Avatar
 
Join Date: Mar 2016
Location: Sundsvall, Sweden
Age: 29
Posts: 378
Yeah, /gg is wrong, it should adjust that to the prefix you set... Like I said, work in progress.
Marlon_ is offline  
Old 10 February 2018, 19:50   #97
emufan
Registered User
 
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,546
I cannot find the /gg/ppc-morphos prefix in toolchain-morphos,
so it's somewhere in the files downloaded by the script.
emufan is offline  
Old 10 February 2018, 20:08   #98
Marlon_
Amiga Programmer

Marlon_'s Avatar
 
Join Date: Mar 2016
Location: Sundsvall, Sweden
Age: 29
Posts: 378
Quote:
Originally Posted by emufan View Post
I cannot find the /gg/ppc-morphos prefix in toolchain-morphos,
so it's somewhere in the files downloaded by the script.


Yeah, I think I solved this by making a symlink from /gg to $PREFIX, but I will make a patch to solve this!
Marlon_ is offline  
Old 10 February 2018, 20:28   #99
emufan
Registered User
 
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,546
Quote:
Originally Posted by Marlon_ View Post
Yeah, I think I solved this by making a symlink from /gg to $PREFIX, but I will make a patch to solve this!
ok, cool. symlink is fine, but after "wasting" hours of build time,
I prefer I more solid solution

#1) finaly found a working lha.exe for cygwin/win32.
this lha.exe now is able to extract the sdk-20160605.lha, options compatible to orig lha.
lhasa source code.
emufan is offline  
Old 11 February 2018, 00:12   #100
grelbfarlk
Registered User

 
Join Date: Dec 2015
Location: USA
Posts: 1,150
Go Emufan, go! Eye of the tiger! Stiff as a board, light as a feather! Claim your bounty!
grelbfarlk is offline  
AdSense AdSense  
 


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
emufan can you please port this to Amiga!!? xboxown Coders. C/C++ 93 29 November 2017 09:06
Just curious; Graphics Card Sim085 support.Hardware 31 12 October 2017 15:27
Curious about Natami Pat the Cat Amiga scene 13 07 January 2017 22:16
Hey hey, new guy here... CarlosTex Member Introductions 4 05 August 2011 01:29
hey hey 16k Akira Nostalgia & memories 5 16 August 2006 22:26

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 10:57.


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