Closed xtkoba closed 1 year ago
Maybe not in effect when using CMake ( [EDIT] Now a workaround has been added for CMake (0ead023121901676ce6a731e29fbd7b8fccb5db0).termux_step_configure_cmake
) because IIRC CMake does not use target-prefixed wrapper but calls /path/to/clang
directly. There may be other cases where the clang16-porting switch does not effect.
I believe it is working for Autotools and Meson, unless the build scripts in the source do something insane.
This is only relevant for on-device packaging?
Only affects non-on-device building. Does not affect on-device building at all, unless I'm doing anything wrong.
OK, I thought this is because on-device builds use clang 16 from now on. Instead, you are getting these packages ready for the next NDK upgrade that uses clang 16? Because the current NDK 25 uses clang 14.
Porting to (upcoming) NDK r26 is one of the purposes. Another is to improve on-device building because our clang
package is now Clang 16.
So manual bump until NDK r26?
So does this effect every package written in C/C++ in the repos or do you have like a list of (potentially) effected packages?
The following packages have passed the test as of now.
This does not check the C++ portability and I'm not going to do that in this issue.
See also https://wiki.gentoo.org/wiki/Modern_C_porting.
In Clang/LLVM 16 the following errors are enabled by default:
In our packaging scripts,
TERMUX_PKG_ENABLE_CLANG16_PORTING
variable is introduced (6938b7c4b4d0e9b297fb0153560358706fc57b60) to control whether to enable these errors when using NDK r25 (based on Clang 14), to discover possible build failures/breakages with Clang 16.Note that
TERMUX_PKG_ENABLE_CLANG16_PORTING
is enabled by default (set totrue
), and it is very likely that simply trying to rebuild some package leads to build failure/breakage.To avoid catastrophic breakges or unnoticed breakages, it is explicitly (in
build.sh
of each package) disabled for essential packages (3c88b5956171da75c9a26178e9a92c28c09fd04f) and auto-updating packages (10ada7e4d39bcb7d3ec14a16dbf4b61c62a6af3d), until for each package it is sure that build failure/breakage does not occur.It is acceptable that
TERMUX_PKG_ENABLE_CLANG16_PORTING
is set tofalse
for each package by maintainer's decision, if this change of behavior is unwanted. But it is highly recommended that build failures/breakages be fixed instead.