The only solution that I found is by using msys2, note that in this example, we copy a mingw distribution that's not part of msys2, therefore, it's not intended to be updated by using pacman.
I am assuming that msys2 will be installed in C:\msys64, which is the default.
First download msys2 https://sourceforge.net/projects/msys2/ ... e/download
Download the 32-bit gcc toolchain 7.3.0 https://sourceforge.net/projects/mingw- ... v5-rev0.7z
Download the 64-bit gcc toolchain 7.3.0 https://sourceforge.net/projects/mingw- ... v5-rev0.7z
Install msys2
From the msys shell install the following
Code: Select all
pacman -S make
pacman -S patch
pacman -S git
pacman -S zip
pacman -S p7zip
Extract x86_64-7.3.0-release-win32-sjlj-rt_v5-rev0.7z into the msys64 folder
Copy C:\mingw64\mingw32\opt\lib\libffi-3.2.1\include\ffi.h into C:\mingw64\mingw32\i686-w64-mingw32\include
Copy C:\mingw64\mingw32\opt\lib\libffi-3.2.1\include\ffitarget.h into C:\mingw64\mingw32\i686-w64-mingw32\include
Copy C:\mingw64\mingw64\opt\lib\libffi-3.2.1\include\ffi.h into C:\mingw64\mingw64\x86_64-w64-mingw32\include
Copy C:\mingw64\mingw64\opt\lib\libffi-3.2.1\include\ffitarget.h into C:\mingw64\mingw64\x86_64-w64-mingw32\include
Install fbc into msys64
Download fbc730 for mingw toolchain
Extract the fbc370 archive
launch mingw32.exe
cd into the fbc730 folder
sh install.sh
Open a new document in notepad and paste following patch by StW, the patch is needed to build fbc 32-bit
Save as C:\msys64/tmp/fb-make-patch.txtdiff --git a/makefile b/makefile
index 8145b4f..512b81b 100644
--- a/makefile
+++ b/makefile
@@ -242,7 +242,12 @@ else
# For DJGPP, always use x86 (DJGPP's uname -m returns just "pc")
ifeq ($(TARGET_OS),dos)
TARGET_ARCH := x86
- else
+ # For MSYS2, use default compilers (uname -m returns MSYS2's shell architecture)
+ else ifneq ($(findstring MINGW32,$(uname)),)
+ TARGET_ARCH := x86
+ else ifneq ($(findstring MINGW64,$(uname)),)
+ TARGET_ARCH := x86_64
+ else
TARGET_ARCH = $(shell uname -m)
endif
endif
launch mingw32.exe
Code: Select all
git clone https://git.code.sf.net/p/fbc/code fbc-code
Code: Select all
cd ~/fbc-code
patch -N -Z -p1 < "/c/msys64/tmp/fb-make-patch.txt"
ENABLE_STANDALONE=1
Save As "config.mk" into the folder fbc-code, which if msys2 was installed using the defaults, would be C:\msys64\home\your-user-account\fbc-code
Now go back to mingw32.exe and type
Code: Select all
make
cd lib/win32
make
rm *.def
rm makefile
cd ../..
make mingw-libs
mkdir -p bin/win32
wget http://www.godevtool.com/Gorc.zip
7z e Gorc.zip
cp GoRC.exe bin/win32
rm *.gif
rm GoRC.exe
rm GoRC.htm
rm Gorc.zip
cp /c/msys64/mingw32/bin/ar.exe bin/win32
cp /c/msys64/mingw32/bin/as.exe bin/win32
cp /c/msys64/mingw32/bin/dlltool.exe bin/win32
cp /c/msys64/mingw32/bin/gcc.exe bin/win32
cp /c/msys64/mingw32/bin/gdb.exe bin/win32
cp /c/msys64/mingw32/bin/gprof.exe bin/win32
cp /c/msys64/mingw32/bin/ld.exe bin/win32
mkdir -p bin/libexec/gcc/i686-w64-mingw32/7.3.0
cp /c/msys64/mingw32/libexec/gcc/i686-w64-mingw32/7.3.0/cc1.exe bin/libexec/gcc/i686-w64-mingw32/7.3.0
make bindist