Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp809723img; Mon, 18 Mar 2019 14:57:00 -0700 (PDT) X-Google-Smtp-Source: APXvYqzqW8LzWlB1OKPEPhls6ESbuK/S487zTFy8U118QJnoF+0DJGQCk8/zG3+fZtVQH9L1HCun X-Received: by 2002:a17:902:8d8b:: with SMTP id v11mr22262330plo.241.1552946220282; Mon, 18 Mar 2019 14:57:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552946220; cv=none; d=google.com; s=arc-20160816; b=zmy0idUKUitsu2F+bTTxWB8ixX9QGhH4Oz5ov0mrLysEwC6LP/yLzBrJedUPzeU2QY TAzqiH2n4MtnpxLrFvZNg/IB1oUDh5j9yOMg/jyLbrsWtrkvyBc4OnuEuH2PiKSQEr6n pDRe9sZ9WjWD8hUo/K5wW8zf2/QBw4AWziNNoMvR1dCK2d7bDgCWKZw7r1RosYwxI+2N /xPzxd0Uk9k+FPJu7s9QAG3VkwQhMNBZkj094Mok9AM4jU9klslZUlVA+VvLQucNEe6n TMfvi5cTpmS8Q58HVM/aR0WUeO49cCx8DfO4MrG+SR1d3zqs2Y5goVm7K1k+h66ixkm7 Dd+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=SVuhiGy52/2ZlNVtnb+OWNbx6I5Gr7rOvksWn0tgavs=; b=LpVunDTZmWUPtCEE6NYNgMl7nmvYdfsmiAvhD+6Ua6wEWWJfn7Hkzi3qbgVjQUbSL6 aKoeWFCK1Wgo8UcAapcEByhT3wuCzfYdT8luP42+qxOkq+ck/A4xhKAtweD1+zy+qt5e tw4/5urFRj9IgIn0ZzfU4EuYE9sKJe+ql9ju2OA6D9gjF7Ounh3zcJDInZL2y47010FD NprHGnoIPn0YQtkso5nM2re8e14bLK/FG6KxGFP2mHEdE4T3t1MgpkMC+XHbOEH+A/i5 3Sag9PloIXs72rKiem1ljhZ4K/09Eacn2YqR5jMIZgDYJRhX99xQS94w3S/t/xMB3dGR jqvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=jmgxWp87; 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=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g4si9713390pgi.380.2019.03.18.14.56.44; Mon, 18 Mar 2019 14:57:00 -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=@chromium.org header.s=google header.b=jmgxWp87; 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=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727427AbfCRV4H (ORCPT + 99 others); Mon, 18 Mar 2019 17:56:07 -0400 Received: from mail-pg1-f193.google.com ([209.85.215.193]:45986 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727095AbfCRV4H (ORCPT ); Mon, 18 Mar 2019 17:56:07 -0400 Received: by mail-pg1-f193.google.com with SMTP id y3so3101261pgk.12 for ; Mon, 18 Mar 2019 14:56:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=SVuhiGy52/2ZlNVtnb+OWNbx6I5Gr7rOvksWn0tgavs=; b=jmgxWp87d4oE2VkG4tgsuH78UtqOXjxn45IcunvggxWHy6eGTEqXl9pva8dpNSgRFn e7V4Mz4HQJ8f8CqWNo2+byvwp1rvx/mrEp8WD1uoM2LCYjnuq+qTJjv7pfl0Ypn6FFsk woObhp5mHwbOTeYc1pVzTkzdi0aY4oefV5U9I= 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:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=SVuhiGy52/2ZlNVtnb+OWNbx6I5Gr7rOvksWn0tgavs=; b=qJ0uhf/BdbqoxPf9VYM/H0+0iRMLVaGu0CJuhIS7gLwApnN4/bVpL25wv2uvLXPYZT gXRBu25FOIVbWHoX4ZOkBiVRpInZ7mAX0wVvJErRdwx3Uuo7ViTbr12NV05pl3iRV12K plu9Lgd5yO2qFCRuLpp6aBeiT5DYFk5WLoZFW8HWWG9augikTtJpfxXQybrTcRREbsVh +/m7uzDTCPuL5gMDm8eKcfjaatHsEIEZ52+jAafOTW8UaiyX/QqtNrE7SlzKE44p2sjE +5NMNSKxLKFzQDV9P/fwE2Q75yGIcu1cqqJak5W1e+YTr+JAoknn5IF4r/NSde3JNJcf 1yTA== X-Gm-Message-State: APjAAAUnFVSE4F82IE6qB0bytJqc3M725Vl9qGl1yjJZ7bnkiRxqqLiJ qWJsoWO6+RnSBRdhcLU0b2DETg== X-Received: by 2002:a17:902:b698:: with SMTP id c24mr13687389pls.221.1552946166471; Mon, 18 Mar 2019 14:56:06 -0700 (PDT) Received: from localhost ([2620:15c:202:1:75a:3f6e:21d:9374]) by smtp.gmail.com with ESMTPSA id f192sm26041669pfc.180.2019.03.18.14.56.05 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 18 Mar 2019 14:56:05 -0700 (PDT) Date: Mon, 18 Mar 2019 14:56:05 -0700 From: Matthias Kaehlcke To: Nick Desaulniers 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 Subject: Re: [PATCH] Revert "kbuild: use -Oz instead of -Os when using clang" Message-ID: <20190318215605.GJ112750@google.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) 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 02:47:13PM -0700, 'Nick Desaulniers' via Clang Built Linux wrote: > 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)? Nope, for reverts checkpatch is happy with it, I suppose because by default the subject of the reverted patch is part of the revert's subject. > 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. I can send a v2 if 'needed'. > Reviewed-by: Nick Desaulniers Thanks! Matthias > > > > 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 > > >