Mercurial > vanilla
view lib/musl/musl.sh @ 1221:a47aaf9743a0
misc: backed out changeset 4ccc42bf0284
We will keep .sh for now.
author | David Demelier <markand@malikania.fr> |
---|---|
date | Fri, 15 Oct 2021 16:07:30 +0200 |
parents | 4ccc42bf0284 |
children | 325631424c65 |
line wrap: on
line source
#!/bin/sh # # Copyright (c) 2019 David Demelier <markand@malikania.fr> # # Permission to use, copy, modify, and/or distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. # # TODO: change x86_64 once we build ARM variants. PKGNAME=musl PKGVERSION=1.1.21 PKGREVISION=1 PKGLICENSE="MIT" PKGSUMMARY="a new lightweight, fast, simple, free and correct C library" PKGDOWNLOAD="https://www.musl-libc.org/releases/$PKGNAME-$PKGVERSION.tar.gz" PKGOPTIONS="STATIC" PKGDEPENDS="linux-headers:build" : ${CC:=clang} : ${CFLAGS:=-O2} : ${STATIC:=no} if [ "$STATIC" = "yes" ]; then with_static="--disable-shared" else PKGPRESERVE="lib/ld-musl-x86_64.so.1" fi rm -rf $PKGNAME-$PKGVERSION tar xvf $PKGNAME-$PKGVERSION.tar.gz cd $PKGNAME-$PKGVERSION CC="$CC" \ CFLAGS="$CFLAGS" \ ./configure \ --prefix=/usr \ $with_static make \ AR=llvm-ar \ RANLIB=llvm-ranlib \ DESTDIR=$DESTDIR \ all install if [ "$STATIC" != "yes" ]; then mkdir -p $DESTDIR/bin ln -sf /lib/ld-musl-x86_64.so.1 $DESTDIR/bin/ldd fi cd .. rm -rf $PKGNAME-$PKGVERSION