Join the community today
Become a Member

Beta Branch update nginx compile switch -fstack-protector to -fstack-protector-st…

Discussion in 'Centmin Mod Github Commits' started by eva2000, Aug 19, 2016.

  1. eva2000

    eva2000 Administrator Staff Member

    55,811
    12,273
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,859
    Local Time:
    5:53 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    update nginx compile switch -fstack-protector to -fstack-protector-strong if system supported in 123.09beta01

    Enable strong stack protection for nginx source compiles when detected system supports it. "Strong" stack protection for GCC [LWN.net]

    Works fine on tested CentOS 7's GCC 4.8.5 version but doesn't seem to compile properly with Clang 3.4.2.

    So updated inc/nginx_configure.inc routine in Centmin Mod 123.09beta01 to detect if clang is used or when GCC version <4.8.5 is used it will use -fstack-protector. If GCC >4.8.5 detected i.e. CentOS 7, then nginx compile will use -fstack-protector-strong. Centmin Mod Nginx defaults to Clang 3.4.2 compiler out of the box unless ngx_pagespeed 1.10+ and higher are used (NGINX_PAGESPEED='y') or when Openresty Nginx Lua modules are enabled (ORESTY_LUANGINX='y') as they both require higher system GCC versions than what Clang can support to properly compile Nginx with those modules.


    Centmin Mod centmin.sh menu option 4 for Nginx upgrade, downgrade or recompiles will automatically detect what your system supports GCC version wise and auto detects which nginx modules are configured and auto switch between GCC and Clang appropriately.

    Continue reading...

    123.09beta01 branch
     
  2. eva2000

    eva2000 Administrator Staff Member

    55,811
    12,273
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,859
    Local Time:
    5:53 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    FYI, you can also force GCC usage instead of Clang using persistent config file /etc/centminmod/custom_config.inc and set
    Code (Text):
    CLANG='n'
    

    and then run centmin.sh menu option 4 to recompile nginx with GCC. -fstack-protector-strong will then be used if centmin mod detects GCC >4.8.5

    centmin.sh menu option 4
    Code (Text):
    --------------------------------------------------------
         Centmin Mod Menu 123.09beta01 centminmod.com     
    --------------------------------------------------------
    1).  Centmin Install
    2).  Add Nginx vhost domain
    3).  NSD setup domain name DNS
    4).  Nginx Upgrade / Downgrade
    5).  PHP Upgrade / Downgrade
    6).  XCache Re-install
    7).  APC Cache Re-install
    8).  XCache Install
    9).  APC Cache Install
    10). Memcached Server Re-install
    11). MariaDB 5.2/5.5 & 10.x Upgrade Sub-Menu
    12). Zend OpCache Install/Re-install
    13). Install/Reinstall Redis PHP Extension
    14). SELinux disable
    15). Install/Reinstall ImagicK PHP Extension
    16). Change SSHD Port Number
    17). Multi-thread compression: pigz,pbzip2,lbzip2...
    18). Suhosin PHP Extension install
    19). Install FFMPEG and FFMPEG PHP Extension
    20). NSD Install/Re-Install
    21). Update - Nginx + PHP-FPM + Siege
    22). Add Wordpress Nginx vhost + Cache Plugin
    23). Update Centmin Mod Code Base
    24). Exit
    --------------------------------------------------------
    Enter option [ 1 - 24 ] 4
    --------------------------------------------------------
     
  3. eva2000

    eva2000 Administrator Staff Member

    55,811
    12,273
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,859
    Local Time:
    5:53 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    on CentOS 6.8