Re: [PATCH] selftests/exec: build with -fPIE instead of -pie, to make clang happy

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxx

Does that work for you as well?

-Kees

-- 
Kees Cook




[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux