Skip to content

Commit

Permalink
Update Nginx Clang 5.0.1 compiler support
Browse files Browse the repository at this point in the history
llvm-toolset-7-clang package has updated from Clang 4.0.1 to 5.0.1 so make adjustments in Centmin Mod Nginx compilation routines for such support outlined at https://community.centminmod.com/threads/testing-gcc-8-clang-5-6-7-compiler-for-centmin-mod-nginx-php-fpm.13726/
  • Loading branch information
centminmod committed Aug 6, 2018
1 parent ec2c87f commit f47b277
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion centmin.sh
Expand Up @@ -21,7 +21,7 @@ DT=$(date +"%d%m%y-%H%M%S")
branchname='123.09beta01'
SCRIPT_MAJORVER='1.2.3'
SCRIPT_MINORVER='09'
SCRIPT_INCREMENTVER='042'
SCRIPT_INCREMENTVER='043'
SCRIPT_VERSIONSHORT="${branchname}"
SCRIPT_VERSION="${SCRIPT_VERSIONSHORT}.b${SCRIPT_INCREMENTVER}"
SCRIPT_DATE='31/07/2018'
Expand Down
7 changes: 5 additions & 2 deletions inc/brotli.inc
Expand Up @@ -113,7 +113,7 @@ scl_install() {
echo
/opt/gcc8/bin/gcc --version
/opt/gcc8/bin/g++ --version
elif [[ "$DEVTOOLSETSEVEN" = [yY] || "$CLANG_FOUR" = [yY] ]]; then
elif [[ "$DEVTOOLSETSEVEN" = [yY] || "$CLANG_FOUR" = [yY] || "$CLANG_FIVE" = [yY] ]]; then
if [[ -z "$(rpm -qa | grep rpmforge)" ]]; then
if [[ "$(rpm -ql devtoolset-7-gcc >/dev/null 2>&1; echo $?)" -ne '0' ]] || [[ "$(rpm -ql devtoolset-7-gcc-c++ >/dev/null 2>&1; echo $?)" -ne '0' ]] || [[ "$(rpm -ql devtoolset-7-binutils >/dev/null 2>&1; echo $?)" -ne '0' ]]; then
time $YUMDNFBIN -y -q install devtoolset-7-gcc devtoolset-7-gcc-c++ devtoolset-7-binutils
Expand All @@ -128,10 +128,13 @@ scl_install() {
if [[ "$CLANG_FOUR" = [yY] && ! -f /opt/rh/llvm-toolset-7/root/usr/bin/clang ]]; then
time $YUMDNFBIN -y install devtoolset-7-runtime llvm-toolset-7-runtime devtoolset-7-libstdc++-devel llvm-toolset-7-clang llvm-toolset-7-llvm-libs llvm-toolset-7-llvm-static llvm-toolset-7-compiler-rt llvm-toolset-7-libomp llvm-toolset-7-clang-libs
fi
if [[ "$CLANG_FIVE" = [yY] && ! -f /opt/rh/llvm-toolset-7/root/usr/bin/clang ]]; then
time $YUMDNFBIN -y install devtoolset-7-runtime llvm-toolset-7-runtime devtoolset-7-libstdc++-devel llvm-toolset-7-clang llvm-toolset-7-llvm-libs llvm-toolset-7-llvm-static llvm-toolset-7-compiler-rt llvm-toolset-7-libomp llvm-toolset-7-clang-libs
fi
echo
/opt/rh/devtoolset-7/root/usr/bin/gcc --version
/opt/rh/devtoolset-7/root/usr/bin/g++ --version
if [[ "$CLANG_FOUR" = [yY] && -f /opt/rh/llvm-toolset-7/root/usr/bin/clang ]]; then
if [[ "$CLANG_FOUR" = [yY] && -f /opt/rh/llvm-toolset-7/root/usr/bin/clang || "$CLANG_FIVE" = [yY] && -f /opt/rh/llvm-toolset-7/root/usr/bin/clang ]]; then
/opt/rh/llvm-toolset-7/root/usr/bin/clang -v
fi
# if [[ -f /opt/rh/llvm-toolset-7/root/usr/bin/clang++ ]]; then
Expand Down
6 changes: 4 additions & 2 deletions inc/nginx_configure.inc
Expand Up @@ -2426,9 +2426,11 @@ if [[ "$CENTOS_SEVEN" = '7' && "$CLANG_FOUR" = [yY] ]]; then
else
CLANG_NEWBIN='/opt/sbin/llvm-release_40/bin/clang'
fi
elif [[ "$CENTOS_SEVEN" = '7' && "$CLANG_FIVE" = [yY] ]]; then
elif [[ "$CENTOS_SEVEN" = '7' && "$CLANG_FIVE" = [yY] && -f /opt/rh/llvm-toolset-7/root/usr/bin/clang ]]; then
CLANG_NEWBIN='/opt/rh/llvm-toolset-7/root/usr/bin/clang'
elif [[ "$CENTOS_SEVEN" = '7' && "$CLANG_FIVE" = [yY] && -f /opt/sbin/llvm-release_50/bin/clang ]]; then
CLANG_NEWBIN='/opt/sbin/llvm-release_50/bin/clang'
elif [[ "$CENTOS_SEVEN" = '7' && "$CLANG_SIX" = [yY] ]]; then
elif [[ "$CENTOS_SEVEN" = '7' && "$CLANG_SIX" = [yY] && -f /opt/sbin/llvm-release_60/bin/clang ]]; then
CLANG_NEWBIN='/opt/sbin/llvm-release_60/bin/clang'
elif [[ "$CENTOS_SEVEN" = '7' && "$CLANG_MASTER" = [yY] ]]; then
CLANG_NEWBIN='/opt/sbin/llvm-release_master/bin/clang'
Expand Down

0 comments on commit f47b277

Please sign in to comment.