On 07/08/2021 00:08, Mark Wielaard wrote: > Hi Philip, > > On Fri, Aug 06, 2021 at 03:58:24PM +0100, Philip Herron wrote: >> Great patch, this file has been neglected. This is now being merged >> https://github.com/Rust-GCC/gccrs/pull/610 >> >> Its not 100% clear but is the compiler driver here automatically adding >> in -lc or is it simply checking if it saw_libc? > It does pass -lc (if not saw_libc). You can see what is invoked with > which arguments using -v (e.g. gcc/gccrs -B gcc -v foobar.rs). > > One of the things we are using is the crt1.o startup code, which > provides the _start symbol and which relies on libc (in particular > __libc_start_main and abort). > > The patch wasn't really meant to change how we currently do > assembling, linking and startup. But just to remove those parts that > were unnecessary because they were go specific. > > Cheers, > > Mark > Awesome thanks for checking. Agreed that this patch was not meant to change that behavior but it was a great start at cleaning up the driver. I am now wondering if rustc reuses the same type of startup code. I'll go ask more questions about it :) Thanks --PhilÂ