From 8004e080fc7f21c610efac3ce143c35e83c75d40 Mon Sep 17 00:00:00 2001 From: James Sturtevant Date: Tue, 9 Dec 2025 15:26:36 -0800 Subject: [PATCH] Explicitly set Position independent code Signed-off-by: James Sturtevant --- src/toolchain.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/toolchain.rs b/src/toolchain.rs index 47fbf63..5821eda 100644 --- a/src/toolchain.rs +++ b/src/toolchain.rs @@ -86,6 +86,8 @@ pub fn cflags(args: &Args) -> OsString { // https://github.com/hyperlight-dev/hyperlight/blob/main/src/hyperlight_guest_bin/build.rs#L80 "--target=x86_64-unknown-linux-none", "-U__linux__", + // Our rust target also has this set since it based off "x86_64-unknown-none" + "-fPIC", // We don't support stack protectors at the moment, but Arch Linux clang // auto-enables them for -linux platforms, so explicitly disable them. "-fno-stack-protector",