From patchwork Tue Oct 24 11:14:23 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 829867 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-464955-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="QC7utDM+"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3yLrJZ40t7z9t3H for ; Tue, 24 Oct 2017 22:14:37 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:mime-version:content-type; q=dns; s= default; b=fPzZLmc45vddvCysPsZMRJDtzXhXmcUJ/8UZkZd85fiPZ95M6Kioq 76uTmWgGjFIeG7IFWT48WQt1rEOJ3NaRuIC4Eh1dW9tlKIZuL1YmBfYC5BwvfGGV PxMByRdZUk6GNG4U5xsQaTfdYan22iskYUNt//OBSJDUJO0AZNsNE4= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:mime-version:content-type; s= default; bh=I1YyBf80GZyrH1+ZbTgZhjCtbyY=; b=QC7utDM+NlgkNoe6uTXF iBglwpHYKmNi1FvYsC6qx7M8uwasn9lC5vXtiBMOXYcCKppeQtz06oo6b2BM1gGf qq2XQhZrHpg+HkAZdByZEBBw8Bvi4ls7yd6qf8Lu4u4h0T2pPjelNaD2vNW1PEQQ LyRt8qvaaoObOqWVU6u6NuU= Received: (qmail 14657 invoked by alias); 24 Oct 2017 11:14:28 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 14644 invoked by uid 89); 24 Oct 2017 11:14:28 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy=sk:withbu, sk:with-bu, bootstrapdebug, bootstrap-debug X-HELO: mail-pg0-f45.google.com Received: from mail-pg0-f45.google.com (HELO mail-pg0-f45.google.com) (74.125.83.45) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 24 Oct 2017 11:14:26 +0000 Received: by mail-pg0-f45.google.com with SMTP id a192so14222368pge.9 for ; Tue, 24 Oct 2017 04:14:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-disposition:user-agent; bh=5ETiQKtKB1HeT1h1wYZzCCRhmEjFgSEg49y8nFzqnTU=; b=LqZcT7XbUDveFtd4XWZvehvRm3eHAzyZuyfTpZY0fKd60aTWSoYBW6+rqaCMT83t06 xXO7nxrPRfF5AJYKKEZN3O2QOq30+ERhTOA8Sl2XXw0lOoUKOty5AOyH04BlJ/YHyCiN 0zwGIihU+Upuo20s6/tTXKJyOWsWo9Xan1cQEnwi1hm+gOfwCIcsV0QRnPCAk6Ic5Mf6 qGBAzlBZIR7CEOyzWh4XwqvTb8Wdnvt/CFua46HKpuy8UQxfaQr6XuhrCYoXC9opt3lg brs6AZCakiukEuJU2eIKSBpRt2xr70u+6LarLLcP2wZG4ABSDBh4ZV4DGT/hq/truw/n E0xQ== X-Gm-Message-State: AMCzsaWsWbPah2/SI2aEI0AxCSJboa/Hn2bTNLa/hJjSnnGkuflW1qVx dosl94B8iYPgV4l2IiJM2cFS6A== X-Google-Smtp-Source: ABhQp+SeVPAHNfA21jLtaNUxvAugwdbZyu/18t0nM1D/Uxi4858aqJwbfi1mC33ycPzX03zg/iEa6Q== X-Received: by 10.99.4.133 with SMTP id 127mr14164714pge.72.1508843664780; Tue, 24 Oct 2017 04:14:24 -0700 (PDT) Received: from gnu-tools-1.localdomain (c-73-93-86-59.hsd1.ca.comcast.net. [73.93.86.59]) by smtp.gmail.com with ESMTPSA id x27sm88454pfe.172.2017.10.24.04.14.24 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 24 Oct 2017 04:14:24 -0700 (PDT) Received: by gnu-tools-1.localdomain (Postfix, from userid 1000) id 4FB0C1C055B; Tue, 24 Oct 2017 04:14:23 -0700 (PDT) Date: Tue, 24 Oct 2017 04:14:23 -0700 From: "H.J. Lu" To: gcc-patches@gcc.gnu.org Subject: [PATCH] Add bootstrap-cet.mk to bootstrap GCC with Intel CET Message-ID: <20171024111423.GA27563@gmail.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.9.1 (2017-09-22) X-IsSubscribed: yes 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 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