summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorcodeworkx2017-11-12 13:44:08 +0100
committercodeworkx2017-11-12 13:44:08 +0100
commitfd5fb87441810e2f514f3f64cc99b36e29240183 (patch)
tree179a4ec8cad90886f59e6cfc3ac83c0cb74117e1
downloadaur-cross-mipsel-linux-gnu-gcc49.tar.gz
upgrade to 4.9.4
-rw-r--r--.SRCINFO23
-rw-r--r--.gitignore5
-rw-r--r--PKGBUILD63
3 files changed, 91 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..0bdcfdd68be6
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,23 @@
+pkgbase = cross-mipsel-linux-gnu-gcc49
+ pkgdesc = The GNU Compiler Collection for the MIPS architecture
+ pkgver = 4.9.4
+ pkgrel = 1
+ url = http://www.gnu.org/software/gcc/
+ arch = i686
+ arch = x86_64
+ license = GPL
+ depends = mpfr
+ depends = gmp
+ depends = libmpc
+ depends = sh
+ depends = cross-mipsel-linux-gnu-binutils
+ options = !ccache
+ options = !distcc
+ options = !emptydirs
+ options = !libtool
+ options = !strip
+ source = ftp://ftp.gnu.org/gnu/gcc/gcc-4.9.4/gcc-4.9.4.tar.bz2
+ sha256sums = 6c11d292cd01b294f9f84c9a59c230d80e9e4a47e5c6355f046bb36d4f358092
+
+pkgname = cross-mipsel-linux-gnu-gcc49
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..fa0ce26490d6
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,5 @@
+*.[oa]
+*.bz2
+*.pkg.*
+pkg/
+src/
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..6b7b933299a5
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,63 @@
+# Contributor: Vojtech Horky <vojta . horky at-symbol seznam . cz>
+pkgname=cross-mipsel-linux-gnu-gcc49
+_pkgname=gcc
+_target="mipsel-linux-gnu"
+pkgver=4.9.4
+pkgrel=1
+pkgdesc="The GNU Compiler Collection for the MIPS architecture"
+url="http://www.gnu.org/software/gcc/"
+arch=('i686' 'x86_64')
+license=('GPL')
+depends=('mpfr' 'gmp' 'libmpc' 'sh' "cross-${_target}-binutils")
+options=('!ccache' '!distcc' '!emptydirs' '!libtool' '!strip')
+source=("ftp://ftp.gnu.org/gnu/gcc/gcc-${pkgver}/${_pkgname}-${pkgver}.tar.bz2")
+sha256sums=('6c11d292cd01b294f9f84c9a59c230d80e9e4a47e5c6355f046bb36d4f358092')
+_sysroot="/usr/lib/cross-${_target}"
+
+prepare() {
+ cd ${srcdir}/${_pkgname}-${pkgver}
+
+ # Hack - see native package for details
+ sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" {libiberty,gcc}/configure
+}
+
+build() {
+ cd ${srcdir}/${_pkgname}-${pkgver}
+
+ ./configure \
+ "--prefix=${_sysroot}" \
+ "--bindir=/usr/bin" "--program-prefix=${_target}-" \
+ "--with-sysroot=${_sysroot}" \
+ "--target=${_target}" \
+ --oldincludedir=/../../../usr/include \
+ --with-gnu-as --with-gnu-ld \
+ --disable-nls --disable-threads \
+ --enable-languages=c,c++ \
+ --disable-multilib --disable-libgcj \
+ --enable-lto --disable-werror \
+ --without-headers --disable-shared
+
+ make all-gcc "inhibit_libc=true"
+}
+
+package() {
+ cd ${srcdir}/${_pkgname}-${pkgver}
+
+ make DESTDIR=${pkgdir} install-gcc
+
+ msg "Removing duplicit files..."
+ # remove these files as they are already in the system
+ # (with native gcc)
+ rm -Rf ${pkgdir}${_sysroot}/{man,info}
+ # remove conflicting binaries
+ find ${pkgdir}/usr/bin/ -type f -not -name "${_target}-*" -delete
+
+ msg "Creating out-of-path executables..."
+ # symlink executables to single directory with no-arch-prefix name
+ mkdir -p ${pkgdir}/usr/bin/cross/${_target}/;
+ cd ${pkgdir}/usr/bin/cross/${_target}/;
+ for bin in ${pkgdir}/usr/bin/${_target}-*; do
+ bbin=`basename "$bin"`;
+ ln -s "/usr/bin/${bbin}" `echo "$bbin" | sed "s#^${_target}-##"`;
+ done
+}