Hello Joseph, This is a follow up on an exchange you had with Tristan Gingold back in Aug. 2017, starting from
https://gcc.gnu.org/ml/gcc-patches/2017-07/msg01824.html with your answer on his proposal at: https://gcc.gnu.org/ml/gcc-patches/2017-08/msg00166.html (Tristan has moved to other horizons since then.) An updated version of the patch is attached, accounting for your two comments and expanding on the .texi documentation a bit. As it is, the option guards the expansion of %L within LINK_GCC_C_SEQUENCE_SPECs, and despite what the macro name seems to imply, %L expands LIB_SPEC which includes more than just "-lc" or alike on some targets. This actually corresponds well to the use we have on baremetal targets. We build and exercise quite a few such targets with this patch in for gcc-7 based toolchains, for a variety of cpu families (sparc/leon, arm, ppc, aarch64, e500v2, visium). The patch applied almost as-is on mainline, where I just re-bootstrapped and reg-tested on x86_64-linux. I can perform some extra testing if necessary. Thoughts ? Thanks in advance! With Kind Regards, Olivier 2018-06-07 Tristan Gingold <ging...@adacore.com> Olivier Hainque <hain...@adacore.com> * common.opt (nolibc): New option. * doc/invoke.texi (Link Options): Document it. * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc. * config/alpha/linux.h: Likewise. * config/arm/uclinux-elf.h: Likewise. * config/arm/unknown-elf.h: Likewise. * config/avr/avrlibc.h: Likewise. * config/bfin/bfin.h: Likewise. * config/bfin/linux.h: Likewise. * config/bfin/uclinux.h: Likewise. * config/darwin.h: Likewise. * config/darwin10.h: Likewise. * config/darwin12.h: Likewise. * config/gnu-user.h: Likewise. * config/lm32/uclinux-elf.h: Likewise. * config/pa/pa-hpux11.h: Likewise. * config/pa/pa64-hpux.h: Likewise. * config/sparc/sparc.h: Likewise.
0001-Add-nolibc-driver-switch.patch
Description: Binary data