shell.nix: no hardening flags
Nix's compiler wrapper adds -fPIC and friends to every compile. The kernel is freestanding at fixed addresses, and clang refuses -fPIC for the UEFI loader's PE target outright, so a plain make in nix-shell stopped at BOOTX64.EFI. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01S1giNvrHTrPMPw7V6x1kQ4
This commit is contained in:
parent
406cff2ec0
commit
0f7bceeb50
1 changed files with 8 additions and 0 deletions
|
|
@ -16,6 +16,14 @@
|
|||
pkgs.mkShell {
|
||||
name = "schos";
|
||||
|
||||
# Off, all of it. Nix's compiler wrapper adds -fPIC, -fstack-protector,
|
||||
# -D_FORTIFY_SOURCE and friends to every compile, which is right for Linux
|
||||
# programs and wrong for everything here: the kernel is freestanding and
|
||||
# linked at fixed addresses, and the UEFI loader targets PE/COFF, where clang
|
||||
# refuses -fPIC outright ("unsupported option '-fPIC' for target
|
||||
# 'x86_64-unknown-windows-msvc'") and `make` stops at BOOTX64.EFI.
|
||||
hardeningDisable = [ "all" ];
|
||||
|
||||
nativeBuildInputs = with pkgs; [
|
||||
# The cross-compiler, and the reason this file exists. clang targets
|
||||
# bare-metal ELF, 16-bit code and PE/COFF from one install; lld-link is what
|
||||
|
|
|
|||
Loading…
Reference in a new issue