rust/mk/cfg
bors 71409184dc Auto merge of #29177 - vadimcn:rtstuff, r=alexcrichton
Note: for now, this change only affects `-windows-gnu` builds.

So why was this `libgcc` dylib dependency needed in the first place?
The stack unwinder needs to know about locations of unwind tables of all the modules loaded in the current process.  The easiest portable way of achieving this is to have each module register itself with the unwinder when loaded into the process.  All modules compiled by GCC do this by calling the __register_frame_info() in their startup code (that's `crtbegin.o` and `crtend.o`, which are automatically linked into any gcc output).
Another important piece is that there should be only one copy of the unwinder (and thus unwind tables registry) in the process.  This pretty much means that the unwinder must be in a shared library (unless everything is statically linked). 

Now, Rust compiler tries very hard to make sure that any given Rust crate appears in the final output just once.   So if we link the unwinder statically to one of Rust's crates, everything should be fine.

Unfortunately, GCC startup objects are built under assumption that `libgcc` is the one true place for the unwind info registry, so I couldn't find any better way than to replace them.  So out go `crtbegin`/`crtend`, in come `rsbegin`/`rsend`!  

A side benefit of this change is that rustc is now more in control of the command line that goes to the linker, so we could stop using `gcc` as the linker driver and just invoke `ld` directly.
2015-11-01 17:15:29 +00:00
..
aarch64-apple-ios.mk
aarch64-linux-android.mk Splits Android NDK path configuration. 2015-07-28 19:21:04 +12:00
aarch64-unknown-linux-gnu.mk mk: Ensure LINK_$(1) is defined for all targets 2015-05-26 10:05:46 -07:00
arm-linux-androideabi.mk Splits Android NDK path configuration. 2015-07-28 19:21:04 +12:00
arm-unknown-linux-gnueabi.mk
arm-unknown-linux-gnueabihf.mk
armv7-apple-ios.mk
armv7s-apple-ios.mk
i386-apple-ios.mk
i686-apple-darwin.mk mk: Ensure LINK_$(1) is defined for all targets 2015-05-26 10:05:46 -07:00
i686-linux-android.mk New cross target: i686-linux-android 2015-08-23 15:38:11 +08:00
i686-pc-windows-gnu.mk Don't use GCC's startup objects (crtbegin.o/crtend.o); build and use our own (for now on for -windows-gnu target only). 2015-10-19 00:42:04 -07:00
i686-pc-windows-msvc.mk Register new snapshots 2015-08-11 15:11:13 -07:00
i686-unknown-freebsd.mk adding support for i686-unknown-freebsd target 2015-07-11 00:23:04 -07:00
i686-unknown-linux-gnu.mk mk: Ensure LINK_$(1) is defined for all targets 2015-05-26 10:05:46 -07:00
mips-unknown-linux-gnu.mk mk: Fix compile for mips 2015-10-16 14:30:56 -07:00
mipsel-unknown-linux-gnu.mk mk: Fix compile for mips 2015-10-16 14:30:56 -07:00
powerpc-unknown-linux-gnu.mk
x86_64-apple-darwin.mk mk: Ensure LINK_$(1) is defined for all targets 2015-05-26 10:05:46 -07:00
x86_64-apple-ios.mk
x86_64-pc-windows-gnu.mk Don't use GCC's startup objects (crtbegin.o/crtend.o); build and use our own (for now on for -windows-gnu target only). 2015-10-19 00:42:04 -07:00
x86_64-pc-windows-msvc.mk Register new snapshots 2015-08-11 15:11:13 -07:00
x86_64-rumprun-netbsd.mk Add support for the rumprun unikernel 2015-09-26 14:10:14 +02:00
x86_64-unknown-bitrig.mk
x86_64-unknown-dragonfly.mk
x86_64-unknown-freebsd.mk
x86_64-unknown-linux-gnu.mk mk: Ensure LINK_$(1) is defined for all targets 2015-05-26 10:05:46 -07:00
x86_64-unknown-linux-musl.mk musl only uses rlib files for stdlib linking 2015-06-14 16:18:51 +01:00
x86_64-unknown-netbsd.mk Various fixes for NetBSD/amd64 2015-09-21 21:50:54 +02:00
x86_64-unknown-openbsd.mk