Since CentOS 6.x is an old distro it lacks newer GCC and thus you can’t use things like stack protector and some of the PAX security stuff :(
What you can do however, is to install the SCL repo and from there the devtoolset-4:

# yum install centos-release-scl.noarch centos-release-scl-rh.noarch
# yum install devtoolset-4 devtoolset-4-gcc-plugin-devel.x86_64

The above will install gcc and g++ 5.2. But before jumping into building your kernel you need to also install:

# yum install libmpc-devel.x86_64 libmpc.x86_64

Which is needed for proper gcc-plugins support.
Now you can simply start building your kernel:

# scl enable devtoolset-4 bash
# cd /usr/src/kernels/linux-4.4.34
# make


Comments are closed.

Posted by HackMan
Dated: 22nd November 2016
Filled Under: CentOS, Linux General, Technology