Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp806232img; Mon, 18 Mar 2019 14:49:33 -0700 (PDT) X-Google-Smtp-Source: APXvYqyHwVt9Y1y7aC6NwFa5kR1fwkhK8cNYfWwfezVjFnltra+4seR2yM4algZpsDgddgRhk1+W X-Received: by 2002:a17:902:b413:: with SMTP id x19mr21982720plr.256.1552945773127; Mon, 18 Mar 2019 14:49:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552945773; cv=none; d=google.com; s=arc-20160816; b=zKtxObHW0npoRaH2jl6I+Z3CyDOgc77YYqtjuZsqlaLJXgAqgYfrVy38f9UbAXYHHB ua+8q9+TIjtDMep5yLKTArdnyfTWCwsJEDVjF2mtIO+rD6LPkcDewgvp5G2DewVFU16W M7UVQ2g5qB2XLeEVgmrvdRGaUjGVs3BQtGDBXjliC0UpmWqX90Jx1Ix7Y0Orh5P1GoYK XRJ07MVhhxgm379YuZC9Sa5aXdvCl8lpGcdCRivZnMsC7X5IfvlWz0inZaIu61+lGc+H 6BopJkWoteTEuu8J5neBZoAqK7m2ke0fIu+URxKxsgBsvgBYO4KGifStVWCUc2FJS3j9 TtcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=agYS0IwXFgBu4pc5CJZTRwoxt1/eC7gb+mIihEfUuM4=; b=FGicy1GraxmVtzZpkixbm7jwRo07DspfWclO6dseuIxJ38I48BbEuGgPPtD6GnoSmQ wAQOT6n/9zjKw1zZq/E9k+d6JWgHM25D2A+qhge4OGSuU63+Puw85YyJntDdWfxqn6xm loErNPw+muZlNEB2dDNdYhrDCSLlJCNZlnRz4cFysX2++KgfrTfDgr2WpN0y37LopPDu NK3uSz3mM7t6foxcJ1v2fq11qEXyAjbibkGBt+K8M4HYod2BLuqqF7VhW1j+DaZ1576A k+qMCCJt6CqN/bafzBd8x+spyCY7d5tP0/s5N8DcI6Eg0dZTKQrdGP/VDyHnhtllwHCB Jhxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=DRGDGxTD; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id k16si10298859pfj.174.2019.03.18.14.49.17; Mon, 18 Mar 2019 14:49:33 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=DRGDGxTD; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1727832AbfCRVr0 (ORCPT + 99 others); Mon, 18 Mar 2019 17:47:26 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:41216 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726983AbfCRVr0 (ORCPT ); Mon, 18 Mar 2019 17:47:26 -0400 Received: by mail-pg1-f194.google.com with SMTP id k11so12300752pgb.8 for ; Mon, 18 Mar 2019 14:47:25 -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=agYS0IwXFgBu4pc5CJZTRwoxt1/eC7gb+mIihEfUuM4=; b=DRGDGxTDjF2JkqDldJKrdDbMJQ1kNz53JgDxarSWUOJi2zUIIn90abi/oB89xQY2fY vb4MuT/TPdb+DwN/OSu9kv8B1izlneXRHQLVtlv4bWoIWO+SUBuywTXG3OLYh1xnMlOA Nn5OiG6l2j5YVDUt3DTRaIVn0yx86N26dSGzjWVOzCdVFFERrFkJC6V9gvxoJzP0+or6 nBYPCwZ97hyYT7U6SBVZH03WhujcIBXlRdqLgQfaUUCVWq5Q0HB//6KhVhdSazCzCgqT v9gUb+1cH0NZ9O/V7fhjKXsOmaLVh9nmUMjUCk8pX+K9udHzodfWxJOYVrH6bfHD0mcE 3CVw== 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=agYS0IwXFgBu4pc5CJZTRwoxt1/eC7gb+mIihEfUuM4=; b=aKbT2Gn5S1NRwe73w3fpJ/pyfTaQzWSiCNCvWecqZ8f78ouLjdmBGZWWPp5NwbeSP6 SPzJuLhbYA0MgK8cTC2jWFqK3yx8SO+zbkjeY21gFqrwcuYghkXzG9Qs+u6cwilyNGkV nkMolCIr8hgvpxOHoseN5Xg8K5cQ/3dSYlDBNIXuFEz96aU7J5PtthJ0xh2U/fxm4ZGb H80YuZh94ffHnWMO2tlhffhsT4mDzzXGvFA9I2dRRlZzBoSsK6ytf8qwd+BR2VWY5F2W FT+uszpcHcX9dsaqonBOXtkVWob0sBo/+bhMXWS+82DsP8UXhmS4IMeeFNP2fpzn2Bex brrQ== X-Gm-Message-State: APjAAAU0mH6UAcE83RY/yIVKzTMLywE2eENA34Tkn9HpqmI3KB4Sxmln injfFiPZZt2hzd1dajb6tWEBqEPAUsllsRbLMBoU9w== X-Received: by 2002:a63:5a20:: with SMTP id o32mr18904379pgb.225.1552945644929; Mon, 18 Mar 2019 14:47:24 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Nick Desaulniers Date: Mon, 18 Mar 2019 14:47:13 -0700 Message-ID: Subject: Re: [PATCH] Revert "kbuild: use -Oz instead of -Os when using clang" To: Matthias Kaehlcke Cc: Masahiro Yamada , Michal Marek , Linux Kbuild mailing list , LKML , Behan Webster , Peter Zijlstra , "H . Peter Anvin" , Manoj Gupta , Tiancong Wang , Stephen Hines , clang-built-linux@googlegroups.com Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 18, 2019 at 2:10 PM Matthias Kaehlcke wrote: > > The clang option -Oz enables *aggressive* optimization for size, > which doesn't necessarily result in smaller images, but can have > negative impact on performance. Switch back to the less aggressive > -Os. > > This reverts commit 6748cb3c299de1ffbe56733647b01dbcc398c419. Does scripts/checkpatch.pl complain about this format (full sha, no title)? Not sure that necessitates a v2, but if so would be good to mention that Clang generates excessive calls into libgcc/compiler-rt at -Oz. Thanks for the patch and the discussion/sanity check. Reviewed-by: Nick Desaulniers > > Suggested-by: Peter Zijlstra > Signed-off-by: Matthias Kaehlcke > --- > Makefile | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/Makefile b/Makefile > index 9ef547fc7ffe..191f3ce3cb5e 100644 > --- a/Makefile > +++ b/Makefile > @@ -667,7 +667,7 @@ KBUILD_CFLAGS += $(call cc-disable-warning, format-overflow) > KBUILD_CFLAGS += $(call cc-disable-warning, int-in-bool-context) > > ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE > -KBUILD_CFLAGS += $(call cc-option,-Oz,-Os) > +KBUILD_CFLAGS += -Os > else > KBUILD_CFLAGS += -O2 > endif > -- > 2.21.0.225.g810b269d1ac-goog -- Thanks, ~Nick Desaulniers