This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Add -nolibc option

On Thu, 27 Jul 2017, Tristan Gingold wrote:

> Index: gcc/common.opt
> ===================================================================
> --- gcc/common.opt	(revision 250563)
> +++ gcc/common.opt	(working copy)
> @@ -2956,6 +2956,10 @@
>  nostdlib
>  Driver
> +nolibc
> +Driver
> +Do not link with libc

Help texts should end with ".".  This may not cause a test failure in this 
particular case because help texts for Driver options aren't actually used 
(and the test for help text formatting checks the --help output, not the 
.opt files); you actually need to update gcc.c:display_help to get a help 
text in the driver's --help output.

Since none of the related options such as -nostdlib are mentioned in that 
--help output, either removing the help text or adding "." would seem 
appropriate.  Or add all those options to --help output separately.

> Index: gcc/config/arm/unknown-elf.h
> ===================================================================
> --- gcc/config/arm/unknown-elf.h	(revision 250563)
> +++ gcc/config/arm/unknown-elf.h	(working copy)
> @@ -91,6 +91,6 @@
>  /* The libgcc udivmod functions may throw exceptions.  If newlib is
>     configured to support long longs in I/O, then printf will depend on
>     udivmoddi4, which will depend on the exception unwind routines,
> -   which will depend on abort, which is defined in libc.  */
> +   which will depend on abort, which is defined in libc.  */
> -#define LINK_GCC_C_SEQUENCE_SPEC "--start-group %G %L --end-group"
> +#define LINK_GCC_C_SEQUENCE_SPEC "--start-group %G %{!nolibc:%L} --end-group"

There are lots of other LINK_GCC_C_SEQUENCE_SPEC definitions for 
particular targets I'd expect to be updated.

Joseph S. Myers

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]