Dingoonity.org
GCW Zero => Development => Topic started by: dmitry_smagin 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 (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 (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 (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 (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 (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
@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
>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:
>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 (http://prizma.bmstu.ru/~exmortis/posts/2016-02-04-gcw0-toolchain.html)
-
Fantastic toolchain and thank you very much. I have had good success using it.
-
Have you tried the OpenGL ES support?
If so, any idea how much memory is available on the GPU?
-
Edit - I figured it out (how to install it). Would someone know how to attach this to an IDE (ie Dev C++)?
-
with this could compile the Neo4all Tc4? I see somewhat complicated :-[
-
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) (^_^)
-
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?
-
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.
-
This is great, thank you!
I even managed to compile the provided MesaGL examples (with my own makefile). I mean in here (http://wiki.surkow.com/OpenGL).
-
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
-
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. :)
-
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.
-
A short tutorial on compiling a toolchain under Cygwin with crosstool-NG:
http://prizma.bmstu.ru/~exmortis/posts/2016-02-04-gcw0-toolchain.html (http://prizma.bmstu.ru/~exmortis/posts/2016-02-04-gcw0-toolchain.html)
-
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.
-
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.
-
Did you try GCC 6 yet?
-
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
-
Now that Windows 10 optionally includes a Ubuntu subsystem, do you think there's any way of utilizing that instead of cygwin? :)
-
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.
-
Thanks so much for the updated GCW-Zero toolchain! I'm testing the GCC 6.3.0.
Any reports of producing better/faster binaries?
-
I've been using GCC 6.3.0 for a few of my projects now and can report no problems what-so-ever.
I don't know if it's any faster as I haven't really done any "scientific" tests.
Thanks @dmitry_smagin
-
Using -flto seems to cause the following:
/opt/gcw0-toolchain/usr/bin/mipsel-linux-ar: gcw0_obj/gcw0.SDL/main.o: plugin needed to handle lto object
Seems like the liblto_plugin.so is missing?