The crt-building hack in `postPatch` does two things, both of which assume ELF:
- it forces `libgcc.a` to depend on `crti.o`/`crtn.o`. Those are an ELF
convention. PE/COFF targets have no such files, so the rule makes the
build assemble the generic ELF `config/i386/crti.S` with a PE
assembler, which fails with `junk at end of line`.
- it blanks `SHLIB_LC`, which for ELF is `-lc` and stands in the way of
linking `libgcc_s.so` before libc exists. On Cygwin and MinGW
`SHLIB_LC` is instead the list of system import libraries the DLL
genuinely needs, so blanking it drops real dependencies.
So apply it only on ELF.
That leaves the pre-libc stage on PE/COFF with no way to link a shared
`libgcc`: every symbol in a DLL has to resolve at link time, and the
libc's import library does not exist yet. Build only `libgcc.a` there --
which is all that stage is used for -- and let the shared library be
built as usual once the real libc is present. Which case applies is
read from `stdenv.cc.libc`, as everything else in this package is, with
headers-only stand-ins marking themselves via `passthru.headersOnly`.
ELF targets build the same thing as before but do not keep the same
derivation: `--enable-shared` is now stated outright where configure was
previously left to default to it. `libgcc` for `x86_64-unknown-netbsd`
gains that one flag and nothing else.
Assisted-by: Claude Code (Claude Opus 5)
We don't really want to share Nix logic with the monolithic GCC build,
as GCC NG is supposed to be unconstrained to go in different directions.
Inline `libgcc-buildstuff.nix` and read `hostPlatform` throughout.
Assisted-by: Claude Code (Claude Opus 5)
Diff: https://github.com/scionproto/scion/compare/v0.12.0...v0.15.1
- Exclude private/underlay/ebpf from build, which requires development
build mode.
- Set __structuredAttrs
- Set __darwinAllowLocalNetworking, for tests
- Upstream adjusts the test suite with longer timeouts¹ and excluding a
time-sensitive test (TestAcceptLoopParallelism²) when running in CI, which
it detects by checking the environment for the presence of the CI
environment variable. Parameterize this via ciMode attr, which the
caller can override if they wish to build and run the tests locally.
¹: bb10ec5e2e/pkg/grpc/dialer_test.go (L128-L130)
²: bb10ec5e2e/pkg/snet/squic/net_test.go (L43-L46)
Co-authored-by: phanirithvij <phanirithvij2000@gmail.com>