Skip to content

main/brotli: use sysroot when cross compiling to avoid libtool pulling in host libs

linear requested to merge goshhhy/aports:brotli-sysroot into master

libtool really, really likes to try and re-link binaries against the host system when you run "make install", even when cross compiling.

oftentimes, this is not an issue, as the linker will notice that the host libraries are incompatible and skip over it with a warning. however, for some host-target combinations, the compiler will instead fail. recent versions of libtool will avoid doing this when passed a sysroot, so this patch does so when cross-compiling.

this was found while working on a port to m68k, and tested on aarch64.

see !24871 (merged) for a slightly more sinister occurrence of this issue.

Edited by linear

Merge request reports