summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJulien Savard2016-06-28 00:26:19 -0400
committerJulien Savard2016-06-28 00:26:19 -0400
commitc4963af6a88a7d0cd9f41477feede95b79018d48 (patch)
tree1a2a664265fd5c4cdb6474227480a12eee50a838
downloadaur-c4963af6a88a7d0cd9f41477feede95b79018d48.tar.gz
Guess it works so far
-rw-r--r--.SRCINFO24
-rw-r--r--PKGBUILD79
2 files changed, 103 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..243b1edb22a2
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,24 @@
+pkgbase = sh3eb-elf-gcc
+ pkgdesc = The GNU Compiler Collection for the sh3eb-elf target.
+ pkgver = 6.1.0
+ pkgrel = 1
+ url = http://gcc.gnu.org
+ arch = i686
+ arch = x86_64
+ license = GPL
+ license = LGPL
+ depends = sh3eb-elf-binutils
+ depends = libmpc
+ depends = elfutils
+ options = staticlibs
+ options = !buildflags
+ options = !libtool
+ options = !emptydirs
+ options = zipman
+ options = docs
+ options = !strip
+ source = ftp://gcc.gnu.org/pub/gcc/releases/gcc-6.1.0/gcc-6.1.0.tar.bz2
+ sha256sums = 09c4c85cabebb971b1de732a0219609f93fc0af5f86f6e437fd8d7f832f1a351
+
+pkgname = sh3eb-elf-gcc
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..c3c970d99978
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,79 @@
+# Maintainer: Julien Savard <juju@juju2143.ca>
+# Based on msp430-elf-gcc
+
+_target="sh3eb-elf"
+pkgname=${_target}-gcc
+pkgver=6.1.0
+pkgrel=1
+pkgdesc="The GNU Compiler Collection for the ${_target} target."
+arch=(i686 x86_64)
+license=('GPL' 'LGPL')
+url="http://gcc.gnu.org"
+depends=("${_target}-binutils" 'libmpc' 'elfutils')
+options=('staticlibs' '!buildflags' '!libtool' '!emptydirs' 'zipman' 'docs' '!strip')
+source=(ftp://gcc.gnu.org/pub/gcc/releases/gcc-${pkgver}/gcc-${pkgver}.tar.bz2)
+sha256sums=('09c4c85cabebb971b1de732a0219609f93fc0af5f86f6e437fd8d7f832f1a351')
+
+prepare() {
+ cd "${srcdir}/gcc-${pkgver}"
+
+ [[ -d gcc-build ]] && rm -rf gcc-build
+ mkdir gcc-build
+}
+
+build() {
+ cd "${srcdir}/gcc-${pkgver}"
+
+ export CFLAGS="-O2 -pipe -s -fomit-frame-pointer -ffunction-sections -fdata-sections"
+ export CXXFLAGS=$CFLAGS
+ export LDFLAGS="-Wl,--gc-sections"
+
+ echo ${pkgver} > gcc/BASE-VER
+
+ cd gcc-build
+
+ [ $NOEXTRACT -eq 1 ] || ../configure \
+ --prefix=/usr \
+ --program-prefix=${_target}- \
+ --target=${_target} \
+ --host=$CHOST \
+ --build=$CHOST \
+ --disable-shared \
+ --disable-nls \
+ --disable-tls \
+ --disable-threads \
+ --enable-languages=c,c++ \
+ --enable-multilib \
+ --with-system-zlib \
+ --with-local-prefix=/usr/${_target} \
+ --with-as=/usr/bin/${_target}-as \
+ --with-ld=/usr/bin/${_target}-ld \
+ --disable-libgomp \
+ --enable-interwork \
+ --enable-addons \
+ --enable-sjlj-exceptions \
+ --disable-hosted-libstdcxx \
+ --with-gnu-as \
+ --with-gnu-ld \
+ --disable-libssp \
+ --disable-__cxa_atexit
+
+ make all-gcc all-target-libgcc
+}
+
+package() {
+ cd "${srcdir}/gcc-${pkgver}/gcc-build"
+
+ make DESTDIR="${pkgdir}" install-gcc install-target-libgcc
+
+ rm -rf "${pkgdir}/usr/share/man/man7/"
+ rm -rf "${pkgdir}/usr/share/info"
+
+ cp -r "${pkgdir}"/usr/libexec/* "${pkgdir}/usr/lib/"
+ rm -rf "${pkgdir}/usr/libexec"
+
+ # strip it manually
+ strip "${pkgdir}"/usr/bin/* 2>/dev/null || true
+ find "${pkgdir}"/usr/lib -type f -exec /usr/bin/${_target}-strip \
+ --strip-unneeded {} \; 2>/dev/null || true
+}