This upstream commit is reverted:
github.com/aosp-mirror/platform_bionic/commit/b7b2884a2130c32b3ca7228891a0a9aa934a9be7
And some of the changes in this commit are included:
github.com/termux/termux-packages/commit/3da018dde122ae90ff82e9733c096e3c75331fe1.
By defining __TERMUX__ and __TERMUX_PREFIX__ in <sys/cdefs.h> (which is
basically always included) one can more easily target Termux
specifically, both when cross-compiling packages and when code is built
on-device.
Linter will check packages submitted for CI build. If error was found,
build will not be allowed.
To ensure that all build.sh scripts are consistent and have at least
minimal allowed quality, linter is permanently enabled for all branches
and pull requests.
Variables
TERMUX_PKG_PLATFORM_INDEPENDENT
TERMUX_DEBUG
TERMUX_PKG_HAS_DEBUG
TERMUX_PKG_ESSENTIAL
TERMUX_SUBPKG_ESSENTIAL
TERMUX_PKG_NO_STATICSPLIT
TERMUX_PKG_BUILD_IN_SRC
TERMUX_PKG_FORCE_CMAKE
TERMUX_PKG_HOSTBUILD
should not accept arbitrary values for marking them "enabled". Instead
they should accept boolean values which makes them easier to handle and
also makes their meaning clear.
build-package.sh should make decision based on variable's value but not on
whether it is set or empty.
%ci:no-build
32-bit android uses 32-bit off_t by default. When building with
-D_FILE_OFFSET_BITS=64 with unified headers off_t are promoted
to 64-bit, but there are bugs in the toolchain and spotty support
for it in the platform (not all functions are available until
android-24, and the platform zlib is compiled with 32-bit off_t).
Also, unless every library&program is rebuilt with 64-bit off_t,
including user-built ones, we risk a mismatch between programs and
libraries which can cause serious (but sometimes subtle) runtime
failures.
As -D_FILE_OFFSET_BITS=64 is not that important for most users
(with mariadb requiring it as an exception), we drop the support
for now by patching it away in <sys/cdefs.h>.
The librt and libpthread libraries are built into libc on Android
and does not exist as separate libraries.
We now set them up as symlinks to libc for compatibility.
Fixes#403.