Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp1442834pxb; Tue, 17 Aug 2021 11:50:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzUEf2ZvyW52ixh3B1sT6P2RpTFzognYuEs0yOWoKhdg7j6biN9C+2eehtOg+0mzfwDZprv X-Received: by 2002:a92:c90a:: with SMTP id t10mr3553022ilp.188.1629226215997; Tue, 17 Aug 2021 11:50:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629226215; cv=none; d=google.com; s=arc-20160816; b=UTu9S+uguogurkbivEw0pxw3hioksvseeH8rc0D/iMxhTn4qJGua6UUawHz/jTxIOA LV3rromUQNSJQsLBArV1NKfRtVO1MMTq/ssyTJPYiBcp/gH2Juv5STsg6x41iCYNbX6/ dCDOLFpZ6RThD5rwb2UV01eZTo1c+23YcpMEaEzcNSQPktBRFY5uCGMm6HsIvPzrCnxh xF9iFJVyuTxVEUMkiJqjlFbyTiyz+4hCWkFHyu27D0LprzMbDYCm382RENyF614mVo5W zigf4kHXC43i27VvJSQJkgC9QV1AoCLlQf68k/EFHmTsCgMIrx6j+SeFLiXCwQok0wZO yAZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=alY8uh/6wUCPRdZH1MAlluu7K/itfkn6Amur4AolX1Q=; b=1CaDh1ScSXuHewc5FGd0bP2+GjlfyE37c71gQqMxx5kvY4qKUxpFeDCQmXMdNK3LG8 c5EKq2PhoJjMVw85O3Tgf92aDok7/Vk3C+5dyAPmC8b0YWr9Yr4jipCqm0GNH3wLWbHc gsZJcP978UwaTaIUB5EclCEkjZwswRYLEupwxuzwXlbX70U1DOND1OhRpfPcPkQTQVc9 9xQzolDWh0CWVay4gFwnbvy/mITk7EhEWT8DsOyn/R64U6aWvzt1zE1JWhFGTxJYXmur F6qUyUiL+rwg5spZiVEnSfjiL5SUtgGrnDLsH64S95wa3GoZtC15aJQi7bMlHveY1Arp j4iw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=NQibOidO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h13si2836493ila.73.2021.08.17.11.50.04; Tue, 17 Aug 2021 11:50:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=NQibOidO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233318AbhHQSsd (ORCPT + 99 others); Tue, 17 Aug 2021 14:48:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59734 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230373AbhHQSsa (ORCPT ); Tue, 17 Aug 2021 14:48:30 -0400 Received: from mail-lf1-x130.google.com (mail-lf1-x130.google.com [IPv6:2a00:1450:4864:20::130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EFBCEC061764 for ; Tue, 17 Aug 2021 11:47:56 -0700 (PDT) Received: by mail-lf1-x130.google.com with SMTP id r9so33786630lfn.3 for ; Tue, 17 Aug 2021 11:47:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=alY8uh/6wUCPRdZH1MAlluu7K/itfkn6Amur4AolX1Q=; b=NQibOidO2dEdyro6KFMCZxGMZBmzLSvNapwwlVJiPrJGKg0DcYgG+45B4U6OGrxX19 fem8v8KZbLWeY4YPDdW7+PpvnHJiN8SMKtvukFTKgxT6K0/xyp8HJ2IIE4VyHfML8NjS 9Jk162y78pcCU/wynJAsOwJN//0EeKzPFplU6TvkURRw0TOUJ1rbv5fpFrSIZL2Qe+AG vz2/nSuxk6xYn8vXCEmv174KhC91b13nCiYZKiaZbViZSGxhkiLvf0t4DcO5AN+KvX0f zQk7sapjz9bAH5QyulU7qwX2QiJEtrz+/+/wRc64Apy5mXzl8k8qkKOkgycEYqUKCduV y1NA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=alY8uh/6wUCPRdZH1MAlluu7K/itfkn6Amur4AolX1Q=; b=BzGouO/Gdhi+nNN7MNoUJTIzR1fALH1dUIaXGv7sBksjhF11GEBM/+qpDpp70l1v6D hqzTYGEX9YR+/p+QVIe4LgDWuDYVXSAPUlCVH34335EDcZVGSwMKlnD3kxtigbdLgSBo TDv8e3kQav3SbWNyPL1aEcH5XIPJgbGcCh81vwzstJmugwpSOal+wf/hz2FfyczuUcMf jhomja8i3p/umDP2J1bRtoD/iafpKbR/zaq9ouDR+rYMy7NKfhBVL8+eN5LVFUXknYb8 1EwwJqepvbQAzfzox0Lif1MXibgSukTWsCvC2UF3+hL5IGUEY36nYMIx+Wm2j7ovXl95 F9uw== X-Gm-Message-State: AOAM532QoPdt1HpBXuqq5hpfgh7x0X5x/k0EtU8WiKB5DrHEmc5YAvL8 u57QAu1RKMy/lFuBIsbmewNb5jwJglKlJw8t6vGXpQ== X-Received: by 2002:a19:7117:: with SMTP id m23mr3587131lfc.73.1629226074949; Tue, 17 Aug 2021 11:47:54 -0700 (PDT) MIME-Version: 1.0 References: <269701460.117528.1629210189833@office.mailbox.org> <796036867.117557.1629210288168@office.mailbox.org> In-Reply-To: From: Nick Desaulniers Date: Tue, 17 Aug 2021 11:47:43 -0700 Message-ID: Subject: Re: [PATCH 2/2] x86, Makefile: Add new generic x86-64 settings v2/v3/v4 To: Tor Vic Cc: "linux-kernel@vger.kernel.org" , "x86@kernel.org" , "clang-built-linux@googlegroups.com" , "graysky@archlinux.us" , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , Masahiro Yamada Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 17, 2021 at 11:31 AM Tor Vic wrote: > > On 17.08.21 18:22, Nick Desaulniers wrote: > > > > Ah, cc-option can be used from Kconfig. Perhaps a cc-option call to > > -march=x86-64-vX with a comment about which compiler versions first > > supported these (so that we can remove the feature test when the > > minimum supported toolchains are advanced) would be better? > > > > That makes sense. Will do a v2. > Which of these possibilities is more "expensive"? > I remember a recent patch where some of these calls were removed. cc-option does "cost" more than these version checks, but it is more concise about what we care about and they can be removed over time. They also work better for different compilers, since it's easy to forget to check one particular compiler, or get the compiler version wrong, or break a pre-released compiler. We generally want to prefer feature detection to version detection. I sent a series recently removing stale checks. -- Thanks, ~Nick Desaulniers