Commit Graph

10 Commits

Author SHA1 Message Date
termux-pacman-bot
9b1d8bc03e fix(main/clang): default to using the static library of the address sanitizer instead of the shared library
- Makes the default behavior of on-device building with the address sanitizer match the default behavior of building with the address sanitizer on Clang for Desktop Linux distros, which is to use the static library

- Fixes https://github.com/termux/termux-packages/issues/26485

- On devices that do not have `libclang_rt.asan-$arch-android.so` or which have a corrupted one, fixes building on-device with `-fsanitize=address`

- Samsung Galaxy S III SPH-L710 with LineageOS 14.1 Android 7.1.2 before:

```
~ $ clang test.c -fsanitize=address
~ $ ./a.out
WARNING: linker: /data/data/com.termux/files/home/a.out: unsupported flags DT_FLAGS_1=0x8000001
CANNOT LINK EXECUTABLE "./a.out": library "libclang_rt.asan-arm-android.so" not found
Aborted                    ./a.out
~ $ clang test.c -fsanitize=address -Wl,-rpath=$PREFIX/lib/clang/20/lib/linux
~ $ ./a.out
WARNING: linker: /data/data/com.termux/files/home/a.out: unsupported flags DT_FLAGS_1=0x8000001
~ $ termux-elf-cleaner ./a.out
termux-elf-cleaner: Replacing unsupported DF_1_* flags 134217729 with 1 in './a.out'
~ $ ./a.out
~ $ file /system/lib/libclang_rt.asan-arm-android.so
/system/lib/libclang_rt.asan-arm-android.so: cannot open `/system/lib/libclang_rt.asan-arm-android.so' (No such file or directory)
~ $
```

- After:
```
~ $ clang test.c -fsanitize=address
~ $ ./a.out
WARNING: linker: /data/data/com.termux/files/home/a.out: unsupported flags DT_FLAGS_1=0x8000001
~ $ termux-elf-cleaner a.out
termux-elf-cleaner: Replacing unsupported DF_1_* flags 134217729 with 1 in 'a.out'
~ $ ./a.out
~ $
```

- Vivo iQOO Neo8 V2301A with Android 15 before:

```
thread #1, name = 'a.out', stop reason = signal SIGILL: illegal opcode
```

- After: believed to work
2025-10-13 15:06:11 +00:00
termux-pacman-bot
7c41626dda libllvm: revbump 2023-11-14 00:03:19 +00:00
termux-pacman-bot
cc5e54657c llvm: use TERMUX_SELF_EXE
https://github.com/termux/termux-exec/pull/24
2023-10-30 01:23:10 +00:00
termux-pacman-bot
7d7a3fdda0 Update llvm-lib-Support-Unix-Path.inc.patch
this one's just formatting
%ci:no-build
2023-10-16 22:31:07 +00:00
termux-pacman-bot
5c8d097225 Update llvm-lib-Support-Unix-Path.inc.patch
ok it's bulletproof now
2023-10-16 22:01:33 +00:00
termux-pacman-bot
d1b3f0d4e3 Update llvm-lib-Support-Unix-Path.inc.patch
final!!
2023-10-16 21:31:15 +00:00
termux-pacman-bot
93f21d6c9d Update llvm-lib-Support-Unix-Path.inc.patch 2023-10-16 21:01:40 +00:00
termux-pacman-bot
41cfa638f7 Update llvm-lib-Support-Unix-Path.inc.patch
oopsie :p
2023-10-16 20:31:24 +00:00
termux-pacman-bot
ea30799e48 libllvm: fix clang-tools (#18270) 2023-10-16 18:01:51 +00:00
termux-pacman-bot
daab57c3d1 llvm: Avoid looking at /proc/self/exe
LLVM looks at /proc/self/exe to determine which binary has been called.
This does not work with the proposed changes for termux-exec:
https://github.com/termux/termux-exec/pull/24

Luckily the fallback to look at argv0 works instead.
2023-10-04 12:40:02 +00:00