Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
add devtoolset-7 GCC 7.2.1 support to CentOS 6.x 123.09beta01 part 2
- additional updates for devtoolset-7 GCC 7.2.1 support in CentOS 6.x
  • Loading branch information
centminmod committed Nov 6, 2017
1 parent d6666ec commit d1d4d58
Showing 1 changed file with 20 additions and 4 deletions.
24 changes: 20 additions & 4 deletions inc/nginx_configure.inc
Expand Up @@ -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
Expand Down Expand Up @@ -2247,21 +2247,37 @@ 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
unset CXX
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
Expand Down

0 comments on commit d1d4d58

Please sign in to comment.