mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
Bump libtool to serial 63 from 2.5.4 (#21067)
The libtool 1.5.26 is bundled with PHP since the very early days of the
Autotools build system to ease the building process and avoid additional
dependency on the system Libtool. This updates the bundled libtool to
2.5.4 version.
Fixes and implementations:
- Fixed race conditions when building PHP in parallel ("cannot create
.libs" warnings).
- Implements request https://bugs.php.net/70374 (Update libtool.m4)
- Fixes libtool eating -flto flags.
- Fixes GH-17310 (configure producing errors on macOS)
- Fixes GH-15946 (./configure error when building with NixOS)
Changes:
- Add a script to update autotools files.
- libtool is spread across multiple files; phpize is updated to handle
this.
- Remove outdated hacks, i.e. for `ar`.
- Remove documentation references to external libtool, as we vendor it.
- `--with-pic` is now `--enable-pic`. Error out on the old flag.
- On macOS linker now uses -undefined dynamic_lookup flag for shared
extensions and shared embed SAPI (libphp) instead of older
'-undefined suppress -flat_namespace' combination.
Co-authored-by: Peter Kokot <peterkokot@gmail.com>
This commit is contained in:
@@ -9,6 +9,10 @@ BUILD_FILES = \
|
||||
scripts/phpize.m4 \
|
||||
build/libtool.m4 \
|
||||
build/ltmain.sh \
|
||||
build/lt~obsolete.m4 \
|
||||
build/ltoptions.m4 \
|
||||
build/ltsugar.m4 \
|
||||
build/ltversion.m4 \
|
||||
build/ax_check_compile_flag.m4 \
|
||||
build/ax_gcc_func_attribute.m4 \
|
||||
build/php_cxx_compile_stdcxx.m4 \
|
||||
|
||||
38
scripts/dev/update-autotools.sh
Executable file
38
scripts/dev/update-autotools.sh
Executable file
@@ -0,0 +1,38 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Update the PHP autotools (autoconf, libtool) bits.
|
||||
|
||||
# Go to project root directory
|
||||
cd "$(CDPATH='' cd -- "$(dirname -- "$0")/../../" && pwd -P)" || exit
|
||||
|
||||
# Use GNU grep for -P flag
|
||||
grep="$(which ggrep)"
|
||||
grep="${grep:-$(which grep)}"
|
||||
# Handle MacPorts prefixing GNU libtoolize
|
||||
libtoolize="$(which glibtoolize)"
|
||||
libtoolize="${libtoolize:-$(which libtoolize)}"
|
||||
|
||||
old_libtool_serial=$($grep -Po '(?<=^# serial )(\d*)(?=.*)' build/libtool.m4)
|
||||
echo "Old libtool serial: $old_libtool_serial"
|
||||
|
||||
$libtoolize -c
|
||||
# For some reason, libtoolize doesn't copy it as +x
|
||||
chmod +x build/ltmain.sh
|
||||
|
||||
new_libtool_serial=$($grep -Po '(?<=^# serial )(\d*)(?=.*)' build/libtool.m4)
|
||||
echo "New libtool serial: $new_libtool_serial"
|
||||
|
||||
# For config.*, GNU recommendation for updates is to download from Savannah
|
||||
# See: https://www.gnu.org/software/gettext/manual/html_node/config_002eguess.html
|
||||
|
||||
update_file() {
|
||||
old_ts=$("build/$1" -t)
|
||||
echo "Old $1 timestamp: $old_ts"
|
||||
url="https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=$1;hb=HEAD"
|
||||
wget -O "build/$1" "$url"
|
||||
new_ts=$("build/$1" -t)
|
||||
echo "New $1 timestamp: $new_ts"
|
||||
}
|
||||
|
||||
update_file config.guess
|
||||
update_file config.sub
|
||||
@@ -10,7 +10,7 @@ builddir="`pwd`"
|
||||
SED="@SED@"
|
||||
|
||||
FILES_BUILD="php.m4 shtool libtool.m4 ax_check_compile_flag.m4 ax_gcc_func_attribute.m4 php_cxx_compile_stdcxx.m4 pkg.m4 \
|
||||
config.guess config.sub ltmain.sh Makefile.global gen_stub.php"
|
||||
config.guess config.sub ltmain.sh lt~obsolete.m4 ltoptions.m4 ltsugar.m4 ltversion.m4 Makefile.global gen_stub.php"
|
||||
FILES="run-tests*.php"
|
||||
CLEAN_FILES="$FILES *.o *.lo *.la .libs/ build/ modules/ \
|
||||
config.nice configure configure.ac \
|
||||
|
||||
@@ -4,7 +4,13 @@ dnl Include external macro definitions before the AC_INIT to also remove
|
||||
dnl comments starting with # and empty newlines from the included files.
|
||||
m4_include([build/ax_check_compile_flag.m4])
|
||||
m4_include([build/ax_gcc_func_attribute.m4])
|
||||
|
||||
m4_include([build/libtool.m4])
|
||||
m4_include([build/ltoptions.m4])
|
||||
m4_include([build/ltsugar.m4])
|
||||
m4_include([build/ltversion.m4])
|
||||
m4_include([build/lt~obsolete.m4])
|
||||
|
||||
m4_include([build/php_cxx_compile_stdcxx.m4])
|
||||
m4_include([build/php.m4])
|
||||
m4_include([build/pkg.m4])
|
||||
@@ -138,16 +144,7 @@ enable_shared=yes
|
||||
PHP_HELP_SEPARATOR([Libtool:])
|
||||
PHP_CONFIGURE_PART([Configuring libtool])
|
||||
|
||||
dnl Only allow AC_PROG_CXX and AC_PROG_CXXCPP if they are explicitly called (by
|
||||
dnl PHP_REQUIRE_CXX). Otherwise AC_PROG_LIBTOOL fails if there is no working C++
|
||||
dnl compiler.
|
||||
AC_PROVIDE_IFELSE([PHP_REQUIRE_CXX], [], [
|
||||
undefine([AC_PROG_CXX])
|
||||
AC_DEFUN([AC_PROG_CXX], [])
|
||||
undefine([AC_PROG_CXXCPP])
|
||||
AC_DEFUN([AC_PROG_CXXCPP], [php_prog_cxxcpp=disabled])
|
||||
])
|
||||
AC_PROG_LIBTOOL
|
||||
LT_INIT
|
||||
|
||||
all_targets='$(PHP_MODULES) $(PHP_ZEND_EX)'
|
||||
install_targets="install-modules install-headers"
|
||||
|
||||
Reference in New Issue
Block a user