Skip to content

Commit 34eb326

Browse files
authored
fix: Add -fPIC option for building C guests. (#421)
I ran into an issue running `just guests` on Fedora 41, and adding the -fPIC option in the C flags fixes this. Signed-off-by: Pranoy Dutta <[email protected]>
1 parent 436599a commit 34eb326

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

c.just

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ c-flags-release-pe := '/O2 /Gy'
99

1010
# Elf options
1111
# We don't support stack protectors at the moment, but Arch Linux clang auto-enables them for -linux platforms, so explicitly disable them.
12-
c-compile-options-elf := '-nobuiltininc -H --target=x86_64-unknown-linux-none -fno-stack-protector -fstack-clash-protection -mstack-probe-size=4096'
12+
c-compile-options-elf := '-nobuiltininc -H --target=x86_64-unknown-linux-none -fno-stack-protector -fstack-clash-protection -mstack-probe-size=4096 -fPIC'
1313
c-include-flags-elf := replace(c-include-flags-pe, '/I ', '-I ')
1414
c-linker-options-elf := '--entry "entrypoint" --nostdlib -pie'
1515
c-flags-debug-elf := '-O0'

0 commit comments

Comments
 (0)