• HomeBoards
  • RulesRules
  • HelpHelp
  • WikiWiki
  • Donate

Author Topic: GCW-Zero toolchain for windows+cygwin UPDATE 2017-08-15  (Read 26021 times)

dmitry_smagin (OP)

  • Posts: 423
GCW-Zero toolchain for windows+cygwin UPDATE 2017-08-15
« on: November 14, 2013, 11:17:54 am »
Hello.

Here's an unofficial toolchain compiled for Windows (Cygwin). It uses libraries from GCW Zero toolchain from 2014-08-20 but with another GCC version.

Recommended version:
GCC 4.9.4: http://prizma.bmstu.ru/~exmortis/archive/gcw0-toolchain-cygwin.2017-08-16.tar.gz

Older versions:
GCC 4.9.3: http://prizma.bmstu.ru/~exmortis/archive/gcw0-toolchain-cygwin.2016.08.31.tar.gz
GCC 4.9.1: http://prizma.bmstu.ru/~exmortis/archive/gcw0-toolchain-cygwin.2014.05.05.tar.gz
GCC 4.8.1: http://prizma.bmstu.ru/~exmortis/archive/gcw0-toolchain-cygwin.2013.10.04.tar.gz

Experimental version
GCC 6.3.0: http://prizma.bmstu.ru/~exmortis/archive/gcw0-toolchain-cygwin.2017-08-15.tar.gz

With experimental toolchain all C++ compilation might be broken! For compiling older C++ code you may require adding -std=c++98 or -std=gnu++98 compile flag, since GCC 6.3.0 has -std=gnu++14 by default. Also, some warnings are treated like errors, so code fixing is obligatory. In some hard cases you'll get bunch of linker errors. Use recommended version then.

Installation:
1. Download and install Gygwin: http://cygwin.org/
    Strictly choose 32-bit installer (setup-x86.exe). Now your cygwin is at c:/cygwin

2. Edit c:/cygwin/Cygwin.bat:
    Now it should look like this

Quote
@echo off

set PATH=c:\cygwin\bin
set PATH=/opt/gcw0-toolchain/usr/bin;%PATH%

c:
chdir c:\cygwin\bin

set LANG=en_US.UTF-8
bash --login -i

3. Copy gcw0-toolchain-cygwin.2017.08.15.tar.gz inside Cygwin folder

4. Run Cygwin.bat, you will fall into the console; Now it's time to do some commands
Quote
>cd /
>mkdir opt src
>tar -xf gcw0-toolchain-cygwin.2017.08.15.tar.gz -C /opt

  Now you can test if the toolchain is visible:
Quote
>mipsel-linux-gcc --version

5. Unpack your sources to /src dir; now you can pretend you're on linux and type make or whatever...

FAQ:
- No, this toolchain will not work without Cygwin, don't even try.
- No, I don't know how to attach this toolchain to Codeblocks, I don't use IDE at all
- No, I can't help if you are not able to use some basic commands in console

A short tutorial on compiling a toolchain under Cygwin with crosstool-NG:
http://prizma.bmstu.ru/~exmortis/posts/2016-02-04-gcw0-toolchain.html
« Last Edit: August 16, 2017, 06:12:35 pm by dmitry_smagin »
GCW-Zero prototype, Dingoo a320, Ritmix rzx-50, Dingoo a380, Xperia Play

slaanesh

  • Posts: 569
    • Slaanesh Dev
Re: GCW-Zero toolchain for windows (cygwin) 2013-10-04
« Reply #1 on: January 16, 2014, 12:12:41 pm »
Fantastic toolchain and thank you very much. I have had good success using it.

cdoty

  • Posts: 23
Re: GCW-Zero toolchain for windows (cygwin) 2013-10-04
« Reply #2 on: March 12, 2014, 03:55:56 am »
Have you tried the OpenGL ES support?

If so, any idea how much memory is available on the GPU?
« Last Edit: March 12, 2014, 04:14:59 am by cdoty »

Asixjin

  • Posts: 12
Re: GCW-Zero toolchain for windows (cygwin) 2013-10-04
« Reply #3 on: April 01, 2014, 03:06:53 am »
Edit - I figured it out (how to install it). Would someone know how to attach this to an IDE (ie Dev C++)?
« Last Edit: April 01, 2014, 03:20:45 am by Asixjin »

surfi80

  • Posts: 252
Re: GCW-Zero toolchain for windows (cygwin) 2013-10-04
« Reply #4 on: April 07, 2014, 03:24:20 pm »
with this could compile the Neo4all Tc4? I see somewhat complicated  :-[
play with the best? die like the rest!

http://www.elotrolado.net/wiki/PS_VITA_Usuarios_EoL

surfi80

  • Posts: 252
Re: GCW-Zero toolchain for windows (cygwin) 2013-10-04
« Reply #5 on: April 09, 2014, 02:52:54 pm »
Might upload a video tutorial on how to configure the toolchain (cygwin) would be very grateful, i have absolutely no idea (and I am afraid that the computer I explode) (^_^)
« Last Edit: April 09, 2014, 02:58:07 pm by surfi80 »
play with the best? die like the rest!

http://www.elotrolado.net/wiki/PS_VITA_Usuarios_EoL

Optimus

  • Posts: 108
Re: GCW-Zero toolchain for windows (cygwin) 2013-10-04
« Reply #6 on: June 30, 2014, 02:57:56 pm »
Have you tried the OpenGL ES support?

If so, any idea how much memory is available on the GPU?

I would be interested about this.
Else, I might have to prepare a Linux machine.
But windows official toolchain with latest libs pleaz?

dmitry_smagin (OP)

  • Posts: 423
Re: GCW-Zero toolchain for windows+cygwin UPDATE 2014-07-22
« Reply #7 on: July 22, 2014, 02:44:51 pm »
Update.

I've compiled a new toolchain which is a combination of GCC 4.9.1 with libraries from GCW-Zero Linux Toolchain 2014-05-05

Link: http://prizma.bmstu.ru/~exmortis/gcw0-toolchain-cygwin.2014.05.05.tar.gz

However, there's a rare bug (present in previous toolchain as well). If you get an error 'undefined reference to __tls_get_addr()' just define somewhere in your sources:

extern "C" void *__tls_get_addr() {return NULL;}

This is related to thread local storage, In my case it doesn't affect the application at all (but who knows)

FIXED.

First post updated.
« Last Edit: July 22, 2014, 03:08:32 pm by d_smagin »
GCW-Zero prototype, Dingoo a320, Ritmix rzx-50, Dingoo a380, Xperia Play

Optimus

  • Posts: 108
Re: GCW-Zero toolchain for windows+cygwin UPDATE 2014-07-22
« Reply #8 on: August 01, 2014, 06:59:55 pm »
This is great, thank you!
I even managed to compile the provided MesaGL examples (with my own makefile). I mean in here.
« Last Edit: August 01, 2014, 07:54:58 pm by Optimus »

mercluke

  • Posts: 6
Re: GCW-Zero toolchain for windows+cygwin UPDATE 2014-07-22
« Reply #9 on: August 08, 2014, 07:30:45 pm »
Could I just ask what you changed between this and the Linux build to get it up and running (if not just a case of re-compiling from source...)

I'd be interested in getting the tool chain running in osx so I don't have to keep booting into a VM to compile all the time :p

dmitry_smagin (OP)

  • Posts: 423
Re: GCW-Zero toolchain for windows+cygwin UPDATE 2014-07-22
« Reply #10 on: August 08, 2014, 07:47:49 pm »
Could I just ask what you changed between this and the Linux build to get it up and running (if not just a case of re-compiling from source...)

I'd be interested in getting the tool chain running in osx so I don't have to keep booting into a VM to compile all the time :p
linux toolchain is built with buildroot, cygwin toolchain is built with crosstool-ng
linux toolchain has gcc 4.8.2, cygwin one has gcc 4.9.1
linux toolchain's binutils support xburst instructions, cygwin's don't (I didn't know how to patch them properly)

Apart from these changes, everything else is identical (libraries are copied from linux toolchain).

If you'd like to make osx toolchain, try use crosstool-ng, however there are some restrictions. I don't have access to any Mac, sorry. Or, using wine for osx could be a solution. :)
GCW-Zero prototype, Dingoo a320, Ritmix rzx-50, Dingoo a380, Xperia Play

Harteex

  • * Administrator
  • Posts: 713
    • Harteex Productions
Re: GCW-Zero toolchain for windows+cygwin UPDATE 2014-07-22
« Reply #11 on: August 29, 2015, 12:54:41 am »
Hi dmitry

Do you feel like compiling the newest toolchain & libs (2014-08-20)? :)


BTW, I got the current one running with Netbeans, so if anyone is interested in a guide to set that up, feel free to ask.

dmitry_smagin (OP)

  • Posts: 423
Re: GCW-Zero toolchain for windows+cygwin UPDATE 2014-07-22
« Reply #12 on: February 05, 2016, 07:23:20 am »
A short tutorial on compiling a toolchain under Cygwin with crosstool-NG:
http://prizma.bmstu.ru/~exmortis/posts/2016-02-04-gcw0-toolchain.html
GCW-Zero prototype, Dingoo a320, Ritmix rzx-50, Dingoo a380, Xperia Play

dmitry_smagin (OP)

  • Posts: 423
Re: GCW-Zero toolchain for windows+cygwin UPDATE 2016-03-17
« Reply #13 on: March 17, 2016, 12:21:51 pm »
Toolchain updated, see first post.

EDIT: Just noticed that fceux compiled with gcc 5.2.0 toolchain fails to run with this error:
./fceux: can't resolve symbol '_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_createERjj'

gcc 4.9.1 doesn't have this problem, so use older toolchain if so.
« Last Edit: August 23, 2016, 10:30:57 am by dmitry_smagin »
GCW-Zero prototype, Dingoo a320, Ritmix rzx-50, Dingoo a380, Xperia Play

dmitry_smagin (OP)

  • Posts: 423
Re: GCW-Zero toolchain for windows+cygwin UPDATE 2016-08-31
« Reply #14 on: August 31, 2016, 11:17:16 am »
Toolchain updated, links in the first post.

Due to an error with libstdc++ (see previous post), the toolchain is recompiled with GCC 4.9.3. This eliminates the problem with unresolved symbols completely.
GCW-Zero prototype, Dingoo a320, Ritmix rzx-50, Dingoo a380, Xperia Play

pcercuei

  • Posts: 1692
    • My devblog
Re: GCW-Zero toolchain for windows+cygwin UPDATE 2016-08-31
« Reply #15 on: August 31, 2016, 01:05:29 pm »
Did you try GCC 6 yet?

dmitry_smagin (OP)

  • Posts: 423
Re: GCW-Zero toolchain for windows+cygwin UPDATE 2016-08-31
« Reply #16 on: August 31, 2016, 01:40:24 pm »
Did you try GCC 6 yet?
Not yet. If the next crosstool-ng version supports it, I'll definitely try it. :)

EDIT: Just looked at crosstool-ng's github and the most recent gcc version is 5.4.0
« Last Edit: August 31, 2016, 01:42:37 pm by dmitry_smagin »
GCW-Zero prototype, Dingoo a320, Ritmix rzx-50, Dingoo a380, Xperia Play

phlogios

  • Posts: 12
Re: GCW-Zero toolchain for windows+cygwin UPDATE 2016-08-31
« Reply #17 on: September 25, 2016, 09:58:21 am »
Now that Windows 10 optionally includes a Ubuntu subsystem, do you think there's any way of utilizing that instead of cygwin? :)

dmitry_smagin (OP)

  • Posts: 423
Re: GCW-Zero toolchain for windows+cygwin UPDATE 2017-08-15
« Reply #18 on: August 15, 2017, 02:01:05 pm »
Updated the toolchain to GCC 6.3.0, see first post.
Please, test.

ATTENTION! For compiling older C++ code you may require adding -std=c++98 or -std=gnu++98 compile flag, since GCC 6.3.0 has -std=gnu++14 by default. Also, some warnings are treated like errors, so code fixing is obligatory.

EDIT: So far only fceu320OD (fceux) fails to compile with GCC 6.3.0 because of multiple linking errors. It's recommended to use 4.8.1, 4.9.1 or 4.9.3 in this case.
« Last Edit: August 16, 2017, 10:38:35 am by dmitry_smagin »
GCW-Zero prototype, Dingoo a320, Ritmix rzx-50, Dingoo a380, Xperia Play

slaanesh

  • Posts: 569
    • Slaanesh Dev
Re: GCW-Zero toolchain for windows+cygwin UPDATE 2017-08-15
« Reply #19 on: February 05, 2019, 10:48:17 am »
Thanks so much for the updated GCW-Zero toolchain! I'm testing the GCC 6.3.0.

Any reports of producing better/faster binaries?

 

Post a new topic