diff mbox series

[1/2] x86/CET: Add -fcf-protection to STAGE4_CFLAGS

Message ID 20180424170814.3843-1-hjl.tools@gmail.com
State New
Headers show
Series [1/2] x86/CET: Add -fcf-protection to STAGE4_CFLAGS | expand

Commit Message

H.J. Lu April 24, 2018, 5:08 p.m. UTC
Since profiledbootstrap uses

STAGEfeedback_CFLAGS = $(STAGE4_CFLAGS) -fprofile-use

add

STAGE4_CFLAGS += -fcf-protection -mcet

to bootstrap-cet.mk to support profiledbootstrap with CET.

	PR bootstrap/85490
	* bootstrap-cet.mk (STAGE4_CFLAGS): New.
---
 config/bootstrap-cet.mk | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Tsimbalist, Igor V April 24, 2018, 10:09 p.m. UTC | #1
> -----Original Message-----
> From: gcc-patches-owner@gcc.gnu.org [mailto:gcc-patches-
> owner@gcc.gnu.org] On Behalf Of H.J. Lu
> Sent: Tuesday, April 24, 2018 7:08 PM
> To: gcc-patches@gcc.gnu.org
> Cc: Tsimbalist, Igor V <igor.v.tsimbalist@intel.com>; Uros Bizjak
> <ubizjak@gmail.com>
> Subject: [PATCH 1/2] x86/CET: Add -fcf-protection to STAGE4_CFLAGS
> 
> Since profiledbootstrap uses
> 
> STAGEfeedback_CFLAGS = $(STAGE4_CFLAGS) -fprofile-use
> 
> add
> 
> STAGE4_CFLAGS += -fcf-protection -mcet
> 
> to bootstrap-cet.mk to support profiledbootstrap with CET.
> 
> 	PR bootstrap/85490
> 	* bootstrap-cet.mk (STAGE4_CFLAGS): New.
> ---
>  config/bootstrap-cet.mk | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/config/bootstrap-cet.mk b/config/bootstrap-cet.mk
> index b5dee601a3f..6ef1ba279cd 100644
> --- a/config/bootstrap-cet.mk
> +++ b/config/bootstrap-cet.mk
> @@ -1,4 +1,5 @@
> -# This option enables -fcf-protection for stage2 and stage3.
> +# This option enables -fcf-protection for stage2, stage3 and stage4.
> 
>  STAGE2_CFLAGS += -fcf-protection
>  STAGE3_CFLAGS += -fcf-protection
> +STAGE4_CFLAGS += -fcf-protection
> --
> 2.14.3

OK.

Igor
diff mbox series

Patch

diff --git a/config/bootstrap-cet.mk b/config/bootstrap-cet.mk
index b5dee601a3f..6ef1ba279cd 100644
--- a/config/bootstrap-cet.mk
+++ b/config/bootstrap-cet.mk
@@ -1,4 +1,5 @@ 
-# This option enables -fcf-protection for stage2 and stage3.
+# This option enables -fcf-protection for stage2, stage3 and stage4.
 
 STAGE2_CFLAGS += -fcf-protection
 STAGE3_CFLAGS += -fcf-protection
+STAGE4_CFLAGS += -fcf-protection