Skip to content

main/pcre: update libtool and use sysroot to avoid pulling host libs when cross compiling

linear requested to merge goshhhy/aports:pcre-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.

pcre's libtool is out of date, so this alone does not fix this. so, libtool is also updated in prepare() and aclocal/autoconf/automake are re-run.

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

see !24870 (merged) for a slightly less sinister occurrence of this issue.

Merge request reports