Unverified Commit afe8fbf0 authored by Jörg Thalheim's avatar Jörg Thalheim Committed by GitHub
Browse files

Merge pull request #328582 from rhelmot/freebsd-stdenv

FreeBSD stdenv: re-init
parents 4eb44db1 c3c71a98
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -24,6 +24,5 @@
  # "armv5tel-linux" is excluded because it is not bootstrapped
  "powerpc64le-linux"
  "riscv64-linux"

  # "x86_64-freebsd" is excluded because it is mostly broken
  "x86_64-freebsd"
]
+3 −3
Original line number Diff line number Diff line
@@ -6,9 +6,9 @@ binaries (without the reliance on external inputs):
- `bootstrap-tools`: an archive with the compiler toolchain and other
  helper tools enough to build the rest of the `nixpkgs`.
- initial binaries needed to unpack `bootstrap-tools.*`. On `linux`
  it's just `busybox`, on `darwin` it is unpack.nar.xz which contains
  the binaries and script needed to unpack the tools. These binaries
  can be executed directly from the store.
  it's just `busybox`, on `darwin` and `freebsd` it is unpack.nar.xz
  which contains the binaries and script needed to unpack the tools.
  These binaries can be executed directly from the store.

These are called "bootstrap files".

+2 −0
Original line number Diff line number Diff line
@@ -95,6 +95,7 @@ CROSS_TARGETS=(
    powerpc64-unknown-linux-gnuabielfv2
    powerpc64le-unknown-linux-gnu
    riscv64-unknown-linux-gnu
    x86_64-unknown-freebsd
)

is_cross() {
@@ -163,6 +164,7 @@ for target in "${targets[@]}"; do
    case "$target" in
        *linux*) nixpkgs_prefix="pkgs/stdenv/linux" ;;
        *darwin*) nixpkgs_prefix="pkgs/stdenv/darwin" ;;
        *freebsd*) nixpkgs_prefix="pkgs/stdenv/freebsd" ;;
        *) die "don't know where to put '$target'" ;;
    esac

+2 −1
Original line number Diff line number Diff line
@@ -5,6 +5,7 @@
  stdenvNoLibs,
  overrideCC,
  buildPackages,
  stdenvNoLibcxx ? overrideCC stdenv buildPackages.llvmPackages.clangNoLibcxx,
  versionData,
  patches,
  compatIfNeeded,
@@ -29,7 +30,7 @@ lib.makeOverridable (
      else if attrs.noLibc or false then
        stdenvNoLibs
      else if attrs.noLibcxx or false then
        overrideCC stdenv buildPackages.llvmPackages.clangNoLibcxx
        stdenvNoLibcxx
      else
        stdenv;
  in
+5 −0
Original line number Diff line number Diff line
fixupOutputHooks+=(_FreeBSDPatchelfShrink)

_FreeBSDPatchelfShrink() {
    find $prefix -type f | xargs -n1 patchelf --shrink-rpath &>/dev/null || true
}
Loading