summaryrefslogtreecommitdiff
path: root/Zend/Zend.m4
diff options
context:
space:
mode:
authorAlex Dowad <alexinbeijing@gmail.com>2020-05-27 08:12:45 +0200
committerAlex Dowad <alexinbeijing@gmail.com>2020-06-17 19:31:35 +0200
commit3a19726bce4757aaa2e657c3eb4418631310aba0 (patch)
treef0eebb76bf42fd97e978e7b419ca0b7cfd0af1ea /Zend/Zend.m4
parent4f260411d19a30838ee828c0f29c826da73d03ff (diff)
downloadphp-git-3a19726bce4757aaa2e657c3eb4418631310aba0.tar.gz
Remove unneeded --disable-inline-optimization build parameter
In 1999, inline optimization was turned off by default. The commit log indicates this was done because GCC was running out of memory on some hosts when building the Zend executor. In 2003, inline optimization was re-enabled by default, but a build option was added to turn it off if one runs out of memory when building. Computing hardware has come a long way since 2003 and I doubt that anyone is running out of memory when building PHP now. Interestingly, this code set an unused variable called `INLINE_CFLAGS`. It actually disabled inline optimization by adding -O0 to the build command, not using `INLINE_CFLAGS`. Just to see how much memory GCC/Make are using when building PHP, I tried building with successively higher values of `ulimit -v` until it succeeded. Interestingly, while most of the codebase can be built with about 400MB of memory, ext/fileinfo/libmagic/apprentice.c requires 1.2GB, doubtless because it includes ext/fileinfo/data_file.c, which is more than 350,000 lines long. That is with GCC 7.5.0. Most users get PHP as a binary package anyways, so the question is, are *packagers* of PHP trying to build on machines with just 1GB RAM? And would they want to package a PHP interpreter built with *no optimizations*? I can't imagine either being true.
Diffstat (limited to 'Zend/Zend.m4')
-rw-r--r--Zend/Zend.m419
1 files changed, 0 insertions, 19 deletions
diff --git a/Zend/Zend.m4 b/Zend/Zend.m4
index 7c715e853b..b0f913aac3 100644
--- a/Zend/Zend.m4
+++ b/Zend/Zend.m4
@@ -196,18 +196,9 @@ AC_ARG_ENABLE([zts],
[ZEND_ZTS=$enableval],
[ZEND_ZTS=no])
-AC_ARG_ENABLE([inline-optimization],
- [AS_HELP_STRING([--disable-inline-optimization],
- [If building zend_execute.lo fails, try this switch])],
- [ZEND_INLINE_OPTIMIZATION=$enableval],
- [ZEND_INLINE_OPTIMIZATION=yes])
-
AC_MSG_CHECKING(whether to enable thread-safety)
AC_MSG_RESULT($ZEND_ZTS)
-AC_MSG_CHECKING(whether to enable inline optimization for GCC)
-AC_MSG_RESULT($ZEND_INLINE_OPTIMIZATION)
-
AC_MSG_CHECKING(whether to enable Zend debugging)
AC_MSG_RESULT($ZEND_DEBUG)
@@ -232,18 +223,8 @@ if test "$ZEND_ZTS" = "yes"; then
CFLAGS="$CFLAGS -DZTS"
fi
-changequote({,})
-if test -n "$GCC" && test "$ZEND_INLINE_OPTIMIZATION" != "yes"; then
- INLINE_CFLAGS=`echo $ac_n "$CFLAGS $ac_c" | sed s/-O[0-9s]*//`
-else
- INLINE_CFLAGS="$CFLAGS"
-fi
-changequote([,])
-
AC_C_INLINE
-AC_SUBST(INLINE_CFLAGS)
-
AC_MSG_CHECKING(target system is Darwin)
if echo "$target" | grep "darwin" > /dev/null; then
AC_DEFINE([DARWIN], 1, [Define if the target system is darwin])