AcademySoftwareFoundation / AcademySoftwareFoundation/aswf-docker

Setting `CLANG_DEFAULT_PIE_ON_LINUX` when building clang

Open
#228 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
189
Forks
42
Avg merge
9h 38m
Merged PRs (30d)
6

Description

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:

https://github.com/llvm/llvm-project/commit/1042de90589c74c6998c127d1ee1b33ff3efb8cc

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):

https://github.com/AcademySoftwareFoundation/openvdb/pull/1926

Shall we set `CLANG_DEFAULT_PIE_ON_LINUX` to match the behaviour of gcc?

Contributor guide

Open the contributing guide

Research direction

Start by tracing the clang build configuration in aswf-docker, then compare the Linux PIE behavior introduced by the linked LLVM commit with the OpenVDB CI issue and the GCC behavior described here. Done means the clang build uses the intended default PIE setting and the affected OpenVDB-style build succeeds on the newer image.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, docker, linux
Domain
build-system, ci-cd
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.