On 01/04/2018 02:15 AM, Rainer Orth wrote:
> Bootstrapping on Solaris/SPARC with /bin/as fails in make compare. The
> difference is always like this:
>
> * With -gtoggle (stage2), there's no .text section in the assembler
> output.
>
> * Without -gtoggle (stage3), the assembler output gets
>
> --- table.s.gtoggle 2017-08-28 14:07:23.811292680 +0000
> +++ table.s.no-gtoggle 2017-08-28 14:08:00.674764535 +0000
> @@ -1,4 +1,6 @@
> .file "table.adb"
> + .section ".text"
> +.LLtext0:
> .global table_E
> .section ".data"
> .align 2
> @@ -6,4 +8,43 @@
> .size table_E, 2
> table_E:
> .skip 2
> + .section ".text"
> +.LLetext0:
>
> While gas always adds a .text section, even for an empty imput file,
> /bin/as on sparc does not, thus the difference, although it causes no
> functional change.
>
> The following patch (suggested by Richard in the PR) fixes this by
> always emitting a text section in the callers of the assembly_start
> debug hook so this works with and without -gtoggle.
>
> Bootstrapped without regressions on sparc-sun-solaris2.11.
>
> Ok for mainline (and eventually the gcc-7 branch)?
>
Yes. OK.
jeff