Skip to content

Commit

Permalink
add PHP_LTO='n'
Browse files Browse the repository at this point in the history
- disabled by default for now due to bug https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68384
  • Loading branch information
centminmod committed Jun 25, 2017
1 parent 04f8931 commit 765fa42
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions centmin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,7 @@ GENERAL_DEVTOOLSETGCC='n' # Use devtoolset-4 GCC 5.3 whereever possible/code
CRYPTO_DEVTOOLSETGCC='n' # Use devtoolset-4 GCC 5.3 for libressl or openssl compiles
NGX_GSPLITDWARF='y' # for Nginx compile https://community.centminmod.com/posts/44072/
PHP_GSPLITDWARF='y' # for PHP compile https://community.centminmod.com/posts/44072/
PHP_LTO='n' # enable -flto compiler for GCC 4.8.5+ PHP-FPM compiles currently not working with PHP 7.x
NGX_LDGOLD='y' # for Nginx compile i.e. passing ld.gold linker -fuse-ld=bfd or -fuse-ld=gold https://community.centminmod.com/posts/44037/

# When set to =y, will disable those listed installed services
Expand Down
6 changes: 5 additions & 1 deletion inc/php_configure.inc
Original file line number Diff line number Diff line change
Expand Up @@ -518,8 +518,12 @@ if [[ "$GCCINTEL_PHP" = [yY] ]]; then
gcc -c -Q -march=native --help=target | egrep '\[enabled\]|mtune|march|mfpmath' | tee -a ${CENTMINLOGDIR}/gcc_php_native.log


if [[ "$(gcc --version | head -n1 | awk '{print $3}' | cut -d . -f1-3 | sed "s|\.|0|g")" -ge '40805' && "$PHP_GSPLITDWARF" = [yY] ]]; then
if [[ "$(gcc --version | head -n1 | awk '{print $3}' | cut -d . -f1-3 | sed "s|\.|0|g")" -ge '40805' && "$PHP_GSPLITDWARF" = [yY] && "$PHP_LTO" = [yY] ]]; then
PHPEXTRA_CFLAGS="$PHPEXTRA_CFLAGS -gsplit-dwarf -flto -flto-partition=max"
elif [[ "$(gcc --version | head -n1 | awk '{print $3}' | cut -d . -f1-3 | sed "s|\.|0|g")" -ge '40805' && "$PHP_GSPLITDWARF" = [yY] && "$PHP_LTO" = [nN] ]]; then
PHPEXTRA_CFLAGS="$PHPEXTRA_CFLAGS -gsplit-dwarf"
elif [[ "$(gcc --version | head -n1 | awk '{print $3}' | cut -d . -f1-3 | sed "s|\.|0|g")" -ge '40805' && "$PHP_LTO" = [yY] ]]; then
PHPEXTRA_CFLAGS="$PHPEXTRA_CFLAGS -flto -flto-partition=max"
fi

if [[ "$(uname -m)" = 'x86_64' && "$CPUVENDOR" = 'GenuineIntel' && "$SSECHECK" = '[enabled]' ]] && [[ "$CLANG_PHP" = [nN] ]]; then
Expand Down

0 comments on commit 765fa42

Please sign in to comment.