summaryrefslogtreecommitdiff
path: root/libc/ci/install-musl.sh
diff options
context:
space:
mode:
authorDaniel Mueller <deso@posteo.net>2020-04-04 14:39:19 -0700
committerDaniel Mueller <deso@posteo.net>2020-04-04 14:39:19 -0700
commitd0d9683df8398696147e7ee1fcffb2e4e957008c (patch)
tree4baa76712a76f4d072ee3936c07956580b230820 /libc/ci/install-musl.sh
parent203e691f46d591a2cc8acdfd850fa9f5b0fb8a98 (diff)
downloadnitrocli-d0d9683df8398696147e7ee1fcffb2e4e957008c.tar.gz
nitrocli-d0d9683df8398696147e7ee1fcffb2e4e957008c.tar.bz2
Remove vendored dependencies
While it appears that by now we actually can get successful builds without Cargo insisting on Internet access by virtue of using the --frozen flag, maintaining vendored dependencies is somewhat of a pain point. This state will also get worse with upcoming changes that replace argparse in favor of structopt and pull in a slew of new dependencies by doing so. Then there is also the repository structure aspect, which is non-standard due to the way we vendor dependencies and a potential source of confusion. In order to fix these problems, this change removes all the vendored dependencies we have. Delete subrepo argparse/:argparse Delete subrepo base32/:base32 Delete subrepo cc/:cc Delete subrepo cfg-if/:cfg-if Delete subrepo getrandom/:getrandom Delete subrepo lazy-static/:lazy-static Delete subrepo libc/:libc Delete subrepo nitrokey-sys/:nitrokey-sys Delete subrepo nitrokey/:nitrokey Delete subrepo rand/:rand
Diffstat (limited to 'libc/ci/install-musl.sh')
-rw-r--r--libc/ci/install-musl.sh83
1 files changed, 0 insertions, 83 deletions
diff --git a/libc/ci/install-musl.sh b/libc/ci/install-musl.sh
deleted file mode 100644
index 88cb4f0..0000000
--- a/libc/ci/install-musl.sh
+++ /dev/null
@@ -1,83 +0,0 @@
-#!/usr/bin/env sh
-#
-# Install musl and musl-sanitized linux kernel headers
-# to musl-{$1} directory
-
-set -ex
-
-MUSL_VERSION=1.1.24
-MUSL="musl-${MUSL_VERSION}"
-
-# Download, configure, build, and install musl:
-curl --retry 5 https://www.musl-libc.org/releases/${MUSL}.tar.gz | tar xzf -
-
-cd $MUSL
-case ${1} in
- aarch64)
- musl_arch=aarch64
- kernel_arch=arm64
- CC=aarch64-linux-gnu-gcc \
- ./configure --prefix="/musl-${musl_arch}" --enable-wrapper=yes
- make install -j4
- ;;
- arm)
- musl_arch=arm
- kernel_arch=arm
- CC=arm-linux-gnueabihf-gcc CFLAGS="-march=armv6 -marm -mfpu=vfp" \
- ./configure --prefix="/musl-${musl_arch}" --enable-wrapper=yes
- make install -j4
- ;;
- i686)
- # cross-compile musl for i686 using the system compiler on an x86_64
- # system.
- musl_arch=i686
- kernel_arch=i386
- # Specifically pass -m32 in CFLAGS and override CC when running
- # ./configure, since otherwise the script will fail to find a compiler.
- CC=gcc CFLAGS="-m32" \
- ./configure --prefix="/musl-${musl_arch}" --disable-shared --target=i686
- # unset CROSS_COMPILE when running make; otherwise the makefile will
- # call the non-existent binary 'i686-ar'.
- make CROSS_COMPILE= install -j4
- ;;
- x86_64)
- musl_arch=x86_64
- kernel_arch=x86_64
- ./configure --prefix="/musl-${musl_arch}"
- make install -j4
- ;;
- mips64)
- musl_arch=mips64
- kernel_arch=mips
- CC=mips64-linux-gnuabi64-gcc CFLAGS="-march=mips64r2 -mabi=64" \
- ./configure --prefix="/musl-${musl_arch}" --enable-wrapper=yes
- make install -j4
- ;;
- mips64el)
- musl_arch=mips64el
- kernel_arch=mips
- CC=mips64el-linux-gnuabi64-gcc CFLAGS="-march=mips64r2 -mabi=64" \
- ./configure --prefix="/musl-${musl_arch}" --enable-wrapper=yes
- make install -j4
- ;;
- *)
- echo "Unknown target arch: \"${1}\""
- exit 1
- ;;
-esac
-
-
-# shellcheck disable=SC2103
-cd ..
-rm -rf $MUSL
-
-# Download, configure, build, and install musl-sanitized kernel headers:
-KERNEL_HEADER_VER="4.4.2-2"
-curl --retry 5 -L \
- "https://github.com/sabotage-linux/kernel-headers/archive/v${KERNEL_HEADER_VER}.tar.gz" | \
- tar xzf -
-(
- cd kernel-headers-${KERNEL_HEADER_VER}
- make ARCH="${kernel_arch}" prefix="/musl-${musl_arch}" install -j4
-)
-rm -rf kernel-headers-${KERNEL_HEADER_VER}