added tiny c compiler and cgroups for orangepi pc
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
#!/bin/bash
|
||||
|
||||
. ./scripts/colors.sh
|
||||
. ./scripts/funcs.sh
|
||||
. ./scripts/config.sh
|
||||
|
||||
tcc_build() {
|
||||
pkgname=tcc
|
||||
pkgver=0.9.27
|
||||
printf "$GREEN** Building and installing ${pkgname}\n$RESET"
|
||||
mkdir $build/${pkgname}
|
||||
cd $build/${pkgname}
|
||||
tar -xvf $root/downloads/${pkgname}-${pkgver}.tar.bz2
|
||||
check $? "Extract ${pkgname}"
|
||||
cd ${pkgname}-${pkgver}
|
||||
export QEMU_LD_PREFIX=${rootfspath}
|
||||
./configure \
|
||||
--prefix=/usr \
|
||||
--cross-prefix=${CROSS_COMPILE}- \
|
||||
--cpu=${ARCH} \
|
||||
--disable-static \
|
||||
--config-uClibc \
|
||||
--with-sysroot=${rootfspath}
|
||||
check $? "Configure ${pkgname}"
|
||||
make $makeflags
|
||||
check $? "Build ${pkgname}"
|
||||
make DESTDIR=$rootfspath install
|
||||
${CROSS_COMPILE}-strip --strip-unneeded $rootfspath/usr/bin/tcc $rootfspath/usr/lib/libtcc.so
|
||||
check $? "Installing to rootfs ${pkgname}"
|
||||
find $rootfspath -type f -name "*.a" -delete
|
||||
find $rootfspath -type f -name "*.la" -delete
|
||||
rm -rvf $rootfspath/usr/share/{info,man,doc}
|
||||
}
|
||||
Reference in New Issue
Block a user