From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id CCEDFA328D for ; Tue, 22 Oct 2019 10:53:46 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0D7D31BE93; Tue, 22 Oct 2019 10:53:46 +0200 (CEST) Received: from mail-lf1-f68.google.com (mail-lf1-f68.google.com [209.85.167.68]) by dpdk.org (Postfix) with ESMTP id ABDD91BE82 for ; Tue, 22 Oct 2019 10:53:44 +0200 (CEST) Received: by mail-lf1-f68.google.com with SMTP id 195so12404206lfj.6 for ; Tue, 22 Oct 2019 01:53:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20150623.gappssmtp.com; s=20150623; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=lTB2ytFBjB02EWJmMQZ7ZMZc40HQcT+5FSTxafFG8U8=; b=BaZFePDXjwosrgvU9AL+xcHw1HSuhq185McuhRyyRQx7k4VL2lcqY1zKzN2P16w9Ib qgu/E/LOTlGauWI5TlwW14ga4A3PPzai+Du3Bhm0OzH1qD4V5v79zLF1qtZbBUsZdxcv R5kXbN3xKK/UhMDK/Vcwt3fZJgNpOMQHTN+dB/LOtA/QQSuwW801ibGCAAqb/fWNaNkT nzWwmPtJbfUlu2Lpu/W/3LthMEHz8Pf43JHOM/Q//saBXaD1BF3S6ipjVDtCJIDLsZHN JQ7kxLL1qgn+dlhIo6zZ6hUnJpeD0jeZZDpJCintzOwWw8ABAtzgdoAQSLyvoJPlTuet bF5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=lTB2ytFBjB02EWJmMQZ7ZMZc40HQcT+5FSTxafFG8U8=; b=UASogUtVhrztx1EaISmkPM5G+VBrMuU2+qsCkWUN1vAd1vLCBUmo4+w6aQA3hdNqsY tf17FMES0PB5QR/kWg0LhrCcOdrmlxRyxBkvME6C3muS3M01vM/LJOk5uE2GBbjjnzZ3 aOzmMGPjOyczerv66dy4ij+4ImTsOxb4U/XNQP/8FLE8hFaI+pAnqGYrZxK/uvW3hBfC OXkdub3z128O/w3RqrN58+pnQu2ro/sen6pZwrmCvgtaQ/0mRCAiBJDv1H15jWSsUQOt 5WYg+7c3RrOkSJBNBujA/kpi6RrY/sFDGKD6hdR+l3iaoDd+vVdA2QQ6ts6FGILu0MLG 6MFA== X-Gm-Message-State: APjAAAU8rTUvgqWUYKCB1kw4+ys+p9uMe4HVGtIWVg7ItC/c/QlCLHA5 w8QpDDC1nJ8qzZP56+z5h/Swz4nVIkWkSg== X-Google-Smtp-Source: APXvYqxvRxJ4c1Lj56b/p9/QHLE+nO7IYznmMh3h1reua43qfWdWaNXT49YH/I2UXNXHMw1hYIr7zg== X-Received: by 2002:ac2:5627:: with SMTP id b7mr9486424lff.6.1571734423832; Tue, 22 Oct 2019 01:53:43 -0700 (PDT) Received: from [10.0.0.72] (31-172-191-173.noc.fibertech.net.pl. [31.172.191.173]) by smtp.gmail.com with ESMTPSA id a7sm3754552ljn.4.2019.10.22.01.53.42 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 22 Oct 2019 01:53:42 -0700 (PDT) To: dev@dpdk.org References: <20190917075754.8310-1-amo@semihalf.com> <20191021105707.25691-1-aostruszka@marvell.com> <20191021105707.25691-2-aostruszka@marvell.com> <20191021125903.GA942@bricha3-MOBL.ger.corp.intel.com> From: Andrzej Ostruszka Message-ID: Date: Tue, 22 Oct 2019 10:53:42 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <20191021125903.GA942@bricha3-MOBL.ger.corp.intel.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v3 01/10] build: add an option to enable LTO build X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Thank you Bruce for the comment. The original patch set did not manage to get to the dev list (I've sent it from my Marvell account and it stuck at moderation). So I'll take your "indent" comment and will send another version which will hopefully get through. On 10/21/19 2:59 PM, Bruce Richardson wrote: [...] >> diff --git a/config/meson.build b/config/meson.build >> index 2bafea530..97bbc323b 100644 >> --- a/config/meson.build >> +++ b/config/meson.build >> @@ -196,3 +196,18 @@ add_project_arguments('-D_GNU_SOURCE', language: 'c') >> if is_freebsd >> add_project_arguments('-D__BSD_VISIBLE', language: 'c') >> endif >> + >> +if get_option('b_lto') >> + if cc.has_argument('-ffat-lto-objects') >> + add_project_arguments('-ffat-lto-objects', language: 'c') >> + else >> + error('compiler does not support fat LTO objects - please turn LTO off') >> + endif >> + if cc.get_id() == 'gcc' >> + # workaround for bug 81440 >> + if cc.version().version_compare('<8.0') >> + add_project_arguments('-Wno-lto-type-mismatch', language: 'c') >> + add_project_link_arguments('-Wno-lto-type-mismatch', language: 'c') >> + endif >> + endif >> +endif > > Just wondering on this what would be the impact with blindly disabling this > warning? Would we miss any common issues accidentally? This warning is for the cases where declarations (of e.g. global variable) have different types in different compilation units - these type of things can only be caught with LTO. I don't think we need be worrying about that in DPDK - the problem is a bug in gcc that produces these warnings for the case of structs with flexible arrays at the end (which are fairly common in DPDK). > If we keep the current conditional code, suggest we merge the two checks > for gcc and gcc version together into one if statement so we can reduce > indentation level by one. Agree. Will send another version - which hopefully will get through to the dev list. Regards Andrzej