From 8fd7d0f9cdf4534147258b2d40f05e1d52a161d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krystian=20Bac=C5=82awski?= Date: Sat, 7 Sep 2013 10:00:40 +0200 Subject: [PATCH] Argasek's patch. --- README.md | 10 ++++++++-- bootstrap.sh | 3 +++ patches/sfdc-1.4/Dump.pl.diff | 11 +++++++++++ patches/sfdc-1.4/Makefile.in.diff | 11 +++++++++++ patches/sfdc-1.4/SFDCompile.pod.diff | 11 +++++++++++ patches/sfdc-1.4/main.pl.diff | 22 ++++++++++++++++++++++ 6 files changed, 66 insertions(+), 2 deletions(-) create mode 100644 patches/sfdc-1.4/Dump.pl.diff create mode 100644 patches/sfdc-1.4/Makefile.in.diff create mode 100644 patches/sfdc-1.4/SFDCompile.pod.diff create mode 100644 patches/sfdc-1.4/main.pl.diff diff --git a/README.md b/README.md index 5663aef..509ab4f 100644 --- a/README.md +++ b/README.md @@ -29,12 +29,14 @@ There are no downloads provided for the time being. I do as much as possible to * Cygwin 1.7.18 (gcc 4.5.3) * Ubuntu 12.04 LTS 32-bit (gcc 4.6.3) - * Ubuntu 12.04 LTS 64-bit (gcc 4.6.3) *requires gcc-multilib* + * Ubuntu 12.04 LTS 64-bit (gcc 4.6.3) *Requires gcc-multilib package!* * MacOS X 10.7.5 (MacPorts - gcc 4.7.3) + * MacOS X 10.8.4 (Homebrew - gcc 4.2.1 from XCode) *Thanks go to Argasek!* ### Documentation Documentation from Free Software Fundation: + * [gcc 2.95.3](http://gcc.gnu.org/onlinedocs/gcc-2.95.3/gcc.html) * [gcc 3.4.6](http://gcc.gnu.org/onlinedocs/gcc-3.4.6/gcc/) * [binutils](http://sourceware.org/binutils/docs/) @@ -64,8 +66,12 @@ You have to have following packages installed in your system: * lha * perl 5.10 +*For MacOSX users*: you'll likely need to have [MacPorts](http://www.macports.org) or [Homebrew](http://brew.sh) installed in order to build the toolchain. + #### How to build? +**Warning:** *Building with `sudo` is not recommended. I'm not responsible for any damage in your system.* + Follow steps listed below: 1. Fetch *m68k-amigaos-toolchain* project to your local drive: @@ -78,7 +84,7 @@ Follow steps listed below: `cd archives` `./fetch.sh` -3. Run `bootstrap.sh` script (with `--prefix` option to specify where to install the toolchain). +3. Run `bootstrap.sh` script (with `--prefix` option to specify where to install the toolchain). Note, that the destination directory must be writeable by the user. `cd ..` `./bootstrap.sh --prefix=/opt/m68k-amigaos build` diff --git a/bootstrap.sh b/bootstrap.sh index 40bdd8e..9cbbca2 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -111,6 +111,9 @@ function unpack_sources { for file in $(ls -1d sfdc*); do [ -f "${file}" ] && rm "${file}" done + pushd "${SFDC}" + apply_patches "${SFDC}" + popd unpack_clean "${NDK}" "${NDK_SRC}" rm -rf ndk_* *.info diff --git a/patches/sfdc-1.4/Dump.pl.diff b/patches/sfdc-1.4/Dump.pl.diff new file mode 100644 index 0000000..ad663b4 --- /dev/null +++ b/patches/sfdc-1.4/Dump.pl.diff @@ -0,0 +1,11 @@ +--- sfdc-1.4/Dump.pl 2005-09-24 16:49:49.000000000 +0200 ++++ sfdc-1.4/Dump.pl 2013-08-30 15:46:41.000000000 +0200 +@@ -19,7 +19,7 @@ + my $sfd = $self->{SFD}; + + print "SFD information\n"; +- print "ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ\n"; ++ print "---------------\n"; + print "Copyright: $$sfd{'copyright'}\n"; + print "RCS ID: $$sfd{'id'}\n"; + print "Module name: $$sfd{'libname'}\n"; diff --git a/patches/sfdc-1.4/Makefile.in.diff b/patches/sfdc-1.4/Makefile.in.diff new file mode 100644 index 0000000..bcdbb0c --- /dev/null +++ b/patches/sfdc-1.4/Makefile.in.diff @@ -0,0 +1,11 @@ +--- sfdc-1.4/Makefile.in 2005-09-24 16:49:49.000000000 +0200 ++++ sfdc-1.4/Makefile.in 2013-08-30 15:09:31.000000000 +0200 +@@ -32,7 +32,7 @@ + $(RM) config.status Makefile + + install: all +- $(INSTALL) --directory $(bindir) $(mandir)/man1 ++ $(INSTALL) -d $(bindir) $(mandir)/man1 + $(INSTALL_PROGRAM) $(EXECUTABLE) $(bindir) + $(INSTALL_DATA) $(MAN) $(mandir)/man1 + diff --git a/patches/sfdc-1.4/SFDCompile.pod.diff b/patches/sfdc-1.4/SFDCompile.pod.diff new file mode 100644 index 0000000..2816e69 --- /dev/null +++ b/patches/sfdc-1.4/SFDCompile.pod.diff @@ -0,0 +1,11 @@ +--- sfdc-1.4/SFDCompile.pod 2005-09-24 16:49:49.000000000 +0200 ++++ sfdc-1.4/SFDCompile.pod 2013-08-30 15:49:31.000000000 +0200 +@@ -326,7 +326,7 @@ + =head1 NOTES + + Had I seen F before I started writing this program, I +-might still have been using fd/clib files. Or maybe not. ++might still have been using fd/clib files. Or maybe not. + + =head1 AUTHOR + diff --git a/patches/sfdc-1.4/main.pl.diff b/patches/sfdc-1.4/main.pl.diff new file mode 100644 index 0000000..d10c65c --- /dev/null +++ b/patches/sfdc-1.4/main.pl.diff @@ -0,0 +1,22 @@ +--- sfdc-1.4/main.pl 2005-09-24 16:49:49.000000000 +0200 ++++ sfdc-1.4/main.pl 2013-08-30 15:13:28.000000000 +0200 +@@ -418,7 +418,7 @@ + my $comment = ''; + + my $result = { +- copyright => 'Copyright İ 2001 Amiga, Inc.', ++ copyright => 'Copyright (c) 2001 Amiga, Inc.', + id => '', + libname => '', + base => '', +@@ -849,8 +849,8 @@ + + + # Make sure we have the same number of arguments as registers, or, +- # if this is a varargs function, possible one extra, á la "MethodID, ...". +- # Tagcalls always have one extra, á la "Tag, ...". ++ # if this is a varargs function, possible one extra, a la "MethodID, ...". ++ # Tagcalls always have one extra, a la "Tag, ...". + + if (($prototype->{type} eq 'varargs' && + $prototype->{subtype} eq 'tagcall' &&