[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1ff60e91-ac20-476b-a83e-8f9f2f797eb4@nvidia.com>
Date: Mon, 6 May 2024 12:08:41 -0700
From: John Hubbard <jhubbard@...dia.com>
To: Kees Cook <keescook@...omium.org>
Cc: Shuah Khan <shuah@...nel.org>, Eric Biederman <ebiederm@...ssion.com>,
Muhammad Usama Anjum <usama.anjum@...labora.com>,
Mark Brown <broonie@...nel.org>, linux-mm@...ck.org,
Valentin Obst <kernel@...entinobst.de>, linux-kselftest@...r.kernel.org,
LKML <linux-kernel@...r.kernel.org>, llvm@...ts.linux.dev
Subject: Re: [PATCH] selftests/exec: build with -fPIE instead of -pie, to make
clang happy
On 5/6/24 10:09 AM, Kees Cook wrote:
> On Fri, May 03, 2024 at 07:23:01PM -0700, John Hubbard wrote:
>> clang doesn't deal well with "-pie -static": it warns that -pie is an
>> unused option here. Changing to "-fPIE -static" solves this problem for
>> clang, while keeping the gcc results identical.
>>
>> The problem is visible when building via:
>>
>> make LLVM=1 -C tools/testing/selftests
>>
>> Again: gcc 13 produces identical binaries for all of these programs,
>> both before and after this commit (using "-pie"), and after (using
>> "-fPIE").
>>
>> Also, the runtime results are the same for both clang and gcc builds.
>
> Thanks for this! It got solved differently here:
> https://lkml.kernel.org/r/20240416152831.3199999-1-usama.anjum@collabora.com
>
> Does that work for you as well?
>
Yes it does. Please drop my patch and let's use yours instead, thanks!
(As an aside, outside of the compiler sources themselves, it has
proven quite difficult to find any in-depth documentation of linking
options and behavior--now, and in the past.)
thanks,
--
John Hubbard
NVIDIA
Powered by blists - more mailing lists