3 ms·
Suggestion for Debian: if you get error: unrecognized command line option ‘-fstack-clash-protection’; did you mean ‘-fstack-protector’, do: echo "deb http://ft
by 1996 8y ago
Suggestion for Debian: if you get error: unrecognized command line option ‘-fstack-clash-protection’; did you mean ‘-fstack-protector’, do:
echo "deb http://ftp.us.debian.org/debian/ http://ftp.us.debian.org/debian/ testing main non-free contrib
deb-src http://ftp.us.debian.org/debian/ http://ftp.us.debian.org/debian/ testing main non-free contrib" > /etc/apt/source.list.d/debian-testing.list
apt-get update
apt-get install gcc-8/testing
The Makefile can then contain the above line:
CFLAGS = -std=c99 -Wall -Wextra -Wno-missing-field-initializers -D_FORTIFY_SOURCE=2 -O2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -ftrapv -s -g -Wl,-z,relro,-z,now -Wl,-z,noexecstack -pipe -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -fstack-clash-protection --param ssp-buffer-size=4 -fPIE -pie -m64 -mtune=generic
and:
CC = gcc-8
Replace -mtune=generic by your CPU, cf https://wiki.gentoo.org/wiki/Safe_CFLAGS https://wiki.gentoo.org/wiki/Safe_CFLAGS