[PATCH] D92633: Add -f[no-]direct-access-external-data to deprecate -mpie-copy-relocations

Sriraman Tallam via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 7 18:16:07 PST 2021


tmsriram accepted this revision.
tmsriram added a comment.
This revision is now accepted and ready to land.

In D92633#2485811 <https://reviews.llvm.org/D92633#2485811>, @MaskRay wrote:

> In D92633#2434768 <https://reviews.llvm.org/D92633#2434768>, @tmsriram wrote:
>
>> In D92633#2434766 <https://reviews.llvm.org/D92633#2434766>, @MaskRay wrote:
>>
>>> In D92633#2434714 <https://reviews.llvm.org/D92633#2434714>, @tmsriram wrote:
>>>
>>>> Correct me if I am wrong, but I do see that this behavior is touched.  Line 10 in -fdirect-access-external-data.c :
>>>>
>>>> // RUN: %clang -### -c -target aarch64 %s -fpic -fdirect-access-external-data 2>&1 | FileCheck %s --check-prefix=DIRECT
>>>>
>>>> With -fpic, the variable access will go directly and not via GOT.
>>>
>>> `clang/test/Driver/fdirect-access-external-data.c` is a driver test which tests how the driver passes options to CC1.
>>
>>
>>
>>> `clang/lib/CodeGen/CodeGenModule.cpp` says how the CC1 option affects the dso_local specifier in the LLVM IR output. Currently it is a no op for -fpic/-fPIC.
>>
>> Great! Sorry I didnt realize this,  this is fine with me now!
>>
>>> (I have made some tests. It looks like implementing -fno-direct-access-external-data for -fno-pic is not an insurmountable work: ~50 tests)
>
> May I get a formal LGTM? 😋 I am happy to give GCC devs a few more days... https://gcc.gnu.org/pipermail/gcc/2021-January/234639.html (the previous feature request and gcc/ mailing list message has given them one month and -f[no-]direct-access-external-data is still the best name so far)

Ok, I can approve this.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D92633/new/

https://reviews.llvm.org/D92633



More information about the cfe-commits mailing list