Re: CLANG and -fstack-protector

From: Dimitry Andric <dim_at_FreeBSD.org>
Date: Thu, 07 Feb 2013 22:06:49 +0100
On 2013-02-07 20:42, Kimmo Paasiala wrote:
> Does the -fstack-protector option work on CLANG 3.1 and 3.2?

Yes, it works with both clang and gcc.


> There is thread on FreeBSD forums about the stack protector and ports
> and I'm wondering if it's possible to use the -fstack-protector option
> with CLANG.
>
> http://forums.freebsd.org/showthread.php?t=36927

That thread seems to be full of confusion. :-)  The base system is mostly
built with -fstack-protector, except for the ia64, arm and mips arches,
and for some specific cases where it is not necessary, or unwanted.

Ports are largely independent of the base system, and their compilation
flags are different from port to port.  You could set -fstack-protector
for your ports in either make.conf or ports.conf, if you wanted.
Received on Thu Feb 07 2013 - 20:06:54 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:34 UTC