summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Scott Tincman Tinkham2015-06-16 11:57:24 -0600
committerJonathan Scott Tincman Tinkham2015-06-16 11:57:24 -0600
commit97df9a9f2f8cd9781dc1f3cc28ea9f06e8c9d5e4 (patch)
tree237dab5947b79561ac12189f8efdd1e321a393a3
downloadaur-97df9a9f2f8cd9781dc1f3cc28ea9f06e8c9d5e4.tar.gz
Initial commit. Migrate to AUR4 and update to 2015.1
-rw-r--r--.SRCINFO24
-rw-r--r--PKGBUILD85
2 files changed, 109 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..f11220757e20
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,24 @@
+pkgbase = epiphany-elf-gcc
+ pkgdesc = The GNU Compiler Collection - cross compiler for the Adapteva Epiphany target
+ pkgver = 4.9.2
+ pkgrel = 1
+ url = http://gcc.gnu.org/
+ arch = i686
+ arch = x86_64
+ license = GPL
+ license = LGPL
+ license = FDL
+ makedepends = gmp
+ makedepends = mpfr
+ depends = epiphany-elf-binutils
+ depends = libmpc
+ options = !emptydirs
+ options = !strip
+ options = staticlibs
+ source = ftp://gcc.gnu.org/pub/gcc/snapshots/4.9-20150128/gcc-4.9-20150128.tar.bz2
+ source = ftp://sourceware.org/pub/newlib/newlib-2.2.0-1.tar.gz
+ sha256sums = a6f8617b0cc3403ecc442476583ca8904f7008f31ef9862ebc02c6de5f0afcc9
+ sha256sums = c1d53fd1765d955ac513aa6e2f576455ee7507072d400314495c8a8a26ebc8ec
+
+pkgname = epiphany-elf-gcc
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..fc48271e4818
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,85 @@
+# Maintainer: Jonathan Scott Tinkham <sctincman@gmail.com>
+# Adapted from arm-none-eabi- by Anatol Pomozov
+
+_target=epiphany-elf
+pkgname=$_target-gcc
+pkgver=4.9.2
+pkgrel=1
+_snapshot=4.9-20150128
+_newlibver=2.2.0-1
+pkgdesc='The GNU Compiler Collection - cross compiler for the Adapteva Epiphany target'
+arch=(i686 x86_64)
+url='http://gcc.gnu.org/'
+license=(GPL LGPL FDL)
+depends=($_target-binutils libmpc)
+makedepends=(gmp mpfr)
+#checkdepends=(dejagnu)
+options=(!emptydirs !strip staticlibs)
+source=(#ftp://gcc.gnu.org/pub/gcc/releases/gcc-$pkgver/gcc-$pkgver.tar.bz2
+ ftp://gcc.gnu.org/pub/gcc/snapshots/$_snapshot/gcc-$_snapshot.tar.bz2
+ ftp://sourceware.org/pub/newlib/newlib-$_newlibver.tar.gz)
+sha256sums=('a6f8617b0cc3403ecc442476583ca8904f7008f31ef9862ebc02c6de5f0afcc9'
+ 'c1d53fd1765d955ac513aa6e2f576455ee7507072d400314495c8a8a26ebc8ec')
+
+if [ -n "$_snapshot" ]; then
+ _basedir=gcc-$_snapshot
+else
+ _basedir=gcc-$pkgver
+fi
+
+prepare() {
+ cd "$srcdir/$_basedir"
+ echo $pkgver > gcc/BASE-VER
+
+ # Move newlib and libgloss to gcc source directory
+ mv "$srcdir"/newlib-$_newlibver/newlib "$srcdir/$_basedir"
+ mv "$srcdir"/newlib-$_newlibver/libgloss "$srcdir/$_basedir"
+
+ # hack! - some configure tests for header files using "$CPP $CPPFLAGS"
+ sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" "$srcdir"/$_basedir/{libiberty,gcc}/configure
+}
+
+build() {
+ cd $_basedir
+ mkdir -p build
+ cd build
+
+ export CFLAGS_FOR_TARGET='-O2 -g -pipe'
+ export CXXFLAGS_FOR_TARGET='-O2 -g -pipe'
+
+ ../configure --target=$_target \
+ --prefix=/usr \
+ --libexecdir=/usr/lib \
+ --with-pkgversion='Arch Repository' \
+ --with-bugurl='https://bugs.archlinux.org/' \
+ --enable-multilib \
+ --enable-interwork \
+ --enable-languages=c,c++ \
+ --with-newlib \
+ --with-gnu-as \
+ --with-gnu-ld \
+ --disable-nls \
+ --with-headers=newlib/libc/include \
+ --disable-werror
+
+ make
+}
+
+check() {
+ cd $_basedir/build
+}
+
+package() {
+ cd $_basedir/build
+
+ make DESTDIR="$pkgdir" install -j1
+
+ # Strip host objects but do not touch target one (strip corrupts access.o in libepiphany.a)
+ find "$pkgdir/usr/lib" -executable -type f -exec /usr/bin/strip --strip-debug '{}' \;
+ find "$pkgdir/usr/bin" -executable -type f -exec /usr/bin/strip --strip-debug '{}' \;
+
+ # Remove files that conflict with host gcc package
+ rm -r "$pkgdir"/usr/share/man/man7
+ rm -r "$pkgdir"/usr/share/info
+ rm -r "$pkgdir"/usr/share/gcc-$pkgver
+}