Merge pull request #38 from SteveMoody73/master

MSYS2/MingW instead of Cygwin
This commit is contained in:
Stefan "Bebbo" Franke
2018-07-02 20:30:38 +02:00
committed by GitHub
7 changed files with 284 additions and 17 deletions
+1
View File
@@ -1,3 +1,4 @@
build
projects
download
Output
+73 -17
View File
@@ -36,6 +36,15 @@ EXEEXT=$(MYMAKEEXE:%=.exe)
UNAME_S := $(shell uname -s)
# Files for GMP, MPC and MPFR
GMP = gmp-6.1.2
GMPFILE = $(GMP).tar.bz2
MPC = mpc-1.0.3
MPCFILE = $(MPC).tar.gz
MPFR = mpfr-3.1.6
MPFRFILE = $(MPFR).tar.bz2
# =================================================
.PHONY: x
@@ -73,13 +82,22 @@ all: gcc binutils fd2sfd fd2pragma ira sfdc vbcc vasm vlink libnix ixemul libgcc
# =================================================
# clean
# =================================================
.PHONY: clean-prefix clean clean-gcc clean-binutils clean-fd2sfd clean-fd2pragma clean-ira clean-sfdc clean-vasm clean-vbcc clean-vlink clean-libnix clean-ixemul clean-libgcc clean-clib2 clean-libdebug clean-libSDL12 clean-newlib clean-ndk
clean: clean-gcc clean-binutils clean-fd2sfd clean-fd2pragma clean-ira clean-sfdc clean-vasm clean-vbcc clean-vlink clean-libnix clean-ixemul clean-clib2 clean-libdebug clean-libSDL12 clean-newlib clean-ndk
.PHONY: clean-prefix clean clean-gcc clean-binutils clean-fd2sfd clean-fd2pragma clean-ira clean-sfdc clean-vasm clean-vbcc clean-vlink clean-libnix clean-ixemul clean-libgcc clean-clib2 clean-libdebug clean-libSDL12 clean-newlib clean-ndk clean-gmp clean-mpc clean-mpfr
clean: clean-gcc clean-binutils clean-fd2sfd clean-fd2pragma clean-ira clean-sfdc clean-vasm clean-vbcc clean-vlink clean-libnix clean-ixemul clean-clib2 clean-libdebug clean-libSDL12 clean-newlib clean-ndk clean-gmp clean-mpc clean-mpfr
rm -rf build
clean-gcc:
rm -rf build/gcc
clean-gmp:
rm -rf projects/gcc/gmp
clean-mpc:
rm -rf projects/gcc/mpc
clean-mpfr:
rm -rf projects/gcc/mpfr
clean-libgcc:
rm -rf build/gcc/m68k-amigaos
rm build/gcc/_libgcc_done
@@ -140,8 +158,8 @@ clean-prefix:
# =================================================
# update all projects
# =================================================
.PHONY: update update-gcc update-binutils update-fd2sfd update-fd2pragma update-ira update-sfdc update-vasm update-vbcc update-vlink update-libnix update-ixemul update-clib2 update-libdebug update-libSDL12 update-ndk update-newlib update-netinclude
update: update-gcc update-binutils update-fd2sfd update-fd2pragma update-ira update-sfdc update-vasm update-vbcc update-vlink update-libnix update-ixemul update-clib2 update-libdebug update-libSDL12 update-ndk update-newlib update-netinclude
.PHONY: update update-gcc update-binutils update-fd2sfd update-fd2pragma update-ira update-sfdc update-vasm update-vbcc update-vlink update-libnix update-ixemul update-clib2 update-libdebug update-libSDL12 update-ndk update-newlib update-netinclude update-gmp update-mpc update-mpfr
update: update-gcc update-binutils update-fd2sfd update-fd2pragma update-ira update-sfdc update-vasm update-vbcc update-vlink update-libnix update-ixemul update-clib2 update-libdebug update-libSDL12 update-ndk update-newlib update-netinclude update-gmp update-mpc update-mpfr
update-gcc: projects/gcc/configure
cd projects/gcc && export DEPTH=16; while true; do echo "trying depth=$$DEPTH"; git pull --depth $$DEPTH && break; export DEPTH=$$(($$DEPTH+$$DEPTH));done
@@ -200,6 +218,30 @@ update-newlib: projects/newlib-cygwin/newlib/configure
update-netinclude: projects/amiga-netinclude/README.md
cd projects/amiga-netinclude && git pull
update-gmp:
@mkdir -p download
if [ -a download/$(GMPFILE) ]; \
then rm -rf projects/$(GMP); rm -rf projects/gcc/gmp; \
else cd download && wget ftp://ftp.gnu.org/gnu/gmp/$(GMPFILE); \
fi;
cd projects && tar xf ../download/$(GMPFILE)
update-mpc:
@mkdir -p download
if [ -a download/$(MPCFILE) ]; \
then rm -rf projcts/$(MPC); rm -rf projects/gcc/mpc; \
else cd download && wget ftp://ftp.gnu.org/gnu/mpc/$(MPCFILE); \
fi;
cd projects && tar xf ../download/$(MPCFILE)
update-mpfr:
@mkdir -p download
if [ -a download/$(MPFRFILE) ]; \
then rm -rf projects/$(MPFR); rm -rf projects/gcc/mpfr; \
else cd download && wget ftp://ftp.gnu.org/gnu/mpfr/$(MPFRFILE); \
fi;
cd projects && tar xf ../download/$(MPFRFILE)
status-all:
GCC_VERSION=$(shell cat 2>/dev/null projects/gcc/gcc/BASE-VER)
# =================================================
@@ -210,7 +252,7 @@ status-all:
# gcc
# =================================================
CONFIG_GCC=--prefix=$(PREFIX) --target=m68k-amigaos --enable-languages=c,c++,objc --enable-version-specific-runtime-libs --disable-libssp --disable-nls \
--with-headers=$(PWD)/projects/newlib-cygwin/newlib/libc/sys/amigaos/include/ --disable-shared
--with-headers=../../projects/newlib-cygwin/newlib/libc/sys/amigaos/include/ --disable-shared
GCC_CMD = m68k-amigaos-c++ m68k-amigaos-g++ m68k-amigaos-gcc-$(GCC_VERSION) m68k-amigaos-gcc-nm \
@@ -231,8 +273,15 @@ build/gcc/_done: build/gcc/Makefile $(shell find 2>/dev/null $(GCCD) -maxdepth 1
build/gcc/Makefile: projects/gcc/configure build/binutils/_done
@mkdir -p build/gcc
@mkdir -p projects/gcc/gmp
@mkdir -p projects/gcc/mpc
@mkdir -p projects/gcc/mpfr
rsync -a projects/$(GMP)/* projects/gcc/gmp
rsync -a projects/$(MPC)/* projects/gcc/mpc
rsync -a projects/$(MPFR)/* projects/gcc/mpfr
# if [ "$(UNAME_S)" == "Darwin" ]; then cd build/gcc && contrib/download_prerequisites; fi
cd build/gcc && $(E) $(PWD)/projects/gcc/configure $(CONFIG_GCC) $(LOG)
cd build/gcc && $(E) ../../projects/gcc/configure $(CONFIG_GCC) $(LOG)
projects/gcc/configure:
@mkdir -p projects
@@ -268,7 +317,7 @@ build/binutils/_done: build/binutils/gas/Makefile $(shell find 2>/dev/null proje
build/binutils/gas/Makefile: projects/binutils/configure
@mkdir -p build/binutils
cd build/binutils && $(E) $(PWD)/projects/binutils/configure $(CONFIG_BINUTILS) $(LOG)
cd build/binutils && $(E) ../../projects/binutils/configure $(CONFIG_BINUTILS) $(LOG)
projects/binutils/configure:
@mkdir -p projects
@@ -292,11 +341,14 @@ $(PREFIX)/bin/fd2sfd: build/fd2sfd/Makefile $(shell find 2>/dev/null projects/fd
$(MAKE) -C build/fd2sfd install $(LOG)
build/fd2sfd/Makefile: projects/fd2sfd/configure
@mkdir -p build/fd2sfd
cd build/fd2sfd && $(E) $(PWD)/projects/fd2sfd/configure $(CONFIG_FD2SFD) $(LOG)
cd build/fd2sfd && $(E) ../../projects/fd2sfd/configure $(CONFIG_FD2SFD) $(LOG)
projects/fd2sfd/configure:
@mkdir -p projects
cd projects && git clone -b master --depth 4 https://github.com/cahirwpz/fd2sfd
for i in $$(find patches/fd2sfd/ -type f); \
do if [[ "$$i" == *.diff ]] ; \
then j=$${i:8}; patch -N "projects/$${j%.diff}" "$$i"; fi ; done
# =================================================
# fd2pragma
@@ -358,11 +410,14 @@ $(PREFIX)/bin/sfdc: build/sfdc/Makefile $(shell find 2>/dev/null projects/sfdc -
build/sfdc/Makefile: projects/sfdc/configure
rsync -a projects/sfdc build --exclude .git
cd build/sfdc && $(E) $(PWD)/build/sfdc/configure $(CONFIG_SFDC) $(LOG)
cd build/sfdc && $(E) ./configure $(CONFIG_SFDC) $(LOG)
projects/sfdc/configure:
@mkdir -p projects
cd projects && git clone -b master --depth 4 https://github.com/adtools/sfdc
for i in $$(find patches/sfdc/ -type f); \
do if [[ "$$i" == *.diff ]] ; \
then j=$${i:8}; patch -N "projects/$${j%.diff}" "$$i"; fi ; done
# =================================================
# vasm
@@ -463,12 +518,12 @@ build/ndk-include/_ndk: build/ndk-include/_ndk0 $(NDK_INCLUDE_INLINE) $(NDK_INCL
build/ndk-include/_ndk0: projects/NDK_3.9.info $(NDK_INCLUDE)
mkdir -p $(PREFIX)/m68k-amigaos/ndk-include
rsync -a $(PWD)/projects/NDK_3.9/Include/include_h/* $(PREFIX)/m68k-amigaos/ndk-include --exclude proto
rsync -a $(PWD)/projects/NDK_3.9/Include/include_i/* $(PREFIX)/m68k-amigaos/ndk-include
rsync -a ./projects/NDK_3.9/Include/include_h/* $(PREFIX)/m68k-amigaos/ndk-include --exclude proto
rsync -a ./projects/NDK_3.9/Include/include_i/* $(PREFIX)/m68k-amigaos/ndk-include
mkdir -p $(PREFIX)/m68k-amigaos/ndk/lib
rsync -a $(PWD)/projects/NDK_3.9/Include/fd $(PREFIX)/m68k-amigaos/ndk/lib
rsync -a $(PWD)/projects/NDK_3.9/Include/sfd $(PREFIX)/m68k-amigaos/ndk/lib
rsync -a $(PWD)/projects/NDK_3.9/Include/linker_libs $(PREFIX)/m68k-amigaos/ndk/lib
rsync -a ./projects/NDK_3.9/Include/fd $(PREFIX)/m68k-amigaos/ndk/lib
rsync -a ./projects/NDK_3.9/Include/sfd $(PREFIX)/m68k-amigaos/ndk/lib
rsync -a ./projects/NDK_3.9/Include/linker_libs $(PREFIX)/m68k-amigaos/ndk/lib
mkdir -p $(PREFIX)/m68k-amigaos/ndk-include/proto
cp -p projects/NDK_3.9/Include/include_h/proto/alib.h $(PREFIX)/m68k-amigaos/ndk-include/proto
cp -p projects/NDK_3.9/Include/include_h/proto/cardres.h $(PREFIX)/m68k-amigaos/ndk-include/proto
@@ -524,6 +579,7 @@ download/NDK39.lha:
mkdir -p download
cd download && wget http://www.haage-partner.de/download/AmigaOS/NDK39.lha
# =================================================
# NDK1.3 - emulated from NDK
# =================================================
@@ -557,7 +613,7 @@ build/ndk-include/_ndk13: build/ndk-include/_ndk
# =================================================
build/_netinclude: projects/amiga-netinclude/README.md build/ndk-include/_ndk $(shell find 2>/dev/null projects/amiga-netinclude/include -type f)
mkdir -p $(PREFIX)/m68k-amigaos/ndk-include
rsync -a $(PWD)/projects/amiga-netinclude/include/* $(PREFIX)/m68k-amigaos/ndk-include
rsync -a projects/amiga-netinclude/include/* $(PREFIX)/m68k-amigaos/ndk-include
echo "done" >$@
projects/amiga-netinclude/README.md:
@@ -666,7 +722,7 @@ build/libdebug/_done: build/libdebug/Makefile
build/libdebug/Makefile: build/libnix/_done projects/libdebug/configure $(shell find 2>/dev/null projects/libdebug -not \( -path projects/libdebug/.git -prune \) -type f)
mkdir -p build/libdebug
cd build/libdebug && CFLAGS="$(TARGET_C_FLAGS)" $(PWD)/projects/libdebug/configure $(CONFIG_LIBDEBUG) $(LOG)
cd build/libdebug && CFLAGS="$(TARGET_C_FLAGS)" ../../projects/libdebug/configure $(CONFIG_LIBDEBUG) $(LOG)
projects/libdebug/configure:
@mkdir -p projects
@@ -740,7 +796,7 @@ endif
build/newlib/newlib/Makefile: projects/newlib-cygwin/configure
mkdir -p build/newlib/newlib
cd build/newlib/newlib && $(NEWLIB_CONFIG) CFLAGS="$(TARGET_C_FLAGS)" $(PWD)/projects/newlib-cygwin/newlib/configure --host=m68k-amigaos --prefix=$(PREFIX) $(LOG)
cd build/newlib/newlib && $(NEWLIB_CONFIG) CFLAGS="$(TARGET_C_FLAGS)" ../../../projects/newlib-cygwin/newlib/configure --host=m68k-amigaos --prefix=$(PREFIX) $(LOG)
projects/newlib-cygwin/newlib/configure:
@mkdir -p projects
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

+91
View File
@@ -0,0 +1,91 @@
; Script generated by the Inno Script Studio Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
#define MyAppName "Amiga GCC"
#define MyAppVersion "6.4.1b"
#define MyAppPublisher "Stephen Moody"
#define MyAppURL "https://github.com/SteveMoody73/"
#define MinGWFolder "C:\Dev\msys64"
[Setup]
; NOTE: The value of AppId uniquely identifies this application.
; Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AppId={{A2A32C01-A3FB-4AC6-9D9E-648DF42F756E}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName=C:\amiga-gcc
DefaultGroupName={#MyAppName}
OutputBaseFilename=setup-amiga-gcc-{#MyAppVersion}-32
Compression=lzma
SolidCompression=yes
ChangesEnvironment=yes
DisableDirPage=no
SetupIconFile=icon.ico
[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
[Icons]
Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"
[Files]
Source: "{#MinGWFolder}\opt\amiga-gcc-32\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "{#MinGWFolder}\mingw32\bin\libwinpthread-1.dll"; DestDir: "{app}\bin"; Flags: ignoreversion
Source: "{#MinGWFolder}\mingw32\bin\libwinpthread-1.dll"; DestDir: "{app}\libexec\gcc\m68k-amigaos\{#MyAppVersion}"; Flags: ignoreversion
Source: "{#MinGWFolder}\mingw32\bin\libwinpthread-1.dll"; DestDir: "{app}\m68k-amigaos\bin"; Flags: ignoreversion
Source: "{#MinGWFolder}\mingw32\bin\libintl-8.dll"; DestDir: "{app}\bin"; Flags: ignoreversion
Source: "{#MinGWFolder}\mingw32\bin\libintl-8.dll"; DestDir: "{app}\libexec\gcc\m68k-amigaos\{#MyAppVersion}"; Flags: ignoreversion
Source: "{#MinGWFolder}\mingw32\bin\libintl-8.dll"; DestDir: "{app}\m68k-amigaos\bin"; Flags: ignoreversion
Source: "{#MinGWFolder}\mingw32\bin\libgcc_s_dw2-1.dll"; DestDir: "{app}\bin"; Flags: ignoreversion
Source: "{#MinGWFolder}\mingw32\bin\libgcc_s_dw2-1.dll"; DestDir: "{app}\libexec\gcc\m68k-amigaos\{#MyAppVersion}"; Flags: ignoreversion
Source: "{#MinGWFolder}\mingw32\bin\libgcc_s_dw2-1.dll"; DestDir: "{app}\m68k-amigaos\bin"; Flags: ignoreversion
[Registry]
Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; \
ValueType: expandsz; ValueName: "Path"; ValueData: "{olddata};{app}\bin"; \
Check: NeedsAddPath(ExpandConstant('{app}\bin'))
[Code]
var
OptionPage: TInputOptionWizardPage;
procedure InitializeWizard;
begin
OptionPage := CreateInputOptionPage(wpSelectDir, 'Add to PATH?', '', '', False, False);
OptionPage.Add('Add Amiga GCC tools to PATH?');
OptionPage.Values[0] := True;
end;
function IsAddToPathSelected: Boolean;
begin
Result := OptionPage.Values[0];
end;
function NeedsAddPath(Param: string): boolean;
var
OrigPath: string;
begin
if IsAddToPathSelected = True then
begin
if not RegQueryStringValue(
HKEY_LOCAL_MACHINE,
'SYSTEM\CurrentControlSet\Control\Session Manager\Environment',
'Path', OrigPath)
then begin
Result := True;
exit;
end;
{ look for the path with leading and trailing semicolon }
{ Pos() returns 0 if not found }
Result :=
(Pos(';' + UpperCase(Param) + ';', ';' + UpperCase(OrigPath) + ';') = 0) and
(Pos(';' + UpperCase(Param) + '\;', ';' + UpperCase(OrigPath) + ';') = 0);
end;
end;
+93
View File
@@ -0,0 +1,93 @@
; Script generated by the Inno Script Studio Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
#define MyAppName "Amiga GCC"
#define MyAppVersion "6.4.1b"
#define MyAppPublisher "Stephen Moody"
#define MyAppURL "https://github.com/SteveMoody73/"
#define MinGWFolder "D:\Dev\Shell\msys64"
[Setup]
; NOTE: The value of AppId uniquely identifies this application.
; Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AppId={{A2A32C01-A3FB-4AC6-9D9E-648DF42F756E}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName=C:\amiga-gcc
DefaultGroupName={#MyAppName}
OutputBaseFilename=setup-amiga-gcc-{#MyAppVersion}-64
Compression=lzma
SolidCompression=yes
ChangesEnvironment=yes
DisableDirPage=no
SetupIconFile=icon.ico
ArchitecturesAllowed=x64
ArchitecturesInstallIn64BitMode=x64
[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
[Icons]
Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"
[Files]
Source: "{#MinGWFolder}\opt\amiga-gcc-64\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "{#MinGWFolder}\mingw64\bin\libwinpthread-1.dll"; DestDir: "{app}\bin"; Flags: ignoreversion
Source: "{#MinGWFolder}\mingw64\bin\libwinpthread-1.dll"; DestDir: "{app}\libexec\gcc\m68k-amigaos\{#MyAppVersion}"; Flags: ignoreversion
Source: "{#MinGWFolder}\mingw64\bin\libwinpthread-1.dll"; DestDir: "{app}\m68k-amigaos\bin"; Flags: ignoreversion
Source: "{#MinGWFolder}\mingw64\bin\libintl-8.dll"; DestDir: "{app}\bin"; Flags: ignoreversion
Source: "{#MinGWFolder}\mingw64\bin\libintl-8.dll"; DestDir: "{app}\libexec\gcc\m68k-amigaos\{#MyAppVersion}"; Flags: ignoreversion
Source: "{#MinGWFolder}\mingw64\bin\libintl-8.dll"; DestDir: "{app}\m68k-amigaos\bin"; Flags: ignoreversion
Source: "{#MinGWFolder}\mingw64\bin\libgcc_s_dw2-1.dll"; DestDir: "{app}\bin"; Flags: ignoreversion
Source: "{#MinGWFolder}\mingw64\bin\libgcc_s_dw2-1.dll"; DestDir: "{app}\libexec\gcc\m68k-amigaos\{#MyAppVersion}"; Flags: ignoreversion
Source: "{#MinGWFolder}\mingw64\bin\libgcc_s_dw2-1.dll"; DestDir: "{app}\m68k-amigaos\bin"; Flags: ignoreversion
[Registry]
Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; \
ValueType: expandsz; ValueName: "Path"; ValueData: "{olddata};{app}\bin"; \
Check: NeedsAddPath(ExpandConstant('{app}\bin'))
[Code]
var
OptionPage: TInputOptionWizardPage;
procedure InitializeWizard;
begin
OptionPage := CreateInputOptionPage(wpSelectDir, 'Add to PATH?', '', '', False, False);
OptionPage.Add('Add Amiga GCC tools to PATH?');
OptionPage.Values[0] := True;
end;
function IsAddToPathSelected: Boolean;
begin
Result := OptionPage.Values[0];
end;
function NeedsAddPath(Param: string): boolean;
var
OrigPath: string;
begin
if IsAddToPathSelected = True then
begin
if not RegQueryStringValue(
HKEY_LOCAL_MACHINE,
'SYSTEM\CurrentControlSet\Control\Session Manager\Environment',
'Path', OrigPath)
then begin
Result := True;
exit;
end;
{ look for the path with leading and trailing semicolon }
{ Pos() returns 0 if not found }
Result :=
(Pos(';' + UpperCase(Param) + ';', ';' + UpperCase(OrigPath) + ';') = 0) and
(Pos(';' + UpperCase(Param) + '\;', ';' + UpperCase(OrigPath) + ';') = 0);
end;
end;
+14
View File
@@ -0,0 +1,14 @@
--- fd2sfd/fd2inline.c 2018-06-28 14:37:19.772087300 +0100
+++ fd2sfd-patched/fd2inline.c 2018-06-28 09:06:12.977739500 +0100
@@ -46,6 +46,11 @@
#define REGS 16 /* d0=0,...,a7=15 */
#define FDS 1000
+
+#ifdef __MINGW32__
+#define bcopy(s1, s2, n) memmove((s2), (s1), (n))
+#endif
+
typedef enum
{
d0, d1, d2, d3, d4, d5, d6, d7, a0, a1, a2, a3, a4, a5, a6, a7, illegal
+12
View File
@@ -0,0 +1,12 @@
--- sfdc/sfdc 2018-06-28 14:37:26.434918400 +0100
+++ sfdc-patched/sfdc 2018-06-28 14:42:58.370540300 +0100
@@ -484,7 +484,8 @@
while (my $line = <SFD>) {
++$line_no;
-
+ $line =~ s/\r//g;
+
for ($line) {
/==copyright\s/ && do {
( $$result{'copyright'} = $_ ) =~ s/==copyright\s+(.*)\s*/$1/;