(09-11-2017, 10:27 PM)Parashoe Wrote: While preferable that the overlap be fixed, you can get mips64-elf-ld.exe to ignore the section overlap by adding "--no-check-sections" to LDFLAGS defined in the compiler options of the Makefile. Build completes using split files from n64split-0.4a and tools from the current build of n64chain.
Handy to know! I spent 4 days trying to build it. It kept failing at every turn.
(09-11-2017, 10:27 PM)Parashoe Wrote:
How do I build sm64tools? I'm on Windows 10.
Here's what I ended up doing for my windows 10:
Download the latest prebuilt toolchain from cen64.com and store that where ever you want (preferably somewhere you won't have to move it from at any point, because you need to link the toolchain\tools\bin folder in your "Path" environment variable)
**If you would rather try building the toolchain you can go ahead, this MinGW msys may be able to do that - I have no idea, I haven't tried.
**Just omit all of the building binutils steps.
Do away with Cygwin or MSys2 (as standalone shells) and download this (it is a minimalist GNU for windows, it comes with an included older version of MSys and the option for many packages which are required for what we're trying to do) it just does not have any POSIX functionality which wasn't required for me to build binutils:
http://www.mingw.org/
When installing, make sure you mark all 7 or 8 boxes (options including MinGW Base (Meta), Objective C compiler, C++ compiler etc) for installation, it will download and link the included msys with the packages..
After it is installed, navigate into its installation folder (Install_Drive:\MinGW)
Now locate msys.bat, this will be your "MinGW-connected" msys shell console. It will be located within the msys\1.0\ folder.
I personally, did not have to do any additional environment variables or fiddling with any files in order for this to begin building packages. Which leads me to believe it may just work if you wish to build n64tools.
--Building binutils-2.25:
I downloaded "binutils_2.25.orig.tar.gz" from
https://launchpad.net/ubuntu/+source/binutils/2.25-5ubuntu7 and extract the contents into your
\MinGW\msys\1.0\home\*YOUR USERNAME*\binutils-2.25\ (you will probably have to create the binutils-2.25 folder first)
While you are at it, create a folder within \MinGW\msys\1.0\home\*YOUR USERNAME*\ called "build-binutils-2.25"
Now from within the msys console, $ cd build-binutils-2.25
Once your target location is ~/build-binutils-2.25
Type this in:
$ ..\binutils-2.25\configure --prefix=/tools/mips64-elf --with-sysroot=$LFS --target=mips64-elf
After it has built the Makefile, just type "$ make" with no additional options
**This may take several minutes
After it has made, just "$ make install" with no additional options
The output files should go into the "tools" folder within where msys.bat is located.
There should be a mips64-elf folder in the tools folder. Within this folder, there will be
another mips64-elf folder among other folders, that means we're in the right directory.
Where you see "bin, mips64-elf, share" and no other folders, go into "bin" and copy everything out of there into:
\n64toolkit\tools\bin\*here*, replacing all duplicates.
Now leave bin, and go into the next mips64-elf folder. Copy everything out of "bin" folder within here into:
\n64tools\tools\mips64-elf\bin\*here*, replacing all duplicates.
Now leave that bin folder and go into "\lib\ldscripts\" and copy everything from there into:
\n64tools\tools\mips64-elf\lib\ldscripts\*here*, replacing all duplicates.
This replaces the later version of binutils included within n64tools.