From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.groups.io with SMTP id smtpd.web10.5814.1687334113992468373 for ; Wed, 21 Jun 2023 00:55:14 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=HodLw0p5; spf=pass (domain: redhat.com, ip: 170.10.133.124, mailfrom: kraxel@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1687334113; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=1DUDAeZC7hrpM3DVPlK+0B7AEeRbfS4x5faCMBs2RAQ=; b=HodLw0p5s7wdezwgIIw9uHQnP8+PFfKwsE5ZCmKSvJ9Z4yENgzYGnvfKbPYwUmR2NHp+mr FvK7iIKduVniuhPRsIfJHf9VKXAqZ7BosoDSxL2CuRm6floITp3YtszacRcQZYD3EOo5nX hXSgK5jlmXU6W7Z2vklRPhY19udsTTs= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-524-8fDFV6FBNdKhZNrVr0m5Ng-1; Wed, 21 Jun 2023 03:55:09 -0400 X-MC-Unique: 8fDFV6FBNdKhZNrVr0m5Ng-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B8922104458B; Wed, 21 Jun 2023 07:55:08 +0000 (UTC) Received: from sirius.home.kraxel.org (unknown [10.39.192.126]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8D285492B01; Wed, 21 Jun 2023 07:55:08 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id BEC8C1800381; Wed, 21 Jun 2023 09:55:02 +0200 (CEST) Date: Wed, 21 Jun 2023 09:55:02 +0200 From: "Gerd Hoffmann" To: Pedro Falcato Cc: edk2-devel-groups-io , yi1.li@intel.com, Ard Biesheuvel , Jiewen Yao , Jordan Justen Subject: Re: [edk2-devel] [PATCH] OvmfPkg/PlatformCI: Skip GCC5_OVMF_IA32X64_FULL_NOOPT build Message-ID: References: <20230620111139.21365-1-yi1.li@intel.com> MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Jun 21, 2023 at 01:40:06AM +0100, Pedro Falcato wrote: > On Tue, 20 Jun 2023, 12:11 Li, Yi, wrote: > > > The effect of LTO is limited with optimization turned off, and blocked > > the upgrade of Openssl3.0. We already skipped this build with VS2019, > > skip the GCC NOOPT build also. > > > Hi, > > If LTO is the problem here, have you given ffunction-sections + > fdata-sections + gc-sections a spin? lto alone works and reduces size a bit, also turning on optimizations has a much bigger effect though. Which I suspect happens because gcc detects constant expressions then, calculates them at compile time instead of runtime, which in turn removes function calls in code paths never taken. take care, Gerd