Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UEFI cross: don't overthink it #228374

Merged
merged 4 commits into from
Apr 28, 2023
Merged

UEFI cross: don't overthink it #228374

merged 4 commits into from
Apr 28, 2023

Commits on Apr 26, 2023

  1. compiler-rt: use -ffreestanding when no libc

    This fixes building for x86_64-windows with no libc (for UEFI).
    Otherwise, it would try to include a malloc header.
    alyssais committed Apr 26, 2023
    Configuration menu
    Copy the full SHA
    82cfc4f View commit details
    Browse the repository at this point in the history
  2. lib.systems: allow specifying libc = null

    It makes sense to allow platform definitions to opt out of having libc
    at all.  One use case would be targetting some obscure new Linux
    target that doesn't have a libc implementation yet, and another is
    UEFI, which is basically libc-less Windows.
    
    Not having libc is not commonly specified in (GNU) triples (even
    Linux's build system will just target either -gnu or -musl depending
    on the platform), so instead, we use a separate attribute for it.
    alyssais committed Apr 26, 2023
    Configuration menu
    Copy the full SHA
    9fa63d3 View commit details
    Browse the repository at this point in the history
  3. pkgsLLVM.stdenv: use clangNoLibc when libc is null

    clangNoLibc always uses LLVM bintools, so it still has the useLLVM
    semantics.
    alyssais committed Apr 26, 2023
    Configuration menu
    Copy the full SHA
    8672919 View commit details
    Browse the repository at this point in the history

Commits on Apr 27, 2023

  1. wrapCCWith: disable pic when building for Windows

    According to <https://gcc.gnu.org/legacy-ml/gcc-patches/2015-08/msg00836.html>,
    all code is position-independent on Windows.  Some compilers
    apparently warn for -fPIC on Windows, and clang errors:
    
    > clang-15: error: unsupported option '-fPIC' for target 'x86_64-pc-windows-msvc'
    
    I'm guessing the check was hostPlatform instead of targetPlatform by mistake.
    alyssais committed Apr 27, 2023
    Configuration menu
    Copy the full SHA
    82c2dba View commit details
    Browse the repository at this point in the history