Compile bpf module without relying on the current working directory of the process
- Dominant language
- C
- Stars
- 22.7k
- Forks
- 4.1k
- Avg merge
- 10d 4h
- Merged PRs (30d)
- 3
Description
Is it possible to compile a bpf module without relying on the current working directory of the process? I notice a comment [here](https://github.com/iovisor/bcc/blob/master/src/cc/frontends/clang/loader.cc#L161) stating that clang requires us to be inside the kernel source directory but is it possible to influence this and do a build without relying on relative paths (ie. without using chdir)?
Contributor guide
No contributing guide indexed for this repository
Research direction
Start at src/cc/frontends/clang/loader.cc, especially the comment around line 161, and trace how the BPF module compilation invokes clang and depends on the process working directory. Determine whether the relative-path requirement can be removed without chdir; done means documenting the constraint or defining and implementing a supported alternative, with validation identified from the surrounding code.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, linux
- Domain
- compilers, operating-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100