https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90701
--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> --- -nostdlib controls which libraries to link against, you can still link against a set of C library. While -ffreestanding controls if you are compiling freestanding C (which is part of the C standard).