nixpkgs/pkgs/os-specific/bsd/netbsd
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
..
compat-cxx-safe-header.patch netbsd.compat: Don't configure twice 2021-09-03 03:09:05 +00:00
compat-dont-configure-twice.patch netbsd.compat: Don't configure twice 2021-09-03 03:09:05 +00:00
compat-no-force-native.patch netbsd: Make hard/soft float match systems settings 2021-09-03 14:20:12 +00:00
compat-setup-hook.sh
default.nix netbsd.compat: fix libs by using cctools strip as objcopy 2021-09-22 17:42:12 -07:00
fts-setup-hook.sh
getent.patch
install-setup-hook.sh netbsd.compat: Fix cross compilation 2021-09-03 14:19:49 +00:00
libbsd-overlay.pc
locale.patch
no-dynamic-linker.patch netbsd: 8.0 -> 9.1 2021-05-09 18:56:20 +00:00
setup-hook.sh netbsd.compat: Fix cross compilation 2021-09-03 14:19:49 +00:00
sys-headers-incsdir.patch netbsd.compat: Fix cross compilation 2021-09-03 14:19:49 +00:00