# To update:
#
-# git remote add toybox https://github.com/gfto/toybox.git
+# git remote add toybox https://github.com/landley/toybox.git
# git fetch toybox
# git merge toybox/master
# mm -j32
lib/dirtree.c \
lib/getmountlist.c \
lib/help.c \
+ lib/interestingtimes.c \
lib/lib.c \
lib/llist.c \
lib/net.c \
lib/xwrap.c \
main.c \
toys/android/getenforce.c \
+ toys/android/getprop.c \
toys/android/load_policy.c \
+ toys/android/restorecon.c \
toys/android/runcon.c \
toys/android/setenforce.c \
+ toys/android/setprop.c \
toys/lsb/dmesg.c \
toys/lsb/hostname.c \
toys/lsb/killall.c \
toys/other/bzcat.c \
toys/other/chcon.c \
toys/other/chroot.c \
- toys/other/chvt.c \
toys/other/clear.c \
toys/other/dos2unix.c \
toys/other/fallocate.c \
toys/other/freeramdisk.c \
toys/other/fsfreeze.c \
toys/other/help.c \
+ toys/other/hwclock.c \
toys/other/ifconfig.c \
toys/other/inotifyd.c \
toys/other/insmod.c \
+ toys/other/ionice.c \
toys/other/losetup.c \
toys/other/lsattr.c \
toys/other/lsmod.c \
- toys/other/lspci.c \
toys/other/lsusb.c \
toys/other/makedevs.c \
toys/other/mkswap.c \
toys/other/vconfig.c \
toys/other/vmstat.c \
toys/other/which.c \
+ toys/other/xxd.c \
toys/other/yes.c \
toys/pending/dd.c \
toys/pending/expr.c \
- toys/pending/hwclock.c \
toys/pending/more.c \
toys/pending/pgrep.c \
- toys/pending/ps.c \
toys/pending/netstat.c \
toys/pending/route.c \
toys/pending/tar.c \
toys/posix/xargs.c \
LOCAL_CFLAGS += \
+ -std=c99 \
-Os \
-Wno-char-subscripts \
-Wno-sign-compare \
-ffunction-sections -fdata-sections \
-fno-asynchronous-unwind-tables \
-LOCAL_SHARED_LIBRARIES := libselinux
+toybox_version := $(shell git -C $(LOCAL_PATH) rev-parse --short=12 HEAD 2>/dev/null)-android
+LOCAL_CFLAGS += -DTOYBOX_VERSION='"$(toybox_version)"'
+
+LOCAL_CLANG := true
+
+LOCAL_SHARED_LIBRARIES := libcutils libselinux
+
+# This doesn't actually prevent us from dragging in libc++ at runtime
+# because libnetd_client.so is C++.
+LOCAL_CXX_STL := none
LOCAL_MODULE := toybox
-# dupes: dd df du ls mount renice umount
-# useless?: chvt freeramdisk fsfreeze install makedevs mkfifo nbd-client
+# dupes: dd df du ls
+# useless?: freeramdisk fsfreeze install makedevs mkfifo nbd-client
# partprobe pivot_root pwdx rev rfkill switch_root tty vconfig
# prefer BSD netcat instead?: nc netcat
# prefer efs2progs instead?: blkid chattr lsattr
find \
free \
getenforce \
+ getprop \
groups \
head \
hostname \
ifconfig \
inotifyd \
insmod \
+ ionice \
+ iorenice \
kill \
- killall \
load_policy \
ln \
logname \
losetup \
lsmod \
- lspci \
lsusb \
md5sum \
mkdir \
mktemp \
modinfo \
more \
+ mount \
mountpoint \
mv \
netstat \
pwd \
readlink \
realpath \
+ renice \
+ restorecon \
rm \
rmdir \
rmmod \
sed \
seq \
setenforce \
+ setprop \
setsid \
sha1sum \
sleep \
tr \
true \
truncate \
+ tty \
+ umount \
uname \
uniq \
unix2dos \
which \
whoami \
xargs \
+ xxd \
yes \
# Install the symlinks.