From patchwork Tue Jul 30 16:40:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andi Kleen X-Patchwork-Id: 1966660 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=VVJbLdd2; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WYLZy4QS3z1ybX for ; Wed, 31 Jul 2024 02:41:14 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id E079E385C6C9 for ; Tue, 30 Jul 2024 16:41:12 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.17]) by sourceware.org (Postfix) with ESMTPS id 16E1A3857011; Tue, 30 Jul 2024 16:40:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 16E1A3857011 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=linux.intel.com Authentication-Results: sourceware.org; spf=none smtp.mailfrom=linux.intel.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 16E1A3857011 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=192.198.163.17 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1722357652; cv=none; b=T76+oNpwogieO8ZFnBcc46ZUfDFCDuR+YPZCgKCIVgfpbHTIiCqbwCIy14fOjq419u9sAeHjLm27Xso+26qsdci+Gb3wXfQL7/LcJBwtjAqa/sP6AzsVi7QWg32npHLKGMutI1flrZcr7vFuKmNViat0ClEQfPRLdzUMet+t+ng= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1722357652; c=relaxed/simple; bh=mE16RrWp+fWgR95XWK6rrJIdiqxk3dPrlV9DDe0/15A=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=Tqddmaq6TzYeS9a6GcwxhoxHY2HLYsLfltkVdBNvZSxF5fjT/hNuF4bXRD5c/xZ6K92NIxRRF4do/J1T2d2Kkx1nHfl349qFeOfykQl71k/FgWWLjPazi0QI2SFaX0oaqfTc4ZFj0amJs18tMgBegEU5B+c+xKNK4zARSQhUpVo= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1722357650; x=1753893650; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=mE16RrWp+fWgR95XWK6rrJIdiqxk3dPrlV9DDe0/15A=; b=VVJbLdd2287zBVk2CweKbDt8BYay75kVSIoZK7r4EN/3uSePbzFEo+JN XPRZsFyg5Lv7pSz2wpUtWjgsexnqR5m56mlTjAwJ2vkACTNfvdeKCRF6x FdxvOkU3tnGi9P0BgS2u7o/9mcLg45Y3cpsAryim0Y/0CcL9pDAJ4HxDB AsqO9MVG2lGUWvztKareVl8mZY6ymRMdG9P/cKkWuDUuhTn3vPWUGXxEC a4p1eejOIZxhGgpNV7HdWjQ8GNK4ZBxtuDsCgFyzawGi5bf78+EFyB1T2 e+4bfP0SDOLEJ/jtx1uokVe7U47dD0DaeRaSryiN87OGOl9JKTS0K8C4t A==; X-CSE-ConnectionGUID: crU2R1hHQpqZ6AjASExC/A== X-CSE-MsgGUID: yu4gE9FyTXazgkHPjDr8fA== X-IronPort-AV: E=McAfee;i="6700,10204,11149"; a="20073842" X-IronPort-AV: E=Sophos;i="6.09,248,1716274800"; d="scan'208";a="20073842" Received: from orviesa003.jf.intel.com ([10.64.159.143]) by fmvoesa111.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Jul 2024 09:40:49 -0700 X-CSE-ConnectionGUID: AuXYBFDYSqS4p+In7knTVA== X-CSE-MsgGUID: q6Wtp9NvRDK8zCZNQ5yZ4A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.09,248,1716274800"; d="scan'208";a="59251317" Received: from tassilo.jf.intel.com ([10.54.38.190]) by ORVIESA003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Jul 2024 09:40:48 -0700 From: Andi Kleen To: gcc-patches@gcc.gnu.org Cc: Andi Kleen Subject: [PATCH] Add a bootstrap-native build config Date: Tue, 30 Jul 2024 09:40:42 -0700 Message-ID: <20240730164042.4106759-1-ak@linux.intel.com> X-Mailer: git-send-email 2.45.2 MIME-Version: 1.0 X-Spam-Status: No, score=-11.1 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org From: Andi Kleen ... that uses -march=native -mtune=native to build a compiler optimized for the host. config/ChangeLog: * bootstrap-native.mk: New file. gcc/ChangeLog: * doc/install.texi: Document bootstrap-native. --- config/bootstrap-native.mk | 1 + gcc/doc/install.texi | 6 ++++++ 2 files changed, 7 insertions(+) create mode 100644 config/bootstrap-native.mk diff --git a/config/bootstrap-native.mk b/config/bootstrap-native.mk new file mode 100644 index 000000000000..a4a3d8594089 --- /dev/null +++ b/config/bootstrap-native.mk @@ -0,0 +1 @@ +BOOT_CFLAGS := -march=native -mtune=native $(BOOT_CFLAGS) diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi index 4973f195daf9..29827c5106f8 100644 --- a/gcc/doc/install.texi +++ b/gcc/doc/install.texi @@ -3052,6 +3052,12 @@ Removes any @option{-O}-started option from @code{BOOT_CFLAGS}, and adds @itemx @samp{bootstrap-Og} Analogous to @code{bootstrap-O1}. +@item @samp{bootstrap-native} +@itemx @samp{bootstrap-native} +Optimize the compiler code for the build host, if supported by the +architecture. Note this only affects the compiler, not the targeted +code. If you want the later use @samp{--with-cpu}. + @item @samp{bootstrap-lto} Enables Link-Time Optimization for host tools during bootstrapping. @samp{BUILD_CONFIG=bootstrap-lto} is equivalent to adding