summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Eriksson2015-12-30 00:17:05 +0100
committerSimon Eriksson2015-12-30 00:17:05 +0100
commit45ac6ce9412fbc0771ae16b9b00c6f3f644445cb (patch)
tree1b6c068c5a6865e60231e38bbb8765983fdbc261
downloadaur-45ac6ce9412fbc0771ae16b9b00c6f3f644445cb.tar.gz
Initial commit
-rw-r--r--.SRCINFO23
-rw-r--r--PKGBUILD82
2 files changed, 105 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..78aa9b02715
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,23 @@
+pkgbase = mips64-elf-gcc-stage1
+ pkgdesc = The GNU Compiler Collection. Stage 1 for toolchain building (mips64-elf)
+ pkgver = 5.3.0
+ pkgrel = 1
+ url = http://www.gnu.org/software/gcc/
+ arch = i686
+ arch = x86_64
+ license = GPL
+ license = LGPL
+ license = FDL
+ makedepends = gmp
+ makedepends = mpfr
+ depends = libmpc
+ depends = zlib
+ depends = mips64-elf-binutils
+ optdepends = mips64-elf-newlib: Standard C library optimized for embedded systems
+ options = !emptydirs
+ options = !strip
+ source = ftp://gcc.gnu.org/pub/gcc/releases/gcc-5.3.0/gcc-5.3.0.tar.bz2
+ sha256sums = b84f5592e9218b73dbae612b5253035a7b34a9a1f7688d2e1bfaaf7267d5c4db
+
+pkgname = mips64-elf-gcc-stage1
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..afb01e5f05f
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,82 @@
+#Maintainer: Simon Eriksson <simon.eriksson.1187+aur AT gmail.com>
+
+_target=mips64-elf
+pkgname=${_target}-gcc-stage1
+pkgver=5.3.0
+pkgrel=1
+pkgdesc="The GNU Compiler Collection. Stage 1 for toolchain building (${_target})"
+url="http://www.gnu.org/software/gcc/"
+arch=('i686' 'x86_64')
+license=('GPL' 'LGPL' 'FDL')
+depends=('libmpc' 'zlib' "${_target}-binutils" )
+makedepends=('gmp' 'mpfr')
+optdepends=("${_target}-newlib: Standard C library optimized for embedded systems")
+options=('!emptydirs' '!strip' )
+source=("ftp://gcc.gnu.org/pub/gcc/releases/gcc-${pkgver}/gcc-${pkgver}.tar.bz2")
+sha256sums=('b84f5592e9218b73dbae612b5253035a7b34a9a1f7688d2e1bfaaf7267d5c4db')
+
+prepare() {
+ cd gcc-${pkgver}
+
+ # Hack - see native package for details
+ sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" {libiberty,gcc}/configure
+}
+
+build() {
+ rm -rf build
+ mkdir build && cd build
+
+ export CFLAGS_FOR_TARGET="-G0 -O2"
+ export CXXFLAGS_FOR_TARGET="-G0 -O2"
+ ../gcc-${pkgver}/configure \
+ --target=${_target} \
+ --prefix=/usr \
+ --with-sysroot=/usr/${_target} \
+ --libexecdir=/usr/lib \
+ --with-gnu-as \
+ --with-gnu-ld \
+ --without-headers \
+ --with-newlib \
+ --without-included-gettext \
+ --enable-languages=c \
+ --enable-plugins \
+ --disable-debug \
+ --disable-decimal-float \
+ --disable-libatomic \
+ --disable-libgcj \
+ --disable-libgomp \
+ --disable-libitm \
+ --disable-libquadmath \
+ --disable-libquadmath-support \
+ --disable-libsanitizer \
+ --disable-libssp \
+ --disable-multilib \
+ --disable-nls \
+ --disable-shared \
+ --disable-threads \
+ --disable-werror \
+ --enable-checking=release \
+ --enable-gold \
+ --enable-lto \
+ --enable-static \
+
+ make
+}
+
+package() {
+ cd build
+
+ make DESTDIR="${pkgdir}" install -j1
+
+ # strip target binaries
+ find "$pkgdir"/usr/lib/gcc/$_target/$pkgver -type f -and \( -name \*.a -or -name \*.o \) -exec $_target-objcopy -R .comment -R .note -R .debug_info -R .debug_aranges -R .debug_pubnames -R .debug_pubtypes -R .debug_abbrev -R .debug_line -R .debug_str -R .debug_ranges -R .debug_loc '{}' \;
+
+ # strip host binaries
+ find "$pkgdir"/usr/bin/ "$pkgdir"/usr/lib/gcc/$_target/$pkgver -type f -and \( -executable \) -exec strip '{}' \;
+
+ # Remove files that conflict with host gcc package
+ rm -r "$pkgdir"/usr/share/man/man7
+ rm -r "$pkgdir"/usr/share/info
+ rm "$pkgdir"/usr/lib/libcc1.*
+
+}