This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: configure erroneously detects eh_frame misoptimization
- From: Andrew Pinski <pinskia at gmail dot com>
- To: Steven Taschuk <steven at amotlpaa dot org>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 19 Sep 2017 17:06:26 -0700
- Subject: Re: configure erroneously detects eh_frame misoptimization
- Authentication-results: sourceware.org; auth=none
- References: <20170919234216.GA23164@femur>
On Tue, Sep 19, 2017 at 4:42 PM, Steven Taschuk <steven@amotlpaa.org> wrote:
> The behaviour of echo for arguments containing the two-character
> substring `\0` varies among implementations: in coreutils echo,
> and in the builtins of ash, bash, busybox sh, csh, and fish, the two
> characters `\0` are emitted literally; the builtins of tcsh and zsh
> emit a null character and continue rendering the rest of the string;
> dash's builtin terminates the string early.
>
> Ubuntu since 6.10 uses dash as /bin/sh, so on such systems,
> configure misdiagnoses the assembler as unable to optimize eh_frame
> sections correctly, yielding ultimately an unnecessary use of
> `--traditional-format` in the driver's invocation of the assembler.
configure is autogenerated so you should be modifying configure.ac and
regenerate configure.
I think overall this patch is correct approach to fix this bug. You
should provide a changelog and have the patch against the trunk of GCC
rather than doing it against a release (especially a release is from a
no longer a supported branch).
Please https://gcc.gnu.org/contribute.html for some more information
on the all of the requirements when it comes to submitting a patch. I
provided some of the requirements above. Note since this is a small
enough patch, the legal requirement is waved but if you are thinking
about contributing in the future, you should think about getting a
copyright assigned signed if you don't already have one.
Thanks,
Andrew
Thanks,
Andrew
>
> diff -ru gcc-4.2.1-orig/gcc/configure gcc-4.2.1/gcc/configure
> --- gcc-4.2.1-orig/gcc/configure 2007-01-01 22:44:31.000000000 -0500
> +++ gcc-4.2.1/gcc/configure 2017-09-19 06:50:48.546060400 -0400
> @@ -14076,7 +14076,8 @@
> .LSCIE1:
> .4byte 0x0
> .byte 0x1
> - .ascii "z\0"
> + .ascii "z"
> + .byte 0x0
> .byte 0x1
> .byte 0x78
> .byte 0x1a