This is an archive of the discontinued LLVM Phabricator instance.

[test] Build test-suite::omptargetvv-test_parallel_for_allocate-50_parallel_for-c.test with -fno-pic
AbandonedPublic

Authored by MaskRay on Apr 4 2022, 5:13 PM.

Details

Summary

To work around an unknown failure when compiling with default -fPIE:
https://github.com/llvm/llvm-project/issues/54082

-fno-pic makes the current default explicit.

Event Timeline

MaskRay created this revision.Apr 4 2022, 5:13 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 4 2022, 5:13 PM
MaskRay requested review of this revision.Apr 4 2022, 5:13 PM
Meinersbur added a comment.EditedApr 4 2022, 5:59 PM

Could you please add a comment in the CMakeLists.txt for why -fno-pic is need, possible with a link to the bug?

TEST_SUITE_SOLLVEVV_OFFLOADING_CFLAGS is a user-controlled parameter. Defining it using -DTEST_SUITE_SOLLVEVV_OFFLOADING_CFLAGS=... (like the buildbot configuration does) will overwrite -fno-pic. Hence, the buildbot would continue to fail.

Meinersbur added inline comments.Apr 4 2022, 6:32 PM
External/sollve_vv/CMakeLists.txt
117

If this is indeed an OpenMP bug and it should work with -fpic), the alternative is to remove it from the list of tests that are known to work.

However, my assumption is that D120305 applied the changed default to device-code as well, when it should only do so for host code.

MaskRay added inline comments.Apr 4 2022, 11:40 PM
External/sollve_vv/CMakeLists.txt
117

Removing it from the list sounds good as well. Perhaps you can be so kind to fix it ? :)

As-is, if it fails with CLANG_DEFAULT_PIE_ON_LINUX on Linux glibc systems, then likely it already fails on Linux musl.

MaskRay abandoned this revision.Apr 6 2022, 8:12 PM

Thanks!