summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Schmidt2019-06-30 18:50:37 +0200
committerStefan Schmidt2019-06-30 18:51:59 +0200
commit782d7a3faa9adb6f22d03722de737cd86652f396 (patch)
treea9a6a4b11998d779c3d6bf6a2d751ca230b0ad3f
downloadaur-782d7a3faa9adb6f22d03722de737cd86652f396.tar.gz
Initial release
-rw-r--r--.SRCINFO30
-rw-r--r--PKGBUILD99
-rw-r--r--powerpc-hack.patch11
3 files changed, 140 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..e0e11ad4acc
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,30 @@
+pkgbase = powerpc64le-linux-gnu-glibc
+ pkgdesc = GNU C Library (powerpc64le-linux-gnu)
+ pkgver = 2.29
+ pkgrel = 1
+ url = http://www.gnu.org/software/libc/
+ arch = any
+ license = GPL
+ license = LGPL
+ makedepends = powerpc64le-linux-gnu-gcc-stage2>=8.1.0-1
+ makedepends = gperf
+ depends = powerpc64le-linux-gnu-linux-api-headers>=4.16.1-1
+ provides = powerpc64le-linux-gnu-glibc-headers=2.29
+ provides = powerpc64le-linux-gnu-eglibc
+ conflicts = powerpc64le-linux-gnu-glibc-headers
+ conflicts = powerpc64le-linux-gnu-eglibc
+ replaces = powerpc64le-linux-gnu-glibc-headers
+ options = !buildflags
+ options = !strip
+ options = staticlibs
+ source = https://ftp.gnu.org/gnu/glibc/glibc-2.29.tar.xz
+ source = https://ftp.gnu.org/gnu/glibc/glibc-2.29.tar.xz.sig
+ source = powerpc-hack.patch
+ validpgpkeys = 7273542B39962DF7B299931416792B4EA25340F8
+ validpgpkeys = BC7C7372637EC10C57D7AA6579C43DFBF1CF2187
+ sha256sums = f3eeb8d57e25ca9fc13c2af3dae97754f9f643bc69229546828e3a240e2af04b
+ sha256sums = SKIP
+ sha256sums = SKIP
+
+pkgname = powerpc64le-linux-gnu-glibc
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..1999e0b33c2
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,99 @@
+# Contributor: Alexander 'hatred' Drozdov <adrozdoff@gmail.com>
+# Contributor: toha257 <toha257@gmail.com>
+# Contributor: Allan McRae <allan@archlinux.org>
+# Contributor: Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
+# Contributor: Kevin Mihelich <kevin@archlinuxarm.org>
+# Contributor: Tavian Barnes <tavianator@tavianator.com>
+# Maintainer: Stefan Schmidt <thrimbor.github@gmail.com>
+
+_target="powerpc64le-linux-gnu"
+pkgname=${_target}-glibc
+pkgver=2.29
+pkgrel=1
+pkgdesc="GNU C Library (${_target})"
+arch=('any')
+url="http://www.gnu.org/software/libc/"
+license=(GPL LGPL)
+depends=("${_target}-linux-api-headers>=4.16.1-1")
+makedepends=("${_target}-gcc-stage2>=8.1.0-1" gperf)
+provides=("${_target}-glibc-headers=${pkgver}" "${_target}-eglibc")
+conflicts=("${_target}-glibc-headers" "${_target}-eglibc")
+replaces=("${_target}-glibc-headers")
+options=(!buildflags !strip staticlibs)
+source=(https://ftp.gnu.org/gnu/glibc/glibc-$pkgver.tar.xz{,.sig}
+ powerpc-hack.patch) # Patch by Alexander Baldeck
+sha256sums=('f3eeb8d57e25ca9fc13c2af3dae97754f9f643bc69229546828e3a240e2af04b'
+ SKIP
+ SKIP)
+validpgpkeys=(7273542B39962DF7B299931416792B4EA25340F8 # "Carlos O'Donell <carlos@systemhalted.org>"
+ BC7C7372637EC10C57D7AA6579C43DFBF1CF2187) # Siddhesh Poyarekar
+
+prepare() {
+ mkdir -p glibc-build
+
+ [[ -d glibc-$pkgver ]] && ln -s glibc-$pkgver glibc
+ cd glibc
+
+ local i; for i in ${source[@]}; do
+ case ${i%::*} in
+ *.patch)
+ msg2 "Applying ${i}"
+ patch -p1 -i "$srcdir/${i}"
+ ;;
+ esac
+ done
+}
+
+build() {
+ local _configure_flags=(
+ --prefix=/
+ --with-headers=/usr/${_target}/include
+ --enable-add-ons
+ --enable-bind-now
+ --enable-lock-elision
+ --disable-multi-arch
+ --enable-stack-protector=strong
+ --enable-stackguard-randomization
+ --disable-profile
+ --disable-werror
+ )
+
+ cd glibc-build
+
+ echo "slibdir=/lib" >> configparms
+ echo "rtlddir=/lib" >> configparms
+ echo "sbindir=/bin" >> configparms
+ echo "rootsbindir=/bin" >> configparms
+
+ # remove fortify for building libraries
+ CPPFLAGS=${CPPFLAGS/-D_FORTIFY_SOURCE=2/}
+
+ export BUILD_CC=gcc
+ export CC=${_target}-gcc
+ export CXX=${_target}-g++
+ export AR=${_target}-ar
+ export RANLIB=${_target}-ranlib
+
+ "$srcdir/glibc-$pkgver/configure" \
+ --libdir=/lib \
+ --libexecdir=/lib \
+ ${_configure_flags[@]} \
+ --target=${_target} \
+ --host=${_target} \
+ --build=${CHOST}
+
+ echo "build-programs=no" >> configparms
+ make
+}
+
+package() {
+ cd glibc-build
+
+ make install_root="$pkgdir/usr/$_target" install
+
+ mkdir -p "$pkgdir/usr/$_target/usr"
+ ln -s ../{include,lib} "$pkgdir/usr/$_target/usr"
+
+ # Remove unneeded for compilation files
+ rm -rf "$pkgdir/usr/$_target/"{bin,sbin,etc,share,var}
+}
diff --git a/powerpc-hack.patch b/powerpc-hack.patch
new file mode 100644
index 00000000000..e9500e76789
--- /dev/null
+++ b/powerpc-hack.patch
@@ -0,0 +1,11 @@
+--- glibc/configure.orig 2019-03-15 07:39:37.420877466 +0000
++++ glibc/configure 2019-03-15 07:39:53.627543736 +0000
+@@ -4423,7 +4423,7 @@
+
+ OBJDUMP=`$CC -print-prog-name=objdump`
+
+-OBJCOPY=`$CC -print-prog-name=objcopy`
++OBJCOPY=`$CC -print-prog-name=powerpc64le-linux-gnu-objcopy`
+
+ GPROF=`$CC -print-prog-name=gprof`
+