Skip to content

Commit 607a72a

Browse files
committed
rmpkg(main/binutils-is-llvm): make LLVM binutils default in Termux
- My idea of a different solution to: - #8191 - #9715 - #16588 - Reverts: - #10012 - #13045 - Make Termux behave more similarly to the LLVM-based desktop Linux distro, Chimera Linux - Preserve `as` name for GNU `as`, since `llvm-as` is not compatible with software expecting GNU `as`, and Chimera Linux also gives that name to GNU `as`: #11218 - Source code and runtime behavior of Chimera Linux observed to design this PR https://chimera-linux.org/ | Binutil | Chimera Linux | Vanilla Android | Termux Current | Termux This PR | |:----------- |:------------- |:----------------- |:-------------- |:-------------- | | `addr2line` | LLVM | `llvm-` name only | Variable | LLVM | | `ar` | LLVM | `llvm-` name only | Variable | LLVM | | `as` | GNU | `llvm-` name only | GNU | GNU | | `c++filt` | LLVM | `llvm-` name only | Variable | LLVM | | `elfedit` | LLVM | `llvm-` name only | Variable | LLVM | | `ld` | LLVM | LLVM | Variable | LLVM | | `nm` | LLVM | `llvm-` name only | Variable | LLVM | | `objcopy` | LLVM | `llvm-` name only | Variable | LLVM | | `objdump` | LLVM | `llvm-` name only | Variable | LLVM | | `prof` | LLVM | `llvm-` name only | Variable | LLVM | | `ranlib` | LLVM | `llvm-` name only | Variable | LLVM | | `readelf` | LLVM | `llvm-` name only | Variable | LLVM | | `size` | LLVM | `llvm-` name only | Variable | LLVM | | `strings` | LLVM | `llvm-` name only | Variable | LLVM | | `strip` | LLVM | `llvm-` name only | Variable | LLVM | - This is **not** a project to move Termux away from GNU in general. It is a project to make Termux have a consistent default implementation of a component that is among the group of components for which most distros pick a default and stick to it: | Component | GNU/Linux | Alpine Linux | Chimera Linux | FreeBSD | MacOS | Vanilla Android | Termux Current | Termux This PR | |:----------- |:--------- |:------------ |:------------- |:------- |:----- |:--------------- |:-------------- |:-------------- | | C stdlib | GNU | musl | musl | BSD | BSD | bionic | bionic | bionic | | C++ stdlib | GNU | GNU | LLVM | LLVM | LLVM | LLVM | LLVM | LLVM | | Compiler | GNU | GNU | LLVM | LLVM | LLVM | LLVM | LLVM | LLVM | | Binutils | GNU | GNU | LLVM | LLVM | LLVM | LLVM | **Variable** | LLVM | | Make | GNU | GNU | GNU | BSD | BSD | GNU | GNU | GNU | | Coreutils | GNU | busybox | BSD | BSD | BSD | toybox | GNU | GNU | most LLVM-based distros and operating systems choose the LLVM binutils, so choosing the LLVM binutils for Termux is reasonable and will contribute to the consistency of the wider LLVM-based distro ecosystem. - After #28438 , it is now impossible to have `binutils-is-llvm` and `ldd`, `binutils-bin` or `lua-language-server` installed simultaneously. - This disturbance to the prior status quo might inconvenience users of `ldd`, `lua-language-server`, `binutils-bin` or similar packages who are trying to build Termux packages on-device. - This is considered to have occurred due to the difficulty of maintaining multiple packages that provide binutils simultaneously, so the goal is now to reevaluate the default binutils executables provided in Termux, and make changes that solve the problem without reverting #28438 while aligning Termux more closely with the current choices used by an LLVM-based desktop Linux distro that also provides a GNU binutils package, Chimera Linux. After this, it will unfortunately be more difficult to compile certain software in Termux. Here is one example that I know of: ```bash git clone https://github.com/paullouisageneau/libjuice.git cd libjuice make ``` It would work before this PR if `binutils` was installed, but after this PR, it will show this error: ``` ar: error: unknown option f ``` (yes, this error also happens when building libjuice in Chimera Linux) Before this PR, it could be worked around by using `pkg install binutils`, but after this PR, it will only be possible to work around by either changing the invocation of `ar` to `gar` or removing the argument `f` from the instance of call to `ar` in `Makefile`. However: - it is already more difficult to compile software in Termux that has problems with Clang but not GCC, or problems with libc++ but not libstdc++, or problems with alternative libc but not glibc, and the additional limitation imposed by defaulting to LLVM binutils is expected to be relatively minimal - libjuice is not an official Termux package, and if it were, it would have already had to be patched to avoid this error anyway, because Termux currently has `ar` set to `llvm-ar` for building in multiple places: https://github.com/termux/termux-packages/blob/eaad7e0549ccf2fc3aa4919dc15b8306ce61dffc/scripts/build/toolchain/termux_setup_toolchain_29.sh#L11 https://github.com/termux/termux-packages/blob/eaad7e0549ccf2fc3aa4919dc15b8306ce61dffc/scripts/setup-termux.sh#L14 - This will make the default behavior of building software in Termux more consistently similar not only to the behavior of the vanilla Android NDK, and not only to behavior of the `termux_setup_toolchain_29()` and `setup-termux.sh` of termux-packages, but also to the behavior of the LLVM-based desktop Linux distro, Chimera Linux. - Any time `clang` is installed, all of the LLVM binutils in the `llvm` package are also already installed, just with `llvm-` prepended to their names, so for most situations, the `binutils` package is implementing duplicate functionality while taking up additional space
1 parent 0ed8d82 commit 607a72a

27 files changed

Lines changed: 155 additions & 86 deletions
File renamed without changes.
File renamed without changes.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ TERMUX_PKG_SHA256=(fdbb376f08242d917922a6a22a773980217fafa310046fc5d6459490af23d
2121
5784d4cc47d0845af0897d3b7473a08dd0281a4cdabac0a486740840d014fde1)
2222
TERMUX_PKG_AUTO_UPDATE=false
2323
# dub dlopen()s libcurl.so:
24-
TERMUX_PKG_DEPENDS="binutils-bin, binutils-is-llvm | binutils, clang, libc++, libcurl, zlib"
24+
TERMUX_PKG_DEPENDS="binutils, clang, libc++, libcurl, zlib"
2525
TERMUX_PKG_BUILD_DEPENDS="binutils-cross"
2626
TERMUX_PKG_NO_STATICSPLIT=true
2727
TERMUX_PKG_HOSTBUILD=true
File renamed without changes.
File renamed without changes.
File renamed without changes.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ TERMUX_PKG_DESCRIPTION="A tiling terminal emulator for Linux using GTK+ 3"
33
TERMUX_PKG_LICENSE="MPL-2.0"
44
TERMUX_PKG_MAINTAINER="@termux"
55
TERMUX_PKG_BUILD_IN_SRC=true
6-
TERMUX_PKG_VERSION=1.9.6
6+
TERMUX_PKG_VERSION="1.9.6"
77
TERMUX_PKG_REVISION=1
8-
TERMUX_PKG_SRCURL=https://github.com/gnunn1/tilix/archive/refs/tags/${TERMUX_PKG_VERSION}.tar.gz
8+
TERMUX_PKG_SRCURL="https://github.com/gnunn1/tilix/archive/refs/tags/${TERMUX_PKG_VERSION}.tar.gz"
99
TERMUX_PKG_SHA256=be389d199a6796bd871fc662f8a37606a1f84e5429f24e912d116f16c5f0a183
1010
TERMUX_PKG_AUTO_UPDATE=true
1111
TERMUX_PKG_DEPENDS="dconf, gdk-pixbuf, glib, gsettings-desktop-schemas, gtk3, libcairo, libsecret, libvte, libx11, pango"

x11-packages/tilix/data-scripts-install-man-pages.sh.patch renamed to disabled-packages/tilix/data-scripts-install-man-pages.sh.patch

File renamed without changes.

x11-packages/tilix/source-gx-tilix-terminal-terminal.d.patch renamed to disabled-packages/tilix/source-gx-tilix-terminal-terminal.d.patch

File renamed without changes.

0 commit comments

Comments
 (0)