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=TS0v6kL/; spf=pass (domain: linaro.org, ip: 209.85.166.67, mailfrom: ard.biesheuvel@linaro.org) Received: from mail-io1-f67.google.com (mail-io1-f67.google.com [209.85.166.67]) by groups.io with SMTP; Sat, 01 Jun 2019 00:58:54 -0700 Received: by mail-io1-f67.google.com with SMTP id e5so10204523iok.4 for ; Sat, 01 Jun 2019 00:58:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=gfDvWp7e2RZbxVHBV62R7BNq5Ec8HHETgIex6q2LJJM=; b=TS0v6kL/RyT4rRvmGdR1xZz0BJozoed8FCRmhXDioj4uH2YgT3mmm6rI/dqDqvMS+q vhWkJOutmobR6dSksCzNpevdAbAXvazgVN3PRefCm81IXKu4v+Q+dhkrsQHtauIp2ecg 5g7+atDKwAs+ThEohmk2qESwEBsLvLBoCYazhob1nCt8FiLyX3sSd5MPqYrlrqq1gooC 5rmU5shWYjt8QApkugGXrbXUL1K8GWl095kXKhsOys+ST9NoIjE0kstnINZCrt1Jnu9p REjujjNCuG0LcVqLWF+c8zGb7BmE9voZ7+CJsVVLo3cWR4UUdYwSZgAt4IwMWdu9FhHf SbUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=gfDvWp7e2RZbxVHBV62R7BNq5Ec8HHETgIex6q2LJJM=; b=X4XtyZx4QKczT+8Wlie+k0Doje3Nkwgc9GaeGMdMBboWEHGEy0hSEGA0pvPd8i4vP+ JyirCZketHu39vKrGQlNkhtI0JSiiEpi8okebFK+dQkVKd6iubJJ2cO01IexJMeGEKqj Kt3yZVM0rznsqUZGtqEQMGvAcVCMTL5TMukHrY6f0nFxeHc0ch5/i7IU9jOFf4pRPWPf UyZ5TEvsr/IQStNIMI+l39rCi9i/2ibnORIl+zK+BJfu0UcsYribGwScZJHil9DmvZa9 nxp+XJxuLeGNZSWfbjZD9TRsBffkJ7GXDqGP7jmwjp1uOtK64APIJURU5PN1uqE7FN3S /GmA== X-Gm-Message-State: APjAAAUJNDFV4IFf7AGqjAMCjj86MI64SqQQb3OAxRanX4N7mqrU1XqS yZTmPUvMbx7t7ilE7P412B5d6iPnfI4ncfaK73xsnA== X-Google-Smtp-Source: APXvYqwqwyi652k0bzoRusG+aAbHS/jR+CR/BN31bp3Ua9800XHI3/dHIeBHsno8ljOpdaOz1IGPVSVuaTU9r6vqLS8= X-Received: by 2002:a5d:9d83:: with SMTP id 3mr8623920ion.65.1559375932430; Sat, 01 Jun 2019 00:58:52 -0700 (PDT) MIME-Version: 1.0 References: <20190531210115.29818-1-ard.biesheuvel@linaro.org> <20190531211232.h6giwqjzkqh4dqdn@bivouac.eciton.net> In-Reply-To: <20190531211232.h6giwqjzkqh4dqdn@bivouac.eciton.net> From: "Ard Biesheuvel" Date: Sat, 1 Jun 2019 09:58:39 +0200 Message-ID: Subject: Re: [PATCH] ArmPkg/ArmSoftFloatLib GCC4x: fix build failure To: Leif Lindholm Cc: edk2-devel-groups-io , Laszlo Ersek , "Gao, Liming" , "Wang, Jian J" , Michael D Kinney Content-Type: text/plain; charset="UTF-8" On Fri, 31 May 2019 at 23:12, Leif Lindholm wrote: > > 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 :) > Not sure. LTO is disabled entirely for this library, since it interoperates poorly with intrinsics. > > 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 > Thanks Pushed as 8594c2073cdb..371e7001e8d5 > > --- > > 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 > >