Commit 9c8dcad
committed
fix(simulator): build v4l2_capture as position-independent code
kern_simulator links with -pie, but the v4l2_capture static library
was compiled without -fPIC. On toolchains where GCC is not configured
with --enable-default-pie (e.g. Fedora 44), linking with
-DSIM_WEBCAM=ON fails:
relocation R_X86_64_32 against `.rodata` can not be used when
making a PIE object; recompile with -fPIE
A static archive is linked object-by-object into the executable, so
its relocations must be compatible with a PIR output. The lvgl and
wally targets already set POSITION_INDEPENDENT_CODE; v4l2_capture was
added later and did not. On Debian/Ubuntu the objects were position
independent by compiler default, which masked the problem.
Simulator-only change: it does not touch any device code path.1 parent 23ca1f3 commit 9c8dcad
1 file changed
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
252 | 252 | | |
253 | 253 | | |
254 | 254 | | |
| 255 | + | |
255 | 256 | | |
256 | 257 | | |
257 | 258 | | |
| |||
0 commit comments