[arch-commits] Commit in riscv64-linux-gnu-glibc/repos (2 files)

Filipe Laíns ffy00 at archlinux.org
Sun Mar 8 20:38:28 UTC 2020


    Date: Sunday, March 8, 2020 @ 20:38:27
  Author: ffy00
Revision: 592488

archrelease: copy trunk to staging-any

Added:
  riscv64-linux-gnu-glibc/repos/staging-any/
  riscv64-linux-gnu-glibc/repos/staging-any/PKGBUILD
    (from rev 592487, riscv64-linux-gnu-glibc/trunk/PKGBUILD)

----------+
 PKGBUILD |   86 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 86 insertions(+)

Copied: riscv64-linux-gnu-glibc/repos/staging-any/PKGBUILD (from rev 592487, riscv64-linux-gnu-glibc/trunk/PKGBUILD)
===================================================================
--- staging-any/PKGBUILD	                        (rev 0)
+++ staging-any/PKGBUILD	2020-03-08 20:38:27 UTC (rev 592488)
@@ -0,0 +1,86 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+# Maintainer: Alexander F. Rødseth <xyproto at archlinux.org>
+# Contributor: Anatol Pomozov <anatol.pomozov at gmail.com>
+
+_target=riscv64-linux-gnu
+pkgname=$_target-glibc
+pkgver=2.31
+pkgrel=1
+pkgdesc='GNU C Library RISCV target'
+arch=(any)
+url='https://www.gnu.org/software/libc/'
+license=(GPL LGPL)
+depends=($_target-gcc $_target-linux-api-headers)
+groups=(risc-v)
+makedepends=(python)
+options=(!buildflags !strip staticlibs)
+source=(https://ftp.gnu.org/gnu/libc/glibc-$pkgver.tar.xz{,.sig})
+sha512sums=('735e4c0ef10418b6ea945ad3906585e5bbd8b282d76f2131309dce4cec6b15066a5e4a3731773ce428a819b542579c9957867bb0abf05ed2030983fca4412306'
+            'SKIP')
+validpgpkeys=(7273542B39962DF7B299931416792B4EA25340F8  # "Carlos O'Donell <carlos at systemhalted.org>"
+              BC7C7372637EC10C57D7AA6579C43DFBF1CF2187) # Siddhesh Poyarekar <siddhesh at gotplt.org>
+
+prepare() {
+  mkdir -p glibc-build
+}
+
+build() {
+  cd glibc-build
+
+  echo 'slibdir=/lib' >> configparms
+  echo 'rtlddir=/lib' >> configparms
+  echo 'sbindir=/bin' >> configparms
+  echo 'rootsbindir=/bin' >> configparms
+
+  # remove hardening options for building libraries
+  export CFLAGS="-U_FORTIFY_SOURCE -O2"
+  export CPPFLAGS="-U_FORTIFY_SOURCE -O2"
+  unset LD_LIBRARY_PATH
+
+  export BUILD_CC=gcc
+  export CC=${_target}-gcc
+  export CXX=${_target}-g++
+  export AR=${_target}-ar
+  export RANLIB=${_target}-ranlib
+
+  ../glibc-$pkgver/configure \
+      --prefix=/usr \
+      --target=$_target \
+      --host=$_target \
+      --build=$CHOST \
+      --libdir=/usr/lib \
+      --libexecdir=/usr/lib \
+      --with-headers=/usr/$_target/include \
+      --with-bugurl=https://bugs.archlinux.org/ \
+      --enable-kernel=2.6.32 \
+      --enable-add-ons \
+      --enable-bind-now \
+      --disable-profile \
+      --enable-stackguard-randomization \
+      --enable-lock-elision \
+      --disable-werror
+
+  echo 'build-programs=no' >> configparms
+  make
+}
+
+package() {
+  cd glibc-build
+
+  make install_root=$pkgdir/usr/$_target install
+  # make install_root=$pkgdir/usr/$_target install-headers install-bootstrap-headers=yes
+  # make csu/subdir_lib
+  # mkdir -p $pkgdir/usr/$_target/lib $pkgdir/usr/$_target/include/gnu
+  # cp csu/crt1.o csu/crti.o csu/crtn.o $pkgdir/usr/$_target/lib
+  # $_target-gcc \
+  #   -nostdlib \
+  #   -nostartfiles \
+  #   -shared \
+  #   -x c /dev/null \
+  #   -o $pkgdir/usr/$_target/lib/libc.so
+  # touch $pkgdir/usr/$_target/include/gnu/stubs.h
+
+  rm -rf $pkgdir/usr/$_target/{bin,sbin,etc,share,var}
+}
+
+# vim: ts=2 sw=2 et:



More information about the arch-commits mailing list