From nobody Thu May 2 15:17:21 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+41762+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+41762+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1559336486; cv=none; d=zoho.com; s=zohoarc; b=HjRMdxIEOGXSdMYEqQudaA7Pn4iWIdWh6nSkYRJRAiM3PE5HomgB23UUpuaIfqBf3udFqHyJhGt6h50JZ4hckx7goRFJkrHnlIQgnIZxahuFyovf1syw1IWBDiezSQ5icIJ61QLZFqxcEJRhJTC4nF8nWgdAUqCS7aPacwN8dTs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1559336486; h=Content-Transfer-Encoding:Cc:Date:From:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Sender:Subject:To:ARC-Authentication-Results; bh=+YGYIzcNgimSKAeHncAoskZf+0gq9+3sBGPti9HRCPY=; b=CotXcYa/QXXGXaflYY5eE/qQBrnEpMBxHVxYFfjz4rUz+k/5TgqBROEaUGDewHtnAskf7LIMXM+Ral99OT8sj2wq1kPo3IFLWdECENA+GEoVtsDTvHMT7eEWocD5AayPY2kVNVILnVJJlej8chiJTZF91mt6JBSwJZvivSefEkU= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+41762+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1559336486329809.8818453024572; Fri, 31 May 2019 14:01:26 -0700 (PDT) Return-Path: X-Received: from mail-wr1-f65.google.com (mail-wr1-f65.google.com [209.85.221.65]) by groups.io with SMTP; Fri, 31 May 2019 14:01:25 -0700 X-Received: by mail-wr1-f65.google.com with SMTP id o12so211121wrj.9 for ; Fri, 31 May 2019 14:01:24 -0700 (PDT) X-Gm-Message-State: APjAAAXsMZR71XekrRvsMSZtCLXxnacBC3d8FG1dFrL+g6UEHOPWSqjB UUFZU8Wzl1cAm82Q6BtbbTE6FCxATKo= X-Google-Smtp-Source: APXvYqyov0OtrxNjaMbbtNnHX6+0b5+YkoSaAaBNcR+BFrAm9QHa1ChYWlnrebrtRuwtipMcZaCWuA== X-Received: by 2002:adf:e742:: with SMTP id c2mr8138072wrn.249.1559336483415; Fri, 31 May 2019 14:01:23 -0700 (PDT) X-Received: from sudo.home ([2a01:cb1d:112:6f00:c225:e9ff:fe2e:ea8]) by smtp.gmail.com with ESMTPSA id x68sm6892068wmf.13.2019.05.31.14.01.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 31 May 2019 14:01:22 -0700 (PDT) From: "Ard Biesheuvel" To: devel@edk2.groups.io Cc: Ard Biesheuvel , Laszlo Ersek , "Gao, Liming" , "Wang, Jian J" , Leif Lindholm , Michael D Kinney Subject: [edk2-devel] [PATCH] ArmPkg/ArmSoftFloatLib GCC4x: fix build failure Date: Fri, 31 May 2019 23:01:15 +0200 Message-Id: <20190531210115.29818-1-ard.biesheuvel@linaro.org> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,ard.biesheuvel@linaro.org Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1559336485; bh=QCmV68zbEQmqUcABLCyK3bQ9uAMCuaB3jdNK8B4BB8I=; h=Cc:Date:From:Reply-To:Subject:To; b=fthIZ88KMvz1l2CNA0/EThCpY0pBX/1YJWBGyltc75oKmUuUhZO8YNXwcotEBFEbn0T I5H8qe+Yc7Xw9AFAhV3BThzJwm4cybkZrStQASd9gSJ9vMmyujBxdsBBtw8/q82PQ8HuD TpqGyXZZW2U6TXUjinGz++pvLfGT9OpZeVk= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" The upstream SoftFloat code that was recently incorporated into ArmSoftFloatLib uses some parameterization to tweak the inlining and optimization behavior for different compilers. The custom platform.h file that sets these parameters is based on the upstream version for Linux/ARM, but was updated to include the 'always_inline' GCC attribute into the INLINE macro, to ensure that all definitions that are marked as inline are not only inlined into their callers, but also to ensure that no version of the function is ever emitted into the object file. This works fine on recent GCC and Clang, but the latter part turns out to break on GCC 4.x, resulting in duplicate definition linker errors. Fortunately, the synticatically more appriopriate 'static inline' works fine on both the recent and the older compilers, so let's switch to that instead. Cc: Laszlo Ersek Cc: "Gao, Liming" Cc: "Wang, Jian J" Cc: Leif Lindholm Cc: Michael D Kinney Signed-off-by: Ard Biesheuvel Reviewed-by: Leif Lindholm --- ArmPkg/Library/ArmSoftFloatLib/platform.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ArmPkg/Library/ArmSoftFloatLib/platform.h b/ArmPkg/Library/Arm= SoftFloatLib/platform.h index 31e843463a38..07800a9d5b79 100644 --- a/ArmPkg/Library/ArmSoftFloatLib/platform.h +++ b/ArmPkg/Library/ArmSoftFloatLib/platform.h @@ -5,7 +5,7 @@ */ =20 #define LITTLEENDIAN 1 -#define INLINE inline __attribute__((always_inline)) +#define INLINE static inline #define SOFTFLOAT_BUILTIN_CLZ 1 #define SOFTFLOAT_FAST_INT64 #include "opts-GCC.h" --=20 2.20.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#41762): https://edk2.groups.io/g/devel/message/41762 Mute This Topic: https://groups.io/mt/31884674/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-