-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
scripts(toolchain): several changes related to $TERMUX_PREFIX/include #23513
scripts(toolchain): several changes related to $TERMUX_PREFIX/include #23513
Conversation
- This is the `$TERMUX_PREFIX/include` portion of termux#21835 - Replace `-I` with `-isystem` in strategic locations: changes the include order of headers in `$TERMUX_PREFIX/include` relative to headers inside the source code of packages currently being built, so that if any headers inside the source code of the package being built have the exact same file names as headers inside `$TERMUX_PREFIX/include`, the headers from inside the source code of the package will be used, instead of the headers from inside `$TERMUX_PREFIX/include`, which would not be correct. - Previous discussion was here https://github.com/termux/termux-packages/pull/22009/files/3dc455672cd67f05ed3cb814da07f7b9cfaf54af#diff-8c775c171f451b21463be103116ad5a4c2d0c54d3fb4ff4b59e987f98fc9c348 - Prevents many _potential_ `$TERMUX_PREFIX/include`-related errors (that are often only reproducible when reusing a single docker container to compile multiple packages) in the following packages (and possibly other packages): - `nasm` - `bitlbee` - `emacs` - `gdb` - `libjxl` - `libmediainfo` - `maxcso` - `nodejs` - `pipewire` - `rust` - `sqlcipher` - `tome2` - `weggli` - `zip` - `proxmark3` - `handbrake` - This include order causes the `$TERMUX_ON_DEVICE_BUILD=false` build codepath to match the behavior of the `clang` binary from the `main/clang` package (i.e. the `$TERMUX_ON_DEVICE_BUILD=true` codepath), which is caused by the `-DDEFAULT_SYSROOT` setting that is built into it: https://github.com/termux/termux-packages/blob/26a76f7b5de02c2b33c7f3d09c841712dfd4ccf0/packages/libllvm/build.sh#L40 - `simulavr`: the current `simulavr` `build.sh` runs `mv $TERMUX_PREFIX/include ...`, that is not really ideal because it effectively deletes the entire `$TERMUX_PREFIX/include` folder, preventing any other packages that might be built in the same container from using the headers they need from `$TERMUX_PREFIX/include` (and also potentially creating a malformed `simulavr` package `.deb` if any other packages were installed info `$TERMUX_PREFIX` beforehand). This rewrites the `simulavr` package in a way that avoids destroying `$TERMUX_PREFIX/include`.
6c438c9
to
e2d4c5a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All seems reasonable to me.
Ok, so it seems to be fine. |
This is the
$TERMUX_PREFIX/include
portion of [RFC] fix $TERMUX_PREFIX pollution #21835Replace
-I
with-isystem
in strategic locations: changes the include order of headers in$TERMUX_PREFIX/include
relative to headers inside the source code of packages currently being built, so that if any headers inside the source code of the package being built have the exact same file names as headers inside$TERMUX_PREFIX/include
, the headers from inside the source code of the package will be used, instead of the headers from inside$TERMUX_PREFIX/include
, which would not be correct.$TERMUX_PREFIX/include
-related errors (that are often only reproducible when reusing a single docker container to compile multiple packages) in the following packages (and possibly other packages):nasm
bitlbee
emacs
gdb
libjxl
libmediainfo
maxcso
nodejs
pipewire
rust
sqlcipher
tome2
weggli
zip
proxmark3
handbrake
$TERMUX_ON_DEVICE_BUILD=false
build codepath to match the behavior of theclang
binary from themain/clang
package (i.e. the$TERMUX_ON_DEVICE_BUILD=true
codepath), which is caused by the-DDEFAULT_SYSROOT
setting that is built into it:termux-packages/packages/libllvm/build.sh
Line 40 in 26a76f7
simulavr
: the currentsimulavr
build.sh
runsmv $TERMUX_PREFIX/include ...
, that is not really ideal because it effectively deletes the entire$TERMUX_PREFIX/include
folder, preventing any other packages that might be built in the same container from using the headers they need from$TERMUX_PREFIX/include
(and also potentially creating a malformedsimulavr
package.deb
if any other packages were installed info$TERMUX_PREFIX
beforehand). This rewrites thesimulavr
package in a way that avoids destroying$TERMUX_PREFIX/include
.@xtkoba I know you might not be here, but in case you see this, this would replace some of your code (in
ghostscript
) with other code, I would not want to remove your code like this without letting you know what is happening.