rust/mk
bors 9c1aaeb7b9 Auto merge of #28543 - gandro:netbsd, r=alexcrichton
These changes introduce the ability to cross-compile working binaries for NetBSD/amd64. Previous support added in PR #26682 shared all its code with the OpenBSD implementation, and was therefore never functional (e.g. linking against non-existing symbols and using wrong type definitions). Nonetheless, the previous patches were a great starting point and made my work significantly easier. 😃 

Because there are no stage0 snapshots for NetBSD (yet), I used a cross-compiler for NetBSD 7.0 RC3 and only tested some toy programs (threading and channels, stack guards, a small TCP/IP echo server and some other platform dependent bits). If someone could point me to documentation on how to generate a stage0 snapshot from a cross-compiler I'm happy to run the full test suite.

A few other notes regarding Rust on NetBSD/amd64:
- To preserve binary compatibility, NetBSD introduces new symbols for system call wrappers on breaking ABI changes and keeps the old (legacy) symbols around, see [this documentation](https://www.netbsd.org/docs/internals/en/chap-processes.html#syscalls_master) for some details. I went ahead and modified the `libc` and `std` crate to use the current (renamed) symbols instead of the legacy ones where I found them, but I might have missed some. Notably using the `sigaction` symbol (deprecated in 1998) instead of `__sigaction14` even triggers SIGSYS (bad syscall) on my amd64 setup. I also changed the type definitions to use the most recent version.
- NetBSD's gdb doesn't really support position independent executables, so you might want to turn that off for debugging, see [NetBSD Problem Report #48250](https://gnats.netbsd.org/48250).
- For binaries invoked using a relative path, NetBSD supports `$ORIGIN` only for short `rpath`s (~64 chars or so, I'm told). If running an executable fails with `execname not specified in AUX vector: No such file or directory`, consider invoking the binary using its full absolute path.
2015-09-22 19:13:39 +00:00
..
cfg Various fixes for NetBSD/amd64 2015-09-21 21:50:54 +02:00
clean.mk Remove morestack support 2015-08-10 16:35:44 -07:00
crates.mk add MIR crate and link it into the driver 2015-09-06 07:27:23 -04:00
ctags.mk Update the ctags rules and targets. 2015-07-30 06:35:42 +10:00
debuggers.mk debuginfo: Create common debugger pretty printer module. 2015-05-30 20:06:08 +02:00
dist.mk Don't include *.pyc files in source tarball 2015-09-19 20:04:10 +12:00
docs.mk Introduce 'make doc' -> 'make docs' 2015-09-02 22:00:58 -04:00
grammar.mk Add a LALR grammar for Rust with testing support 2015-01-20 18:47:17 -08:00
host.mk
install.mk configure: Remove obsolete --disable-verify option 2015-04-08 12:16:47 -07:00
llvm.mk add support for non-standard name of stdc++ library 2015-09-18 18:03:59 +02:00
main.mk Bump to 1.5 2015-09-15 14:05:10 -07:00
perf.mk
platform.mk Pass libstdc++.so path to linker under OpenBSD 2015-09-20 19:06:37 +02:00
prepare.mk Replace nop hack, explain substitution reasoning 2015-06-13 17:27:12 +01:00
reconfig.mk mk: Fix reconfiguring top-level ./configure 2015-06-17 17:32:11 -07:00
rt.mk Add line numbers to windows-gnu backtraces 2015-09-04 01:25:15 +01:00
rustllvm.mk trans: Use LLVM's writeArchive to modify archives 2015-07-10 09:06:21 -07:00
snap.mk
stage0.mk
target.mk plumbing to automatically run MIR for crates where it works; 2015-09-06 07:27:23 -04:00
tests.mk rmake: Get all tests passing on MSVC 2015-09-17 08:40:33 -07:00
util.mk mk: Build crates with relative paths to rustc 2015-06-13 01:41:52 +02:00