Setting up C++ compiler toolchain

Ask anything your want about Megadrive/Genesis programming.

Moderator: BigEvilCorporation

TechnoZealot
Interested
Posts: 30
Joined: Mon May 06, 2013 2:27 am
Location: Vermont, USA

Setting up C++ compiler toolchain

Post by TechnoZealot » Fri Dec 20, 2013 12:35 pm

HI! I've been trying fruitlessly to compile GCC with C++ and Objective-C support using Chilly WIlly's excellent tutorial using MinGW and MSYS, but cannot seem to get some parts to compile, specifically binutils and mpfr.

Does anyone have a compiled binary for m68k-elf-c++.exe?

Thanks! :D

djcouchycouch
Very interested
Posts: 710
Joined: Sat Feb 18, 2012 2:44 am

Re: Setting up C++ compiler toolchain

Post by djcouchycouch » Fri Dec 20, 2013 3:04 pm

TechnoZealot wrote:HI! I've been trying fruitlessly to compile GCC with C++ and Objective-C support using Chilly WIlly's excellent tutorial using MinGW and MSYS, but cannot seem to get some parts to compile, specifically binutils and mpfr.

Does anyone have a compiled binary for m68k-elf-c++.exe?

Thanks! :D
Hi!

Do you mean from this thread? (viewtopic.php?t=1045) Or another?

djcc
Last edited by djcouchycouch on Fri Dec 20, 2013 6:21 pm, edited 1 time in total.

TechnoZealot
Interested
Posts: 30
Joined: Mon May 06, 2013 2:27 am
Location: Vermont, USA

Post by TechnoZealot » Fri Dec 20, 2013 6:02 pm

Yes, from that thread. Sorry, I should have put a link in the first post! :wink:

djcouchycouch
Very interested
Posts: 710
Joined: Sat Feb 18, 2012 2:44 am

Post by djcouchycouch » Fri Dec 20, 2013 6:23 pm

I tried building for Windows a while ago. Have you seen my post in the thread?

viewtopic.php?p=18727#18727

There was a step that wasn't clear in the original instructions.

I remember having trouble figuring out where which folder went where.

TechnoZealot
Interested
Posts: 30
Joined: Mon May 06, 2013 2:27 am
Location: Vermont, USA

Post by TechnoZealot » Fri Dec 20, 2013 6:30 pm

I think the only difference for me was that I used the most recent version of MinGW/MSYS and I am [regrettably] running Win8.

I don't think my MSYS setup even has an /opt directory to copy though .ld files to. :(

djcouchycouch
Very interested
Posts: 710
Joined: Sat Feb 18, 2012 2:44 am

Post by djcouchycouch » Fri Dec 20, 2013 7:21 pm

TechnoZealot wrote:I think the only difference for me was that I used the most recent version of MinGW/MSYS and I am [regrettably] running Win8.

I don't think my MSYS setup even has an /opt directory to copy though .ld files to. :(
You should try the exact versions in Chilly's instructions, just to be safe.

TechnoZealot
Interested
Posts: 30
Joined: Mon May 06, 2013 2:27 am
Location: Vermont, USA

Post by TechnoZealot » Fri Dec 20, 2013 7:35 pm

Is there a place where I can get a precompiled binary of this? I am having a lot more trouble than I think I should be.
Last edited by TechnoZealot on Fri Dec 20, 2013 7:49 pm, edited 1 time in total.

djcouchycouch
Very interested
Posts: 710
Joined: Sat Feb 18, 2012 2:44 am

Post by djcouchycouch » Fri Dec 20, 2013 7:38 pm

TechnoZealot wrote:Is there a palce where I can get a precompiled binary of this? I am having a lot more trouble than I think I should be.
Sadly, I don't know.

TechnoZealot
Interested
Posts: 30
Joined: Mon May 06, 2013 2:27 am
Location: Vermont, USA

Post by TechnoZealot » Fri Dec 20, 2013 7:50 pm

No problem. I'm hoping I get this to work. If anyone can find a copy of m68k-elf-c++.exe, I would be much obliged. :D

djcouchycouch
Very interested
Posts: 710
Joined: Sat Feb 18, 2012 2:44 am

Post by djcouchycouch » Fri Dec 20, 2013 8:53 pm

TechnoZealot wrote:No problem. I'm hoping I get this to work. If anyone can find a copy of m68k-elf-c++.exe, I would be much obliged. :D
If you're having trouble building the toolchain, there might be other problems than just a missing executable. But you'll probably find them once you start building :)

TechnoZealot
Interested
Posts: 30
Joined: Mon May 06, 2013 2:27 am
Location: Vermont, USA

Post by TechnoZealot » Fri Dec 20, 2013 9:17 pm

I had build errors originally. I am just looking for a prebuilt binary if that is around somewhere. I couldn't find any online.

That is, unless I can fix my build process.

I am going to give the tutorial from SEGA-16 another try...

Wish me luck! :)

TechnoZealot
Interested
Posts: 30
Joined: Mon May 06, 2013 2:27 am
Location: Vermont, USA

Post by TechnoZealot » Fri Dec 20, 2013 11:48 pm

Keep getting this error:

../../binutils-2.21/bfd/bfdio.c: In function 'memory_bstat':
../../binutils-2.21/bfd/bfdio.c:580:30: error: argument to 'sizeof' in 'memset'
call is the same expression as the destination; did you mean to dereference it?
[-Werror=sizeof-pointer-memaccess]
memset (statbuf, 0, sizeof (statbuf));
^
cc1.exe: all warnings being treated as errors
make[5]: *** [bfdio.lo] Error 1
make[5]: Leaving directory `/drive/b/build-binutils-m68k-elf-2.21/bfd'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory `/drive/b/build-binutils-m68k-elf-2.21/bfd'
make[3]: *** [all] Error 2
make[3]: Leaving directory `/drive/b/build-binutils-m68k-elf-2.21/bfd'
make[2]: *** [all-bfd] Error 2
make[2]: Leaving directory `/drive/b/build-binutils-m68k-elf-2.21'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/drive/b/build-binutils-m68k-elf-2.21'
make: *** [build-m68k-binutils] Error 2

djcouchycouch
Very interested
Posts: 710
Joined: Sat Feb 18, 2012 2:44 am

Post by djcouchycouch » Sat Dec 21, 2013 1:37 am

Have you tried binutils 2.22 ? That's the version suggested in Chilly's instructions.

I can't find anything in the changelog from 2.21 to 2.22 about the problem, but it's worth a shot.

TechnoZealot
Interested
Posts: 30
Joined: Mon May 06, 2013 2:27 am
Location: Vermont, USA

Post by TechnoZealot » Sat Dec 21, 2013 6:14 am

Ah! I'll try that!

TechnoZealot
Interested
Posts: 30
Joined: Mon May 06, 2013 2:27 am
Location: Vermont, USA

Post by TechnoZealot » Sat Dec 21, 2013 6:16 am

I don't think that's the issue though, because I did a couple of other setups and got different errors at different stages, some very lacking in description, even when only trying to build the targets for pass2 of the gcc compiler.

Post Reply