3
0
Fork 0
forked from mirrors/nixpkgs
Commit graph

115 commits

Author SHA1 Message Date
Ryan Burns 577c62aab1 os-specific/netbsd: fix mandoc splicing
This expression is not properly spliced, so we need to
manually specify buildPackages so that mandoc will not
be built for the host platform

Fixes cross-compilation of netbsd.* packages that depend
on mandoc in nativeBuildInputs, such as `getent`.
2021-12-10 18:30:37 -08:00
sternenseemann c271888a89 netbsd.man: fix build
* Fails because it's missing ps2pdf. In the beginning I fixed this by
  providing ghostscript as a nativeBuildInput, but the PDF created for
  man0 doesn't appear to be installed, so we can just patch out the call
  to the tool.

* We need to disable MKRUMP or provide sys/rump/share/man in sourceRoot,
  opted for the former since it's simpler at the moment, but the latter
  is also possible with a custom unpackPhase.
2021-11-15 14:26:13 +01:00
Alyssa Ross f5b089b626 netbsd: add missing rsync native build inputs
Using extraPaths in NetBSD packages now requires rsync, but the rsync
dependency wasn't added to all the packages using extraPaths that
override nativeBuildInputs, so they'd just fail immediately.

Fixes: 75db7f8eb0 ("netbsd: Use rsync to speed up source merging")
2021-11-09 22:53:22 +00:00
Ryan Burns 9eb591df10 netbsd.compat: fix libs by using cctools strip as objcopy
Reverts d43df749ac

NetBSD makefiles strip local symbols from libs using `OBJCOPY?=objcopy`,
which is missing on macOS. GNU objcopy appears to succeed but produces
broken .a libs which do not link into dependers.

(As this issue does not fail the netbsd.compat build,
downstream netbsd.install is added to passthru.tests.)

Since `OBJCOPY` is only used for stripping, we can:
* skip stripping with the hacky `OBJCOPY=echo`
* use cctools strip, which is invoked in the same way

The latter is obviously preferable if it works.
Indeed, locals are stripped, although it doesn't affect size much.
Comparison:

`OBJCOPY=echo`:
```
$ du -b result/lib/*.a
347784	result/lib/libnbcompat.a
357120	result/lib/libnbcompat_p.a
```

`OBJCOPY=${cctools}/bin/strip`:
```
$ du -b result/lib/*.a
347008	result/lib/libnbcompat.a
357120	result/lib/libnbcompat_p.a
```
2021-09-22 17:42:12 -07:00
Ryan Burns d43df749ac netbsd.compat: fix build on darwin
The makefile requires GNU objcopy
2021-09-19 21:58:33 +09:00
John Ericson 2fdb859716 netbsd: Make hard/soft float match systems settings 2021-09-03 14:20:12 +00:00
John Ericson ad609d27b5 netbsd.compat: Fix cross compilation
Not to netbsd, where it isn't needed, but elsewhere.

A few things going on here:

 - Make compat use the "regular" not "host" makefile infra. This,
   however, makes more assumptions that the toolchain is BSD-like, and
   so we need to compensate for them with the likes of:

    - `LORDER=...` and `TSORT=...`

    - Move `export INSTALL_*` to install's setup hook so they don't interfere
      with coreutils install

 - Don't use `DESTDIR` for installing include files, instead set `INCSDIR`.
   This is more proper, but doesn't work when `INCSDIR` is set multiple
   times, unfortunately, as CLI defs override all other assignments. So
   instead set `INCSDIR0` on the CLI, and do some `INCSDIR =
   ${INCSDIR0}/...` in the relevant packages.

    - `INCSDIR` is set just in the NetBSD setup hook because FreeBSD uses
    `INCLUDEDIR`.
2021-09-03 14:19:49 +00:00
John Ericson af58c2cc0c netbsd.compat: Don't configure twice 2021-09-03 03:09:05 +00:00
John Ericson 2810201833 netbsd: Split out path merging from bsd setup hook
I plan on doing the sources for FreeBSD differently. Indeed we might
want to change this for NetBSD too eventually.

In any event, the way we manage sources is not intrinsically the same
across BSDs so it makes sense to pull this out.
2021-07-11 21:11:10 +00:00
John Ericson 75db7f8eb0 netbsd: Use rsync to speed up source merging
The find -exec that was there before is quite slow on my machine. This
is much faster.
2021-07-10 21:20:29 +00:00
github-actions[bot] f8b7190a42
Merge staging-next into staging 2021-06-10 00:06:44 +00:00
ash lea 3f2e9c6dcc netbsd: add aliases for i486 and i586 2021-06-09 22:10:41 +00:00
github-actions[bot] 4db56e21dc
Merge staging-next into staging 2021-06-07 00:15:20 +00:00
Alyssa Ross f2c72bca63 netbsd: disable stack protection on i686
Builds fail otherwise, because the linker can't find the stack
protector symbols.
2021-06-06 18:52:58 +00:00
github-actions[bot] abef57f931
Merge staging-next into staging 2021-05-31 19:44:15 +00:00
Alyssa Ross 7216862bb0 netbsdCross.ld_elf_so: use same stage's libc
We need netbsdCross.ld_elf_so to be the dynamic linker in cross
netbsd's bintools, but netbsdCross doesn't have a libc in stdenv.  So
instead, use netbsdCross.libc for netbsdCross.ld_elf_so.
2021-05-31 14:59:14 +00:00
Alyssa Ross e65724933b netbsd: 9.1 -> 9.2 2021-05-26 11:46:22 +00:00
Alyssa Ross 4a8dbecd16 netbsd: 8.0 -> 9.1
Notes:

- compat: Needs a header from common merged with it's wrapper.

- librt: Needs the jemalloc sources.

- libc: install libc_pic.a

  This was the behaviour on NetBSD 8.0, and ld.elf_so (in its current
  configuration) requires it.  We could also have disabled PIC in
  ld.elf_so.

- sys: fix build

  We use a more recent version of binutils than NetBSD 9.1 does, so we
  need to backport a patch from CURRENT.

Co-authored-by: John Ericson <John.Ericson@Obsidian.Systems>
2021-05-09 18:56:20 +00:00
John Ericson a3e54cb582 Merge remote-tracking branch 'upstream/staging-next' into staging 2021-05-06 15:48:25 -04:00
Alyssa Ross 29271ef915 netbsd.libedit: fix build 2021-05-01 12:46:18 +00:00
Alyssa Ross f27de651fd
netbsd.libcurses: fix build 2021-04-30 13:56:27 +00:00
John Ericson 96b2cb441c
Merge pull request #120283 from Ericson2314/netbsd-fewer-vars
netbsd: Remove some env vars that are probably not needed.
2021-04-23 20:57:18 -04:00
github-actions[bot] 944e32775d
Merge staging-next into staging 2021-04-24 00:16:20 +00:00
John Ericson b867117b86 netbsd: Remove some env vars that are probably not needed.
Tool setup hooks will set most.
2021-04-23 21:55:09 +00:00
Alyssa Ross 7134116d6b
netbsd.common: just export the sources
"common" is just a lot of shared code, not a component in and of
itself.  There's no Makefile, so if we try to build it Make will go up
a directory and try to build all of NetBSD.
2021-04-23 20:59:57 +00:00
John Ericson 068a59a394
Merge pull request #120355 from alyssais/netbsd-libutil
netbsd.libutil: fix build
2021-04-23 16:56:03 -04:00
Alyssa Ross 554874700a
netbsd.libkern: remove
libkern is only used as part of building the kernel.  There's no
reason for us to have a seperate package for it.
2021-04-23 17:22:06 +00:00
Alyssa Ross 01ea399625
netbsd.libutil: fix build
Tested by building pkgsCross.x86_64-netbsd.netbsd.libutil on
x86_64-linux.
2021-04-23 15:52:30 +00:00
John Ericson 53a2aee7d7
Merge pull request #120347 from alyssais/netbsd-librt
netbsd.librt: fix build
2021-04-23 11:42:34 -04:00
John Ericson 8fec31c93f
Merge pull request #120348 from alyssais/netbsd-librpcsvc
netbsd.librpcsvc: fix build
2021-04-23 11:39:45 -04:00
John Ericson a45420985f
Merge pull request #120350 from alyssais/netbsd-libpthread
netbsd.libpthread: fix build
2021-04-23 11:39:12 -04:00
Alyssa Ross e8a81f2f99
netbsd.libcrypt: fix build
Tested by building pkgsCross.x86_64-netbsd.netbsd.libcrypt on
x86_64-linux.
2021-04-23 15:20:41 +00:00
Alyssa Ross 870ce0999b
netbsd.libpthread: fix build
Tested by building pkgsCross.x86_64-netbsd.netbsd.libpthread on
x86_64-linux.
2021-04-23 15:15:30 +00:00
Alyssa Ross 152179f71d
netbsd.librpcsvc: fix build
Tested by building pkgsCross.x86_64-netbsd.netbsd.librpcsvc on
x86_64-linux.
2021-04-23 14:59:58 +00:00
Alyssa Ross be7a9bab0f
netbsd.librt: fix build
This is another one of those packages that's just a rebuild of a
certain part of libc...

Tested by building pkgsCross.x86_64-netbsd.netbsd.librt on
x86_64-linux.

libc's postPatch was entirely fixes for librt, so move that to librt
and inherit it in libc.
2021-04-23 14:48:35 +00:00
Alyssa Ross 7cdc46f4e3 netbsd.libterminfo: add missing $makeFlags 2021-04-23 14:18:48 +00:00
Alyssa Ross b4373892ce netbsd.libterminfo: add missing bsdSetupHook dep
82c231d17e ("netbsd: Generalize builder to any-bsd setup hook")
missed libterminfo when it added bsdSetupHook to every other
package.  (I checked it didn't miss anything else.)

It also didn't change a NETBSDSRCDIR to BSDSRCDIR, but in fairness
that line was added about half an hour before the setupHook change was
merged in a16384e118.

Fixes: 82c231d17e ("netbsd: Generalize builder to any-bsd setup hook")
2021-04-23 14:18:48 +00:00
Alyssa Ross 5c24380395
netbsd.libm: fix build
Tested building pkgsCross.x86_64-netbsd.netbsd.libm from x86_64-linux.

At some point we should probably set SHLIBINSTALLDIR in the setupHook,
but I think I'd like to get everything working first, and then make
changes that affect all the builds like that.  It's easier to spot
regressions when you know _everything_ worked before.
2021-04-23 00:17:05 +00:00
John Ericson e4b05fbf47 netbsd: Make boostrapping more orthodox and don't rely on splicing
- No splicing makes everything less finnicky.

- Normal bootstrapping matches e.g. linux where kernel headers are also
`stdenvNoCC` but part of this stage.
2021-04-22 23:24:24 +00:00
Alyssa Ross 760c0428cb netbsd.i18n_module: fix build
Tested building pkgsCross.x86_64-netbsd.netbsd.i18n_module from
x86_64-linux.
2021-04-22 18:33:14 +00:00
Alyssa Ross c5ab13fc00 netbsd.libresolv: fix build
Tested building pkgsCross.x86_64-netbsd.netbsd.libresolv from
x86_64-linux.
2021-04-22 18:32:27 +00:00
John Ericson a16384e118
Merge pull request #119916 from Ericson2314/bsd-setup-hook
netbsd: Generalize builder to any-bsd setup hook
2021-04-22 12:34:47 -04:00
Alyssa Ross a2d88c63c6 netbsd.libterminfo: fix build
Tested building netbsd.libterminfo and
pkgsCross.x86_64-netbsd.netbsd.libterminfo from x86_64-linux.
2021-04-22 15:58:38 +00:00
John Ericson 82c231d17e netbsd: Generalize builder to any-bsd setup hook
Do this to get ready for other BSDs.
2021-04-22 15:54:32 +00:00
John Ericson ff94ed255a
Merge pull request #120225 from alyssais/netbsd-libossaudio
netbsd.libossaudio: fix build
2021-04-22 11:53:12 -04:00
Alyssa Ross 8c48bb08d7
netbsd.libossaudio: fix build
The file this was trying to modify doesn't even exist.

Tested by building pkgsCross.x86_64-netbsd.netbsd.libossaudio from
x86_64-linux.
2021-04-22 15:38:07 +00:00
Alyssa Ross 2a16327a83
netbsd.ld_elf_so: fix build
Tested building pkgsCross.x86_64-netbsd.netbsd.ld_elf_so from
x86_64-linux.
2021-04-22 10:34:56 +00:00
John Ericson 5910c5375f netbsd.mkDerviation: remove pointless attrs.src or
`attrs` overrides these defaults already.
2021-04-19 19:49:22 +00:00
Alyssa Ross ddcb48cc3d
netbsd.sys: actually build the kernel
Before, we were only building the headers, firmware, and bootloader.

CONFIG could be overridden to use another pre-defined kernel, but
there's no way to pass a custom kernel configuration yet.

Tested booting the built kernel in a NetBSD VM.
2021-04-18 19:16:51 +00:00
Alyssa Ross 37ac32a351
netbsd.config: init at 8.0
Needed to build the NetBSD kernel.
2021-04-18 19:04:27 +00:00