-export LD=$CC # Needed to link the binaries
-export LDFLAGS="$LDFLAGS -llog" # liblog for android logging in syslog hack
+termux_step_pre_configure() {
+ LD=$CC # Needed to link the binaries
+ LDFLAGS+=" -llog" # liblog for android logging in syslog hack
+}