[PATCH] D137044: [ClangFE] Add support for option -mno-pic-data-is-text-relative
Mariya Podchishchaeva via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 22 10:47:22 PST 2022
Fznamznon added a comment.
In D137044#3944010 <https://reviews.llvm.org/D137044#3944010>, @jonpa wrote:
> In D137044#3943829 <https://reviews.llvm.org/D137044#3943829>, @Fznamznon wrote:
>
>> In D137044#3943680 <https://reviews.llvm.org/D137044#3943680>, @jonpa wrote:
>>
>>> In D137044#3942990 <https://reviews.llvm.org/D137044#3942990>, @pcwang-thead wrote:
>>>
>>>> The test `clang/test/Driver/pic.c` failed when we compiled Clang/LLVM with `-DCLANG_DEFAULT_PIE_ON_LINUX=False`.
>>>
>>> Ah... I suppose that must be because -mno-pic-data-is-text-relative requires PIC (this is per GCC behavior). Does it help if you add -fpic to the RUN lines that were added by this patch? I was not aware of the cmake flag, sorry.
>>
>> For me it does. Can we make this change?
>
> Yes, that should be fine as the test is assuming pic by default. Thanks.
I pushed the fix - https://github.com/llvm/llvm-project/commit/0ffcd243a42bff13966e455582d2db6c337628a2 . Thank you.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D137044/new/
https://reviews.llvm.org/D137044
More information about the cfe-commits
mailing list