7e8a27b013
PHP's phpize is based on a very old libtool to generate build files for its extensions. This libtool does not support .la files with '=' to support sysroot. In order to support more PHP extension cross compilation this modifies ltmain.sh to support such path. This is a bit hackish has it only get sysroot from the used toolchain; the proper way to fix that is to have PHP developpers to update the autotools file used to build there extensions.
39 lines
1.4 KiB
Diff
39 lines
1.4 KiB
Diff
--- a/build/ltmain.sh 2021-09-09 15:19:14.822208365 +0200
|
|
+++ b/build/ltmain.sh 2021-09-09 15:47:55.397011151 +0200
|
|
@@ -2375,6 +2375,13 @@ EOF
|
|
*) . ./$lib ;;
|
|
esac
|
|
|
|
+ newdependency_libs=
|
|
+ for deplib in $dependency_libs; do
|
|
+ deplib=$(echo "$deplib" | sed "s#^=\(.*\)#$(${CC} --print-sysroot)\1#")
|
|
+ newdependency_libs="$newdependency_libs $deplib"
|
|
+ done
|
|
+ dependency_libs=${newdependency_libs}
|
|
+
|
|
if test "$linkmode,$pass" = "lib,link" ||
|
|
test "$linkmode,$pass" = "prog,scan" ||
|
|
{ test "$linkmode" != prog && test "$linkmode" != lib; }; then
|
|
@@ -5750,6 +5757,13 @@ fi\
|
|
case $host,$output,$installed,$module,$dlname in
|
|
*cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
|
|
esac
|
|
+
|
|
+ newdependency_libs=
|
|
+ for deplib in $dependency_libs; do
|
|
+ deplib=$(echo "$deplib" | sed "s#^$(${CC} --print-sysroot)#=#")
|
|
+ newdependency_libs="$newdependency_libs $deplib"
|
|
+ done
|
|
+
|
|
$echo > $output "\
|
|
# $outputname - a libtool library file
|
|
# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
|
|
@@ -5767,7 +5781,7 @@ library_names='$library_names'
|
|
old_library='$old_library'
|
|
|
|
# Libraries that this one depends upon.
|
|
-dependency_libs='$dependency_libs'
|
|
+dependency_libs='$newdependency_libs'
|
|
|
|
# Version information for $libname.
|
|
current=$current
|