diff --git a/inc/nginx_configure.inc b/inc/nginx_configure.inc index 149d1a9cd..158910fd2 100644 --- a/inc/nginx_configure.inc +++ b/inc/nginx_configure.inc @@ -2135,7 +2135,7 @@ if [[ "$CLANG" = [yY] ]]; then if [[ "$CENTOS_SIX" = '6' && ! -f /usr/bin/clang ]] || [[ "$CENTOS_SEVEN" = '7' && ! -f /bin/clang ]]; then time $YUMDNFBIN -q -y install clang clang-devel${DISABLEREPO_DNF} fi - if [[ ! -f /opt/rh/devtoolset-4/root/usr/bin/gcc || ! -f /opt/rh/devtoolset-4/root/usr/bin/g++ ]] || [[ ! -f /opt/rh/devtoolset-6/root/usr/bin/gcc || ! -f /opt/rh/devtoolset-6/root/usr/bin/g++ ]]; then + if [[ ! -f /opt/rh/devtoolset-4/root/usr/bin/gcc || ! -f /opt/rh/devtoolset-4/root/usr/bin/g++ ]] || [[ ! -f /opt/rh/devtoolset-6/root/usr/bin/gcc || ! -f /opt/rh/devtoolset-6/root/usr/bin/g++ ]] || [[ ! -f /opt/rh/devtoolset-7/root/usr/bin/gcc || ! -f /opt/rh/devtoolset-7/root/usr/bin/g++ ]]; then if [[ "$(echo "$NGXPGSPEED_VER" | cut -d . -f1)" -ge '1' ]] && [[ "$(echo "$NGXPGSPEED_VER" | cut -d . -f2)" -ge '10' ]] && [[ "$NGINX_PAGESPEED" = [yY] ]] && [[ "$CENTOS_SIX" = '6' ]]; then scl_install fi @@ -2247,13 +2247,21 @@ fi # devtoolset-4 usage for ngx_pagespeed 1.10 branch which doesn't support # centos 6 based gcc 4.4.7 if [[ "$CENTOS_SIX" = '6' && "$CLANG" = [nN] ]]; then - if [[ ! -f /opt/rh/devtoolset-4/root/usr/bin/gcc || ! -f /opt/rh/devtoolset-4/root/usr/bin/g++ ]] || [[ ! -f /opt/rh/devtoolset-6/root/usr/bin/gcc || ! -f /opt/rh/devtoolset-6/root/usr/bin/g++ ]]; then + if [[ ! -f /opt/rh/devtoolset-4/root/usr/bin/gcc || ! -f /opt/rh/devtoolset-4/root/usr/bin/g++ ]] || [[ ! -f /opt/rh/devtoolset-6/root/usr/bin/gcc || ! -f /opt/rh/devtoolset-6/root/usr/bin/g++ ]] || [[ ! -f /opt/rh/devtoolset-7/root/usr/bin/gcc || ! -f /opt/rh/devtoolset-7/root/usr/bin/g++ ]]; then scl_install export PS_NGX_EXTRA_FLAGS="--with-cc=/opt/rh/devtoolset-4/root/usr/bin/gcc" # PS_FLAGS=$(echo " $PS_NGX_EXTRA_FLAGS") PS_FLAGS="" if [[ "$INITIALINSTALL" != [yY] ]]; then - source /opt/rh/devtoolset-4/enable + if [[ "$DEVTOOLSETSEVEN" = [yY] ]]; then + source /opt/rh/devtoolset-7/enable + DEVTOOLSETSEVEN_FALLTHROUGH=' -Wimplicit-fallthrough=0' + DEVTOOLSETSEVEN_EXTRAFLAGS=' -fcode-hoisting' + elif [[ "$DEVTOOLSETSIX" = [yY] ]]; then + source /opt/rh/devtoolset-6/enable + else + source /opt/rh/devtoolset-4/enable + fi which gcc which g++ unset CC @@ -2261,7 +2269,15 @@ if [[ "$CENTOS_SIX" = '6' && "$CLANG" = [nN] ]]; then export CC="ccache gcc" export CXX="ccache g++" else - source /opt/rh/devtoolset-4/enable + if [[ "$DEVTOOLSETSEVEN" = [yY] ]]; then + source /opt/rh/devtoolset-7/enable + DEVTOOLSETSEVEN_FALLTHROUGH=' -Wimplicit-fallthrough=0' + DEVTOOLSETSEVEN_EXTRAFLAGS=' -fcode-hoisting' + elif [[ "$DEVTOOLSETSIX" = [yY] ]]; then + source /opt/rh/devtoolset-6/enable + else + source /opt/rh/devtoolset-4/enable + fi which gcc which g++ unset CC