diff options
author | Marc Boocha | 2017-09-13 09:17:34 +0800 |
---|---|---|
committer | Marc Boocha | 2017-09-13 09:17:34 +0800 |
commit | e046fe5335ef38d2fb4b258abf645d3021b47be2 (patch) | |
tree | bd8b2b5bd9ac3464f7c37ddf81ac29d03db2adda | |
download | aur-e046fe5335ef38d2fb4b258abf645d3021b47be2.tar.gz |
initailize package
-rw-r--r-- | .SRCINFO | 21 | ||||
-rw-r--r-- | PKGBUILD | 63 | ||||
-rw-r--r-- | libiberty-ignore-cflags.patch | 16 |
3 files changed, 100 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..1c4979e5625f --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,21 @@ +pkgbase = x86_64-elf-gcc + pkgdesc = The GNU Compiler Collection - cross compiler for x86_64-elf target + pkgver = 7.2.0 + pkgrel = 1 + url = http://gcc.gnu.org/ + arch = x86_64 + license = GPL + license = LGPL + depends = x86_64-elf-binutils + depends = zlib + depends = libmpc + depends = mpfr + depends = gmp + options = !emptydirs + source = https://mirrors.kernel.org/gnu/gcc/gcc-7.2.0/gcc-7.2.0.tar.xz + source = libiberty-ignore-cflags.patch + sha256sums = 1cf7adf8ff4b5aa49041c8734bbcf1ad18cc4c94d0029aae0f4e48841088479a + sha256sums = 8b2aea00e98f7c311b1d0fb14e4b435a03c65fde32bc992c924edb6fa7b83c9c + +pkgname = x86_64-elf-gcc + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..bf8e3a9b4e5b --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,63 @@ +# Maintainer: Marc Boocha <marcboocha@gmail.com> + +_target=x86_64-elf +pkgname=$_target-gcc +pkgver=7.2.0 +pkgrel=1 +pkgdesc='The GNU Compiler Collection - cross compiler for x86_64-elf target' +arch=(x86_64) +url='http://gcc.gnu.org/' +license=(GPL LGPL) +depends=($_target-binutils zlib libmpc mpfr gmp) +options=(!emptydirs) +source=("https://mirrors.kernel.org/gnu/gcc/gcc-$pkgver/gcc-$pkgver.tar.xz" + "libiberty-ignore-cflags.patch") +sha256sums=('1cf7adf8ff4b5aa49041c8734bbcf1ad18cc4c94d0029aae0f4e48841088479a' + '8b2aea00e98f7c311b1d0fb14e4b435a03c65fde32bc992c924edb6fa7b83c9c') +_basedir=gcc-$pkgver + +prepare() { + cd $_basedir + + patch -p1 -i $srcdir/libiberty-ignore-cflags.patch + + mkdir $srcdir/gcc-build +} + +build() { + cd gcc-build + + $srcdir/$_basedir/configure \ + --target=$_target \ + --prefix=/usr \ + --disable-nls \ + --disable-plugin \ + --enable-languages=c,c++ \ + --without-headers + + make all-gcc + make all-target-libgcc +} + +check() { + cd gcc-build + + # increase stack size to prevent test failures + # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31827 + ulimit -s 32768 + + # do not abort on error as some are "expected" + make -k check || true + $srcdir/$_basedir/contrib/test_summary +} + +package() { + cd gcc-build + + make DESTDIR="$pkgdir" install-gcc + make DESTDIR="$pkgdir" install-target-libgcc + + # Remove info and make since it expected already present by host compiler + rm "$pkgdir"/usr/share/{info,gcc} +} + diff --git a/libiberty-ignore-cflags.patch b/libiberty-ignore-cflags.patch new file mode 100644 index 000000000000..ddef5a472478 --- /dev/null +++ b/libiberty-ignore-cflags.patch @@ -0,0 +1,16 @@ +diff -p1 -r a/libiberty/configure b/libiberty/configure +*** a/libiberty/configure Tue Jul 4 20:43:21 2017 +--- b/libiberty/configure Fri Aug 25 01:41:25 2017 +*************** +*** 10,11 **** +--- 10,19 ---- + # gives unlimited permission to copy, distribute and modify it. ++ ++ ## ---------------------------------------------------------- ## ++ ## PATCHED: Unset CFLAGS/CPPFLAGS so that libiberty compiles. ## ++ ## ---------------------------------------------------------- ## ++ ++ CFLAGS= ++ CPPFLAGS= ++ + ## -------------------- ## |