summaryrefslogtreecommitdiffstats
path: root/Makefile.7.2
diff options
context:
space:
mode:
authorJoerg Koenig <jck@techsat.com>2017-11-06 09:02:29 (GMT)
committerJoerg Koenig <jck@techsat.com>2017-11-06 09:02:29 (GMT)
commit077bbaa98b29ebd693f5f56f08831aa01a0a7e78 (patch)
treecb9dfc8ad8c49381d4f0234bb3f669062ed74206 /Makefile.7.2
parent77654c07ff57a248e833885f9b9e482f122b353f (diff)
downloadcrossppc-077bbaa98b29ebd693f5f56f08831aa01a0a7e78.zip
crossppc-077bbaa98b29ebd693f5f56f08831aa01a0a7e78.tar.gz
crossppc-077bbaa98b29ebd693f5f56f08831aa01a0a7e78.tar.bz2
Changed gcc to vxWorks 5.5 compatible compiler version 3.0.4 and binutils 2.10.1
Change-Id: I64eaeb35e7728c25f372983cfc658fd5387f8515
Diffstat (limited to 'Makefile.7.2')
-rw-r--r--Makefile.7.298
1 files changed, 98 insertions, 0 deletions
diff --git a/Makefile.7.2 b/Makefile.7.2
new file mode 100644
index 0000000..75606c2
--- /dev/null
+++ b/Makefile.7.2
@@ -0,0 +1,98 @@
+CWD = $(shell readlink -f .)
+VERSION=0.4.1
+SRCDIR=$(CWD)/SOURCES
+BUILDDIR=$(CWD)/build
+WIND_BASE=$(HOME)/tornado/2.2.1
+WIND_USR=$(WIND_BASE)/target
+#WIND_BASE=/master/tornado/2.2.1
+#WIND_USR=$(WIND_BASE)/target
+GCC_TARGET=powerpc-wrs-vxworks55
+MASCH=$(shell uname -m)
+GCC_PKGVERSION="TechSAT VxWorks 5.5/Tornado 2.2.1 Cross-Toolchain $(MASCH) v$(VERSION)"
+INSTDIR=$(CWD)/inst/$(MASCH)/crossppc
+PACKAGE=$(CWD)/crossppc-vxworks-$(VERSION)-bin-linux-$(MASCH).tar.gz
+
+JOBS=-j4
+
+all: prepare binutils xgcc pack clean
+
+prepare:
+ mkdir -p $(BUILDDIR)
+ mkdir -p $(INSTDIR)
+ rm -Rf $(CWD)/unpacked
+ mkdir -p $(CWD)/unpacked
+ cd $(CWD)/unpacked && \
+ tar -zxf $(SRCDIR)/gcc-7.2.0.tar.gz
+ cd $(CWD)/unpacked/gcc-7.2.0 && \
+ patch -p1 < $(SRCDIR)/gcc72-vxworks.patch
+ cd $(CWD)/unpacked/gcc-7.2.0 && \
+ patch -p1 < $(SRCDIR)/gcc72-vxworks55-config.patch
+ cd $(CWD)/unpacked/gcc-7.2.0 && \
+ patch -p1 < $(SRCDIR)/gcc72-vxworks55-libgcc-config.patch
+ cd $(CWD)/unpacked && \
+ tar -zxf $(SRCDIR)/gmp-6.1.2.tar.gz
+ cd $(CWD)/unpacked && \
+ tar -jxf $(SRCDIR)/binutils-2.29.tar.bz2
+ cd $(CWD)/unpacked && \
+ tar -jxf $(SRCDIR)/isl-0.18.tar.bz2
+ cd $(CWD)/unpacked && \
+ tar -zxf $(SRCDIR)/mpc-1.0.3.tar.gz
+ cd $(CWD)/unpacked && \
+ tar -jxf $(SRCDIR)/mpfr-3.1.6.tar.bz2
+ mv $(CWD)/unpacked/gmp-6.1.2 $(CWD)/unpacked/gcc-7.2.0/gmp
+ mv $(CWD)/unpacked/isl-0.18 $(CWD)/unpacked/gcc-7.2.0/isl
+ mv $(CWD)/unpacked/mpc-1.0.3 $(CWD)/unpacked/gcc-7.2.0/mpc
+ mv $(CWD)/unpacked/mpfr-3.1.6 $(CWD)/unpacked/gcc-7.2.0/mpfr
+
+binutils:
+ rm -Rf $(BUILDDIR)/binutils
+ mkdir -p $(BUILDDIR)/binutils
+ cd $(BUILDDIR)/binutils && \
+ $(CWD)/unpacked/binutils-2.29/configure \
+ --with-pkgversion=$(GCC_PKGVERSION) \
+ --prefix=$(INSTDIR) \
+ --target=$(GCC_TARGET) \
+ --with-headers=$(WIND_BASE)/target/h \
+ --with-libs=$(WIND_BASE)/target/lib
+ cd $(BUILDDIR)/binutils && \
+ make $(JOBS) && \
+ make install-strip
+
+xgcc:
+ rm -Rf $(BUILDDIR)/gcc
+ mkdir -p $(BUILDDIR)/gcc
+ cd $(BUILDDIR)/gcc && \
+ export WIND_BASE=$(WIND_BASE) && \
+ export WIND_USR=$(WIND_USR) && \
+ export PATH=$(INSTDIR)/bin:$(PATH) && \
+ LDFLAGS="-static-libgcc -static-libstdc++" \
+ $(CWD)/unpacked/gcc-7.2.0/configure \
+ --with-pkgversion=$(GCC_PKGVERSION) \
+ --prefix=$(INSTDIR) \
+ --target=$(GCC_TARGET) \
+ --with-headers=$(WIND_BASE)/target/h \
+ --disable-plugin \
+ --enable-languages="c,c++" \
+ --disable-multilib \
+ --with-endian=big \
+ --with-gnu-as \
+ --with-gnu-ld \
+ --enable-threads=vxworks
+ cd $(BUILDDIR)/gcc && \
+ export WIND_BASE=$(WIND_BASE) && \
+ export WIND_USR=$(WIND_USR) && \
+ export PATH=$(INSTDIR)/bin:$(PATH) && \
+ make $(JOBS) && \
+ make install-strip
+ rm -Rf $(INSTDIR)/$(GCC_TARGET)/sys-include
+
+pack:
+ cd $(INSTDIR) && \
+ tar -zcf $(PACKAGE) .
+
+clean:
+ rm -Rf $(BUILDDIR)
+ rm -Rf $(CWD)/unpacked
+ #rm -Rf $(CWD)/inst
+
+