-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Setting CLANG_DEFAULT_PIE_ON_LINUX
when building clang
#228
Comments
As a point of comparison, it seems that gcc 11.2.1 which is installed in the aswf-docker containers from gcc-toolset is not configured with either --enable-host-pie or --enable-default-pie :
The 2022 images were available with multiple Clang versions, from 10-14. Looking at https://hub.docker.com/r/aswf/ci-openvdb/tags has the 2022 tag defaulting to clang 10.0.1: this is confusing since clang 10 is well before clang added the ability to build clang with PIE enabled by default. The 2024 tag is defaulting to 2024-clang17, where clang 17.0.6 is not built with that flag. For 2022/clang 10.0.1:
For 2022/clang 17.0.6:
Is there a change between CUDA 11.4 (in the 2022 images) and CUDA 12.6 (in latest 2024 images) which now requires compiling with PIE which did not before? |
It seems that the behaviour for whether or not -fPIE is on by default in Linux changed in clang 14 to be controlled by a flag when building clang:
llvm/llvm-project@1042de9
We were having a bit of an issue switching to the 2024 OS CI images and building with clang++ on the OpenVDB project (when moving from 2022 clang11 to the 2024 image):
AcademySoftwareFoundation/openvdb#1926
Shall we set
CLANG_DEFAULT_PIE_ON_LINUX
to match the behaviour of gcc?The text was updated successfully, but these errors were encountered: