diff mbox series

Add bootstrap-cet.mk to bootstrap GCC with Intel CET

Message ID 20171024111423.GA27563@gmail.com
State New
Headers show
Series Add bootstrap-cet.mk to bootstrap GCC with Intel CET | expand

Commit Message

H.J. Lu Oct. 24, 2017, 11:14 a.m. UTC
Bootstrap GCC with Intel CET by configuring GCC with

--with-build-config="bootstrap-cet bootstrap-debug"

Tested on Linux/i686 and Linux/x86-64.

OK for trunk?

H.J.
---
config/

	* bootstrap-cet.mk: New file.

gcc/

	* doc/install.texi: Document bootstrap-cet.
---
 config/bootstrap-cet.mk | 4 ++++
 gcc/doc/install.texi    | 7 +++++++
 2 files changed, 11 insertions(+)
 create mode 100644 config/bootstrap-cet.mk

Comments

Richard Biener Oct. 24, 2017, 12:42 p.m. UTC | #1
On Tue, Oct 24, 2017 at 1:14 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
> Bootstrap GCC with Intel CET by configuring GCC with
>
> --with-build-config="bootstrap-cet bootstrap-debug"
>
> Tested on Linux/i686 and Linux/x86-64.
>
> OK for trunk?

Ok.  Do you have a simulator that understands CET yet?

Richard.

> H.J.
> ---
> config/
>
>         * bootstrap-cet.mk: New file.
>
> gcc/
>
>         * doc/install.texi: Document bootstrap-cet.
> ---
>  config/bootstrap-cet.mk | 4 ++++
>  gcc/doc/install.texi    | 7 +++++++
>  2 files changed, 11 insertions(+)
>  create mode 100644 config/bootstrap-cet.mk
>
> diff --git a/config/bootstrap-cet.mk b/config/bootstrap-cet.mk
> new file mode 100644
> index 00000000000..f09193a6dea
> --- /dev/null
> +++ b/config/bootstrap-cet.mk
> @@ -0,0 +1,4 @@
> +# This option enables -fcf-protection -mcet for stage2 and stage3.
> +
> +STAGE2_CFLAGS += -fcf-protection -mcet
> +STAGE3_CFLAGS += -fcf-protection -mcet
> diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi
> index da360da1c50..82a63607b2d 100644
> --- a/gcc/doc/install.texi
> +++ b/gcc/doc/install.texi
> @@ -2492,6 +2492,13 @@ useful to verify the full @option{-fcompare-debug} testing coverage.  It
>  must be used along with @code{bootstrap-debug-lean} and
>  @code{bootstrap-debug-lib}.
>
> +@item @samp{bootstrap-cet}
> +This option enables Intel CET for host tools during bootstrapping.
> +@samp{BUILD_CONFIG=bootstrap-cet} is equivalent to adding
> +@option{-fcf-protection -mcet} to @samp{BOOT_CFLAGS}.  This option
> +assumes that the host supports Intel CET (e.g. GNU assembler version
> +2.30 or later).
> +
>  @item @samp{bootstrap-time}
>  Arranges for the run time of each program started by the GCC driver,
>  built in any stage, to be logged to @file{time.log}, in the top level of
> --
> 2.13.6
>
H.J. Lu Oct. 24, 2017, 12:47 p.m. UTC | #2
On Tue, Oct 24, 2017 at 5:42 AM, Richard Biener
<richard.guenther@gmail.com> wrote:
> On Tue, Oct 24, 2017 at 1:14 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
>> Bootstrap GCC with Intel CET by configuring GCC with
>>
>> --with-build-config="bootstrap-cet bootstrap-debug"
>>
>> Tested on Linux/i686 and Linux/x86-64.
>>
>> OK for trunk?
>
> Ok.  Do you have a simulator that understands CET yet?

There is one.  I will check if it is available to public.

> Richard.
>
>> H.J.
>> ---
>> config/
>>
>>         * bootstrap-cet.mk: New file.
>>
>> gcc/
>>
>>         * doc/install.texi: Document bootstrap-cet.
>> ---
>>  config/bootstrap-cet.mk | 4 ++++
>>  gcc/doc/install.texi    | 7 +++++++
>>  2 files changed, 11 insertions(+)
>>  create mode 100644 config/bootstrap-cet.mk
>>
>> diff --git a/config/bootstrap-cet.mk b/config/bootstrap-cet.mk
>> new file mode 100644
>> index 00000000000..f09193a6dea
>> --- /dev/null
>> +++ b/config/bootstrap-cet.mk
>> @@ -0,0 +1,4 @@
>> +# This option enables -fcf-protection -mcet for stage2 and stage3.
>> +
>> +STAGE2_CFLAGS += -fcf-protection -mcet
>> +STAGE3_CFLAGS += -fcf-protection -mcet
>> diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi
>> index da360da1c50..82a63607b2d 100644
>> --- a/gcc/doc/install.texi
>> +++ b/gcc/doc/install.texi
>> @@ -2492,6 +2492,13 @@ useful to verify the full @option{-fcompare-debug} testing coverage.  It
>>  must be used along with @code{bootstrap-debug-lean} and
>>  @code{bootstrap-debug-lib}.
>>
>> +@item @samp{bootstrap-cet}
>> +This option enables Intel CET for host tools during bootstrapping.
>> +@samp{BUILD_CONFIG=bootstrap-cet} is equivalent to adding
>> +@option{-fcf-protection -mcet} to @samp{BOOT_CFLAGS}.  This option
>> +assumes that the host supports Intel CET (e.g. GNU assembler version
>> +2.30 or later).
>> +
>>  @item @samp{bootstrap-time}
>>  Arranges for the run time of each program started by the GCC driver,
>>  built in any stage, to be logged to @file{time.log}, in the top level of
>> --
>> 2.13.6
>>
diff mbox series

Patch

diff --git a/config/bootstrap-cet.mk b/config/bootstrap-cet.mk
new file mode 100644
index 00000000000..f09193a6dea
--- /dev/null
+++ b/config/bootstrap-cet.mk
@@ -0,0 +1,4 @@ 
+# This option enables -fcf-protection -mcet for stage2 and stage3.
+
+STAGE2_CFLAGS += -fcf-protection -mcet
+STAGE3_CFLAGS += -fcf-protection -mcet
diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi
index da360da1c50..82a63607b2d 100644
--- a/gcc/doc/install.texi
+++ b/gcc/doc/install.texi
@@ -2492,6 +2492,13 @@  useful to verify the full @option{-fcompare-debug} testing coverage.  It
 must be used along with @code{bootstrap-debug-lean} and
 @code{bootstrap-debug-lib}.
 
+@item @samp{bootstrap-cet}
+This option enables Intel CET for host tools during bootstrapping.
+@samp{BUILD_CONFIG=bootstrap-cet} is equivalent to adding
+@option{-fcf-protection -mcet} to @samp{BOOT_CFLAGS}.  This option
+assumes that the host supports Intel CET (e.g. GNU assembler version
+2.30 or later).
+
 @item @samp{bootstrap-time}
 Arranges for the run time of each program started by the GCC driver,
 built in any stage, to be logged to @file{time.log}, in the top level of