summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2017-09-17 12:17:45 +0100
committerVincent Sanders <vince@kyllikki.org>2017-09-17 12:17:45 +0100
commit4838ef05426ab4bef15f7385631c5ba0965b9699 (patch)
tree878129acd1cff45ce8f007373c23d236a5105631
parent3749e6a9e8f28a398dfa814b28e3928167f94873 (diff)
downloadtoolchains-4838ef05426ab4bef15f7385631c5ba0965b9699.tar.gz
toolchains-4838ef05426ab4bef15f7385631c5ba0965b9699.tar.bz2
add bison building to m68k amigaos cross compile
-rw-r--r--m68k-unknown-amigaos/Makefile35
1 files changed, 34 insertions, 1 deletions
diff --git a/m68k-unknown-amigaos/Makefile b/m68k-unknown-amigaos/Makefile
index 29c7aad..8cbb7e5 100644
--- a/m68k-unknown-amigaos/Makefile
+++ b/m68k-unknown-amigaos/Makefile
@@ -1,3 +1,8 @@
+#!/bin/make
+# NetSurf cross compilation for amiga m68k
+
+# sources
+
UPSTREAM_GCC_VERSION := 3.4.6
UPSTREAM_GCC_TARBALL := gcc-$(UPSTREAM_GCC_VERSION).tar.bz2
UPSTREAM_GCC_URI := http://ftp.gnu.org/gnu/gcc/gcc-$(UPSTREAM_GCC_VERSION)/$(UPSTREAM_GCC_TARBALL)
@@ -37,6 +42,11 @@ UPSTREAM_GUIGFX_URI := http://neoscientists.org/~bifat/binarydistillery/$(UPSTRE
UPSTREAM_RENDER_TARBALL := renderlib.lha
UPSTREAM_RENDER_URI := http://neoscientists.org/~bifat/binarydistillery/$(UPSTREAM_RENDER_TARBALL)
+# need to build a suitable version of bison or compiler build fails
+UPSTREAM_BISON_VERSION := 2.7.1
+UPSTREAM_BISON_TARBALL := bison-$(UPSTREAM_BISON_VERSION).tar.gz
+UPSTREAM_BISON_URI := https://ftp.gnu.org/gnu/bison/$(UPSTREAM_BISON_TARBALL)
+
# need to force the auto* version in use
GCC_AUTOCONF := autoconf2.64
GCC_AUTOHEADER := autoheader2.64
@@ -49,8 +59,10 @@ SOURCESDIR := $(TOP)/sources
BUILDDIR := $(TOP)/builddir
BUILDSTEPS := $(BUILDDIR)/build-steps
SRCDIR := $(BUILDDIR)/srcdir
+
GCC_SRCDIR := $(SRCDIR)/gcc
BINUTILS_SRCDIR := $(SRCDIR)/binutils
+BISON_SRCDIR := $(SRCDIR)/bison
TARGET_NAME := m68k-unknown-amigaos
@@ -117,7 +129,7 @@ $(BUILDSTEPS)/ndk.d: $(SOURCESDIR)/$(UPSTREAM_NDK_TARBALL) $(SOURCESDIR)/$(UPSTR
# Rules to build and install the bootstrap compiler
###
-$(BUILDSTEPS)/bootstrap-compiler.d: $(BUILDSTEPS)/srcdir-step3.d $(BUILDSTEPS)/binutils.d
+$(BUILDSTEPS)/bootstrap-compiler.d: $(BUILDSTEPS)/bison.d $(BUILDSTEPS)/srcdir-step3.d $(BUILDSTEPS)/binutils.d
cd $(BUILDDIR) && $(GCC_ENV_PARAMS) $(GCC_SRCDIR)/configure \
--prefix=$(PREFIX) \
--target=$(TARGET_NAME) \
@@ -160,6 +172,25 @@ $(BUILDSTEPS)/$(UPSTREAM_GCC_TARBALL).d: $(BUILDSTEPS)/buildsteps.d $(SOURCESDIR
touch $@
###
+# Rules to build bison for the bootstrap compiler build
+###
+
+$(BUILDSTEPS)/bison.d: $(BUILDSTEPS)/srcdir-bison.d
+ mkdir -p $(BUILDDIR)/bison
+ cd $(BUILDDIR)/bison && $(BISON_SRCDIR)/configure --prefix=$(PREFIX)
+ cd $(BUILDDIR)/bison && make
+ cd $(BUILDDIR)/bison && make install
+ touch $@
+
+$(BUILDSTEPS)/srcdir-bison.d: $(BUILDSTEPS)/$(UPSTREAM_BISON_TARBALL).d
+ tar axf $(SOURCESDIR)/$(UPSTREAM_BISON_TARBALL)
+ mv bison-$(UPSTREAM_BISON_VERSION) $(BISON_SRCDIR)
+ touch $@
+
+$(BUILDSTEPS)/$(UPSTREAM_BISON_TARBALL).d: $(BUILDSTEPS)/buildsteps.d $(SOURCESDIR)/$(UPSTREAM_BISON_TARBALL)
+ touch $@
+
+###
# Rules to build and install binutils
###
@@ -211,6 +242,8 @@ $(SOURCESDIR)/$(UPSTREAM_GUIGFX_TARBALL):
$(SOURCESDIR)/$(UPSTREAM_RENDER_TARBALL):
wget -q -O $@ $(UPSTREAM_RENDER_URI)
+$(SOURCESDIR)/$(UPSTREAM_BISON_TARBALL):
+ wget -q -O $@ $(UPSTREAM_BISON_URI) $@
###
# Rule to create buildsteps dir