From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=pass header.i=@linaro.org header.s=google header.b=X84+C//s; spf=pass (domain: linaro.org, ip: 209.85.128.67, mailfrom: leif.lindholm@linaro.org) Received: from mail-wm1-f67.google.com (mail-wm1-f67.google.com [209.85.128.67]) by groups.io with SMTP; Fri, 31 May 2019 14:12:36 -0700 Received: by mail-wm1-f67.google.com with SMTP id f10so6836157wmb.1 for ; Fri, 31 May 2019 14:12:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=ftKQBwn8cN1X3K0R7Xd4zujdY9kwPgNjR1EyXq0L/SM=; b=X84+C//sQbqsTGEPxR228Jqc0KLGf1ZUL1TaTjfa5mz3ANWxmTDGEJBExj1rGYPBhy gF5SRI0ntnMionh4gYGq3CTVi4jtyc6cbEiNuqxHecJmoTUViUM0+n43r1I0rw+DEqr0 Z3F6YFnrMre88n9zgUSyyce2vJG2jbBOedXTByzJDkmrm6StaMBy7rIqdzqolriB8CkP jejhxXWGfBAXdLOlW0RgLmcIJV+vCsy/AK2p6Zl/wyhaq9cylKQmuQ9Ls/CpwVOf/xRj S7nzx0TqWW9hVSK7rhx5ljcO9tpK5fR53EJuyhAT6u3Wd7P3fkWH3QHg9iveDQYDXCuu mCtQ== 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=ftKQBwn8cN1X3K0R7Xd4zujdY9kwPgNjR1EyXq0L/SM=; b=H9zqOTGCnTpgD0zdLWd4Iow4RldoMk9FXL7nxcxlcGXurz+dgIfM+ARYihwkm5bwpt Ww3i+pJ6s2D2LuXBQEtaNGVbUOMNvnIg87q6sLd2NQNyadbwj9CHYiA63uabJT7Y8Xaq 6COIe7Afk8FAiRLZylPI0T9Tjgosb5TYRffGyFQZVMWNVOFAHjg7sGkW/a3wOghrSv8A UEReQ2OvMyTQJLwLZRdxg9GDDvDWxBiC5aSkEAxzst9vmmeKmJyYOJrsykAFWNQGJj+2 YG2RXUIlsvfys7WyxYW4q9OUlykGdwODCU+aq+CcbUSZS/56+3YgszCuNMymTOye98yF BEuA== X-Gm-Message-State: APjAAAU6cAzS2tLI0orrv8DEp8xOe1StDI+IACImsi4iylczj9pno2mS W4du764H1WXDjjvyZnP23mVXZA== X-Google-Smtp-Source: APXvYqxmc/ocEJtAmRXXnOQtH/LtXrXTER7cW9anhGREIuPNjIIIRwTR3caBlhgXSoVKEjQObCoStQ== X-Received: by 2002:a1c:238e:: with SMTP id j136mr6465333wmj.4.1559337154509; Fri, 31 May 2019 14:12:34 -0700 (PDT) Return-Path: Received: from bivouac.eciton.net (bivouac.eciton.net. [2a00:1098:0:86:1000:23:0:2]) by smtp.gmail.com with ESMTPSA id j9sm8027876wrr.90.2019.05.31.14.12.33 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 31 May 2019 14:12:33 -0700 (PDT) Date: Fri, 31 May 2019 22:12:32 +0100 From: "Leif Lindholm" To: Ard Biesheuvel Cc: devel@edk2.groups.io, Laszlo Ersek , "Gao, Liming" , "Wang, Jian J" , Michael D Kinney Subject: Re: [PATCH] ArmPkg/ArmSoftFloatLib GCC4x: fix build failure Message-ID: <20190531211232.h6giwqjzkqh4dqdn@bivouac.eciton.net> References: <20190531210115.29818-1-ard.biesheuvel@linaro.org> MIME-Version: 1.0 In-Reply-To: <20190531210115.29818-1-ard.biesheuvel@linaro.org> User-Agent: NeoMutt/20170113 (1.7.2) Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, May 31, 2019 at 11:01:15PM +0200, Ard Biesheuvel wrote: > 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. Oh yeah, I knew that, and completely missed it when reviewing. This behaviour hasn't actually changed substantially in later versions of GCC. I bet all that's saving us there is LTO :) > 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/ArmSoftFloatLib/platform.h > index 31e843463a38..07800a9d5b79 100644 > --- a/ArmPkg/Library/ArmSoftFloatLib/platform.h > +++ b/ArmPkg/Library/ArmSoftFloatLib/platform.h > @@ -5,7 +5,7 @@ > */ > > #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" > -- > 2.20.1 >