- Add Zylin CPU gcc support

- Typical usage seems to be experienced engineers who have some very
  particular requirements that can only be met using the ZPU due to
  technical or licensing issues.

  Academic circles have found the ZPU appealing since the actual core
  is trivial and allows them to focus on some other aspect of research
  or student exercises.

  Open source projects and hobbyists also have found use for the ZPU.

- Pre-requisite for gnuradio support tools
This commit is contained in:
Diane Bruce 2012-12-09 19:37:48 +00:00
parent e5919499eb
commit a04d9c790c
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=308556
11 changed files with 429 additions and 0 deletions

View file

@ -4235,6 +4235,7 @@
SUBDIR += zmq-devel
SUBDIR += zookeeper
SUBDIR += zpu-binutils
SUBDIR += zpu-gcc
SUBDIR += ztcl
SUBDIR += zthread
SUBDIR += zziplib

38
devel/zpu-gcc/Makefile Normal file
View file

@ -0,0 +1,38 @@
# $FreeBSD$
PORTNAME= zpu-gcc
PORTVERSION= 1.0
CATEGORIES= devel
#MASTER_SITES= http://people.freebsd.org/~db/
MASTER_SITES= http://opensource.zylin.com/zpudownload.html/
MASTER_SITES= ${MASTER_SITE_LOCAL}
MASTER_SITE_SUBDIR= db
DISTNAME= zpu-toolchain-${PORTVERSION}
MAINTAINER= db@freebsd.org
COMMENT= ZPU gcc compiler
BUILD_DEPENDS= ${LOCALBASE}/zpu/bin/zpu-elf-as:${PORTSDIR}/devel/zpu-binutils
WRKSRC= ${WRKDIR}/${DISTNAME}/toolchain
USE_GMAKE= yes
USE_GETTEXT= yes
MANPREFIX= ${PREFIX}/zpu
MAN1= zpu-elf-cpp.1 zpu-elf-gcc.1 zpu-elf-gcov.1
MAN7= fsf-funding.7 gfdl.7 gpl.7
INFO= zpuc/cpp zpuc/cppinternals zpuc/gcc zpuc/gccinstall zpuc/gccint
post-patch:
@${REINPLACE_CMD} -e 's/%%CC%%/${CC}/' ${WRKSRC}/build.sh
${CP} ${FILESDIR}/install.sh ${WRKSRC}
@${REINPLACE_CMD} -e 's/%%GMAKE%%/${GMAKE}/' ${WRKSRC}/build.sh \
${WRKSRC}/install.sh
@${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' ${WRKSRC}/build.sh
do-install:
cd ${WRKSRC} && ${SH} install.sh
do-build:
cd ${WRKSRC} && ${SH} build.sh
.include <bsd.port.mk>

2
devel/zpu-gcc/distinfo Normal file
View file

@ -0,0 +1,2 @@
SHA256 (zpu-toolchain-1.0.tar.gz) = fec2f0f18777456a54dcaf92970aa78047d5764e741cc4807ac21bf69a989f0e
SIZE (zpu-toolchain-1.0.tar.gz) = 52147780

View file

@ -0,0 +1,18 @@
set -e
rm -rf build
mkdir build
cd build
../binutils/configure --target=zpu-elf --prefix=/usr/local
#gmake
#gmake install
cd ..
export PATH=`pwd`/install/bin:$PATH
rm -rf gccbuild
mkdir gccbuild
cd gccbuild
../gcc/configure --target=zpu-elf --prefix=/usr/local --enable-languages=c,c++ --with-gnu-as --with-gnu-ld --with-newlib --disable-shared --enable-newlib -v --enable-checking=misc,tree,rtl,rtlflag,gc,gcac,fold --disable-multilib --disable-threads --enable-sjlj-exceptions --enable-libstdcxx-allocator=malloc
../gcc/configure --target=zpu-elf --prefix=`pwd`/../install --enable-languages=c --with-gnu-as --with-gnu-ld --with-newlib --disable-shared --enable-newlib -v --enable-checking=misc,tree,rtl,rtlflag,gc,gcac,fold --disable-multilib --disable-threads --enable-sjlj-exceptions --enable-libstdcxx-allocator=malloc
#gmake
#gmake install

View file

@ -0,0 +1,3 @@
export PATH=/usr/local/zpu/bin:$PATH
cd gccbuild
gmake install

View file

@ -0,0 +1,13 @@
--- binutils/Makefile.in.orig 2012-10-11 18:40:22.000000000 -0500
+++ binutils/Makefile.in 2012-10-13 10:55:52.000000000 -0500
@@ -141,8 +141,8 @@
# compilers to use to create programs which must be run in the build
# environment.
-CC_FOR_BUILD = @CC_FOR_BUILD@
-CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@
+CC_FOR_BUILD = ${CC}
+CFLAGS_FOR_BUILD = ${CFLAGS}
CXX_FOR_BUILD = $(CXX)

View file

@ -0,0 +1,9 @@
--- binutils/ld/emulparams/zpuelf.sh.orig 2012-10-12 15:43:08.000000000 -0500
+++ binutils/ld/emulparams/zpuelf.sh 2012-10-12 15:43:55.000000000 -0500
@@ -27,4 +27,5 @@
DTOR_START='___dtors = .;'
DTOR_END='___dtors_end = .;'
-STACK_ADDR=(0x1000000-0x10000)
+STACK_ADDR=0x1000000-0x10000
+#STACK_ADDR=(0x1000000-0x10000)

View file

@ -0,0 +1,34 @@
--- build.sh.orig 2012-10-11 18:40:23.000000000 -0500
+++ build.sh 2012-10-19 19:35:57.000000000 -0500
@@ -1,18 +1,19 @@
+export CC=cc
set -e
-rm -rf build
-mkdir build
-cd build
-../binutils/configure --target=zpu-elf --prefix=`pwd`/../install
-make
-make install
-cd ..
+#rm -rf build
+#mkdir build
+#cd build
+#../binutils/configure --target=zpu-elf --prefix=%%PREFIX%%/zpu
+#gmake
+#gmake install
+#cd ..
-export PATH=`pwd`/install/bin:$PATH
+export PATH=/usr/local/zpu/bin:$PATH
rm -rf gccbuild
mkdir gccbuild
cd gccbuild
-#../gcc/configure --target=zpu-elf --prefix=`pwd`/../install --enable-languages=c,c++ --with-gnu-as --with-gnu-ld --with-newlib --disable-shared --enable-newlib -v --enable-checking=misc,tree,rtl,rtlflag,gc,gcac,fold --disable-multilib --disable-threads --enable-sjlj-exceptions --enable-libstdcxx-allocator=malloc
-../gcc/configure --target=zpu-elf --prefix=`pwd`/../install --enable-languages=c --with-gnu-as --with-gnu-ld --with-newlib --disable-shared --enable-newlib -v --enable-checking=misc,tree,rtl,rtlflag,gc,gcac,fold --disable-multilib --disable-threads --enable-sjlj-exceptions --enable-libstdcxx-allocator=malloc
-make
-make install
+##../gcc/configure --target=zpu-elf --prefix=%%PREFIX%%/zpu --enable-languages=c,c++ --with-gnu-as --with-gnu-ld --with-newlib --disable-shared --enable-newlib -v --enable-checking=misc,tree,rtl,rtlflag,gc,gcac,fold --disable-multilib --disable-threads --enable-sjlj-exceptions --enable-libstdcxx-allocator=malloc
+../gcc/configure --target=zpu-elf --prefix=%%PREFIX%%/zpu --infodir=%%PREFIX%%/info/zpuc --enable-languages=c --with-gnu-as --with-gnu-ld --with-newlib --disable-shared --enable-newlib -v --enable-checking=misc,tree,rtl,rtlflag,gc,gcac,fold --disable-multilib --disable-threads --enable-sjlj-exceptions --enable-libstdcxx-allocator=malloc
+%%GMAKE%%
+#gmake install

View file

@ -0,0 +1,115 @@
--- gcc/Makefile.in.orig 2012-10-28 17:13:43.000000000 -0500
+++ gcc/Makefile.in 2012-10-28 17:16:21.000000000 -0500
@@ -103,7 +103,7 @@
$(RPATH_ENVVAR)=`echo "$(HOST_LIB_PATH):$(TARGET_LIB_PATH):$$$(RPATH_ENVVAR)" | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'`; export $(RPATH_ENVVAR);
# This is the list of directories to be built for the build system.
-BUILD_CONFIGDIRS = libiberty
+#BUILD_CONFIGDIRS = libiberty
# Build programs are put under this directory.
BUILD_SUBDIR = @build_subdir@
# This is set by the configure script to the arguments to use when configuring
@@ -562,7 +562,6 @@
maybe-configure-itcl \
maybe-configure-ld \
maybe-configure-libgui \
- maybe-configure-libiberty \
maybe-configure-libtool \
maybe-configure-m4 \
maybe-configure-make \
@@ -603,7 +602,6 @@
maybe-configure-target-libtermcap \
maybe-configure-target-winsup \
maybe-configure-target-libgloss \
- maybe-configure-target-libiberty \
maybe-configure-target-gperf \
maybe-configure-target-examples \
maybe-configure-target-libffi \
@@ -651,7 +649,6 @@
maybe-all-itcl \
maybe-all-ld \
maybe-all-libgui \
- maybe-all-libiberty \
maybe-all-libtool \
maybe-all-m4 \
maybe-all-make \
@@ -692,7 +689,6 @@
maybe-all-target-libtermcap \
maybe-all-target-winsup \
maybe-all-target-libgloss \
- maybe-all-target-libiberty \
maybe-all-target-gperf \
maybe-all-target-examples \
maybe-all-target-libffi \
@@ -744,7 +740,6 @@
maybe-info-itcl \
maybe-info-ld \
maybe-info-libgui \
- maybe-info-libiberty \
maybe-info-libtool \
maybe-info-m4 \
maybe-info-make \
@@ -786,7 +781,6 @@
maybe-info-target-libtermcap \
maybe-info-target-winsup \
maybe-info-target-libgloss \
- maybe-info-target-libiberty \
maybe-info-target-gperf \
maybe-info-target-examples \
maybe-info-target-libffi \
@@ -2620,7 +2614,6 @@
maybe-dvi-itcl \
maybe-dvi-ld \
maybe-dvi-libgui \
- maybe-dvi-libiberty \
maybe-dvi-libtool \
maybe-dvi-m4 \
maybe-dvi-make \
@@ -2662,7 +2655,6 @@
maybe-dvi-target-libtermcap \
maybe-dvi-target-winsup \
maybe-dvi-target-libgloss \
- maybe-dvi-target-libiberty \
maybe-dvi-target-gperf \
maybe-dvi-target-examples \
maybe-dvi-target-libffi \
@@ -4496,7 +4488,6 @@
maybe-TAGS-itcl \
maybe-TAGS-ld \
maybe-TAGS-libgui \
- maybe-TAGS-libiberty \
maybe-TAGS-libtool \
maybe-TAGS-m4 \
maybe-TAGS-make \
@@ -4538,7 +4529,6 @@
maybe-TAGS-target-libtermcap \
maybe-TAGS-target-winsup \
maybe-TAGS-target-libgloss \
- maybe-TAGS-target-libiberty \
maybe-TAGS-target-gperf \
maybe-TAGS-target-examples \
maybe-TAGS-target-libffi \
@@ -6372,7 +6362,6 @@
maybe-install-info-itcl \
maybe-install-info-ld \
maybe-install-info-libgui \
- maybe-install-info-libiberty \
maybe-install-info-libtool \
maybe-install-info-m4 \
maybe-install-info-make \
@@ -17425,7 +17414,6 @@
maybe-install-itcl \
maybe-install-ld \
maybe-install-libgui \
- maybe-install-libiberty \
maybe-install-libtool \
maybe-install-m4 \
maybe-install-make \
@@ -17492,7 +17480,6 @@
maybe-install-itcl \
maybe-install-ld \
maybe-install-libgui \
- maybe-install-libiberty \
maybe-install-libtool \
maybe-install-m4 \
maybe-install-make \

12
devel/zpu-gcc/pkg-descr Normal file
View file

@ -0,0 +1,12 @@
zpu-gcc compiler suite for the zpu
Typical usage seems to be experienced engineers who have some very
particular requirements that can only be met using the ZPU due to technical
or licensing issues.
Academic circles have found the ZPU appealing since the actual core is
trivial and allows them to focus on some other aspect of research or
student exercises.
WWW: http://opensource.zylin.com/zpu.htm

184
devel/zpu-gcc/pkg-plist Normal file
View file

@ -0,0 +1,184 @@
info/zpuc/dir
zpu/bin/zpu-elf-cpp
zpu/bin/zpu-elf-gcc
zpu/bin/zpu-elf-gcc-3.4.2
zpu/bin/zpu-elf-gccbug
zpu/bin/zpu-elf-gcov
zpu/lib/gcc/zpu-elf/3.4.2/crtbegin.o
zpu/lib/gcc/zpu-elf/3.4.2/crtend.o
zpu/lib/gcc/zpu-elf/3.4.2/crti.o
zpu/lib/gcc/zpu-elf/3.4.2/crtn.o
zpu/lib/gcc/zpu-elf/3.4.2/include/README
zpu/lib/gcc/zpu-elf/3.4.2/include/fixed
zpu/lib/gcc/zpu-elf/3.4.2/include/float.h
zpu/lib/gcc/zpu-elf/3.4.2/include/iso646.h
zpu/lib/gcc/zpu-elf/3.4.2/include/limits.h
zpu/lib/gcc/zpu-elf/3.4.2/include/stdarg.h
zpu/lib/gcc/zpu-elf/3.4.2/include/stdbool.h
zpu/lib/gcc/zpu-elf/3.4.2/include/stddef.h
zpu/lib/gcc/zpu-elf/3.4.2/include/syslimits.h
zpu/lib/gcc/zpu-elf/3.4.2/include/unwind.h
zpu/lib/gcc/zpu-elf/3.4.2/include/varargs.h
zpu/lib/gcc/zpu-elf/3.4.2/install-tools/gsyslimits.h
zpu/lib/gcc/zpu-elf/3.4.2/install-tools/include/README
zpu/lib/gcc/zpu-elf/3.4.2/install-tools/include/float.h
zpu/lib/gcc/zpu-elf/3.4.2/install-tools/include/iso646.h
zpu/lib/gcc/zpu-elf/3.4.2/install-tools/include/limits.h
zpu/lib/gcc/zpu-elf/3.4.2/install-tools/include/stdarg.h
zpu/lib/gcc/zpu-elf/3.4.2/install-tools/include/stdbool.h
zpu/lib/gcc/zpu-elf/3.4.2/install-tools/include/stddef.h
zpu/lib/gcc/zpu-elf/3.4.2/install-tools/include/unwind.h
zpu/lib/gcc/zpu-elf/3.4.2/install-tools/include/varargs.h
zpu/lib/gcc/zpu-elf/3.4.2/install-tools/mkheaders.conf
zpu/lib/gcc/zpu-elf/3.4.2/libgcc.a
zpu/lib/gcc/zpu-elf/3.4.2/libgcov.a
zpu/lib/gcc/zpu-elf/3.4.2/specs
zpu/libexec/gcc/zpu-elf/3.4.2/cc1
zpu/libexec/gcc/zpu-elf/3.4.2/collect2
zpu/libexec/gcc/zpu-elf/3.4.2/install-tools/fix-header
zpu/libexec/gcc/zpu-elf/3.4.2/install-tools/fixinc.sh
zpu/libexec/gcc/zpu-elf/3.4.2/install-tools/fixincl
zpu/libexec/gcc/zpu-elf/3.4.2/install-tools/fixproto
zpu/libexec/gcc/zpu-elf/3.4.2/install-tools/mkheaders
zpu/libexec/gcc/zpu-elf/3.4.2/install-tools/mkinstalldirs
zpu/share/locale/be/LC_MESSAGES/gcc.mo
zpu/share/locale/ca/LC_MESSAGES/gcc.mo
zpu/share/locale/da/LC_MESSAGES/gcc.mo
zpu/share/locale/de/LC_MESSAGES/gcc.mo
zpu/share/locale/el/LC_MESSAGES/gcc.mo
zpu/share/locale/es/LC_MESSAGES/gcc.mo
zpu/share/locale/fr/LC_MESSAGES/gcc.mo
zpu/share/locale/ja/LC_MESSAGES/gcc.mo
zpu/share/locale/nl/LC_MESSAGES/gcc.mo
zpu/share/locale/sv/LC_MESSAGES/gcc.mo
zpu/share/locale/tr/LC_MESSAGES/gcc.mo
zpu/zpu-elf/bin/gcc
zpu/zpu-elf/include/_ansi.h
zpu/zpu-elf/include/_syslist.h
zpu/zpu-elf/include/alloca.h
zpu/zpu-elf/include/ar.h
zpu/zpu-elf/include/argz.h
zpu/zpu-elf/include/assert.h
zpu/zpu-elf/include/ctype.h
zpu/zpu-elf/include/dirent.h
zpu/zpu-elf/include/envz.h
zpu/zpu-elf/include/errno.h
zpu/zpu-elf/include/fastmath.h
zpu/zpu-elf/include/fcntl.h
zpu/zpu-elf/include/grp.h
zpu/zpu-elf/include/iconv.h
zpu/zpu-elf/include/ieeefp.h
zpu/zpu-elf/include/langinfo.h
zpu/zpu-elf/include/limits.h
zpu/zpu-elf/include/locale.h
zpu/zpu-elf/include/machine/ansi.h
zpu/zpu-elf/include/machine/fastmath.h
zpu/zpu-elf/include/machine/ieeefp.h
zpu/zpu-elf/include/machine/malloc.h
zpu/zpu-elf/include/machine/setjmp-dj.h
zpu/zpu-elf/include/machine/setjmp.h
zpu/zpu-elf/include/machine/stdlib.h
zpu/zpu-elf/include/machine/termios.h
zpu/zpu-elf/include/machine/time.h
zpu/zpu-elf/include/machine/types.h
zpu/zpu-elf/include/malloc.h
zpu/zpu-elf/include/math.h
zpu/zpu-elf/include/newlib.h
zpu/zpu-elf/include/paths.h
zpu/zpu-elf/include/process.h
zpu/zpu-elf/include/pthread.h
zpu/zpu-elf/include/pwd.h
zpu/zpu-elf/include/reent.h
zpu/zpu-elf/include/regdef.h
zpu/zpu-elf/include/search.h
zpu/zpu-elf/include/setjmp.h
zpu/zpu-elf/include/signal.h
zpu/zpu-elf/include/stdio.h
zpu/zpu-elf/include/stdlib.h
zpu/zpu-elf/include/string.h
zpu/zpu-elf/include/sys/_types.h
zpu/zpu-elf/include/sys/cdefs.h
zpu/zpu-elf/include/sys/config.h
zpu/zpu-elf/include/sys/dirent.h
zpu/zpu-elf/include/sys/errno.h
zpu/zpu-elf/include/sys/fcntl.h
zpu/zpu-elf/include/sys/features.h
zpu/zpu-elf/include/sys/file.h
zpu/zpu-elf/include/sys/lock.h
zpu/zpu-elf/include/sys/param.h
zpu/zpu-elf/include/sys/queue.h
zpu/zpu-elf/include/sys/reent.h
zpu/zpu-elf/include/sys/resource.h
zpu/zpu-elf/include/sys/sched.h
zpu/zpu-elf/include/sys/signal.h
zpu/zpu-elf/include/sys/stat.h
zpu/zpu-elf/include/sys/stdio.h
zpu/zpu-elf/include/sys/syslimits.h
zpu/zpu-elf/include/sys/time.h
zpu/zpu-elf/include/sys/timeb.h
zpu/zpu-elf/include/sys/times.h
zpu/zpu-elf/include/sys/types.h
zpu/zpu-elf/include/sys/unistd.h
zpu/zpu-elf/include/sys/utime.h
zpu/zpu-elf/include/sys/wait.h
zpu/zpu-elf/include/termios.h
zpu/zpu-elf/include/time.h
zpu/zpu-elf/include/unctrl.h
zpu/zpu-elf/include/unistd.h
zpu/zpu-elf/include/utime.h
zpu/zpu-elf/include/utmp.h
zpu/zpu-elf/include/wchar.h
zpu/zpu-elf/include/wctype.h
zpu/zpu-elf/lib/crt0.o
zpu/zpu-elf/lib/crt_io.o
zpu/zpu-elf/lib/libbcc.a
zpu/zpu-elf/lib/libc.a
zpu/zpu-elf/lib/libg.a
zpu/zpu-elf/lib/libm.a
@dirrmtry zpu/bin
@dirrm zpu/lib/gcc/zpu-elf/3.4.2/install-tools/include
@dirrm zpu/lib/gcc/zpu-elf/3.4.2/install-tools
@dirrm zpu/lib/gcc/zpu-elf/3.4.2/include
@dirrm zpu/lib/gcc/zpu-elf/3.4.2
@dirrm zpu/lib/gcc/zpu-elf
@dirrm zpu/lib/gcc
@dirrmtry zpu/lib
@dirrmtry zpu/zpu-elf/bin
@dirrm zpu/zpu-elf/include/sys
@dirrm zpu/zpu-elf/include/machine
@dirrm zpu/zpu-elf/include
@dirrmtry zpu/zpu-elf
@dirrmtry zpu/share/locale/tr/LC_MESSAGES
@dirrmtry zpu/share/locale/sv/LC_MESSAGES
@dirrmtry zpu/share/locale/nl/LC_MESSAGES
@dirrmtry zpu/share/locale/ja/LC_MESSAGES
@dirrmtry zpu/share/locale/fr/LC_MESSAGES
@dirrmtry zpu/share/locale/es/LC_MESSAGES
@dirrmtry zpu/share/locale/el/LC_MESSAGES
@dirrmtry zpu/share/locale/da/LC_MESSAGES
@dirrmtry zpu/share/locale/de/LC_MESSAGES
@dirrmtry zpu/share/locale/ca/LC_MESSAGES
@dirrmtry zpu/share/locale/be/LC_MESSAGES
@dirrmtry zpu/share/locale/tr
@dirrmtry zpu/share/locale/sv
@dirrmtry zpu/share/locale/nl
@dirrmtry zpu/share/locale/ja
@dirrmtry zpu/share/locale/fr
@dirrmtry zpu/share/locale/es
@dirrmtry zpu/share/locale/el
@dirrmtry zpu/share/locale/de
@dirrmtry zpu/share/locale/da
@dirrmtry zpu/share/locale/ca
@dirrmtry zpu/share/locale/be
@dirrmtry zpu/share/locale
@dirrmtry zpu/share
@dirrm zpu/libexec/gcc/zpu-elf/3.4.2/install-tools
@dirrm zpu/libexec/gcc/zpu-elf/3.4.2
@dirrm zpu/libexec/gcc/zpu-elf
@dirrm zpu/libexec/gcc
@dirrm zpu/libexec
@dirrm zpu/include
@dirrmtry zpu/man/man1
@dirrmtry zpu/man/man7
@dirrmtry zpu/man
@dirrmtry zpu