diff mbox series

libgcc: xtensa: fix build with -mtext-section-literals

Message ID 1517371369-25455-1-git-send-email-jcmvbkbc@gmail.com
State New
Headers show
Series libgcc: xtensa: fix build with -mtext-section-literals | expand

Commit Message

Max Filippov Jan. 31, 2018, 4:02 a.m. UTC
libgcc/
2018-01-31  Max Filippov  <jcmvbkbc@gmail.com>

	* config/xtensa/ieee754-df.S (__adddf3_aux): Add
	.literal_position directive.
	* config/xtensa/ieee754-sf.S (__addsf3_aux): Likewise.
---
 libgcc/config/xtensa/ieee754-df.S | 1 +
 libgcc/config/xtensa/ieee754-sf.S | 1 +
 2 files changed, 2 insertions(+)

Comments

augustine.sterling@gmail.com Jan. 31, 2018, 7:11 p.m. UTC | #1
On Tue, Jan 30, 2018 at 8:02 PM, Max Filippov <jcmvbkbc@gmail.com> wrote:
>
> libgcc/
> 2018-01-31  Max Filippov  <jcmvbkbc@gmail.com>
>
>         * config/xtensa/ieee754-df.S (__adddf3_aux): Add
>         .literal_position directive.
>         * config/xtensa/ieee754-sf.S (__addsf3_aux): Likewise.


This is fine, but when did it stop working, and why isn't there a test
that would catch it?
Max Filippov Jan. 31, 2018, 7:17 p.m. UTC | #2
On Wed, Jan 31, 2018 at 11:11 AM, augustine.sterling@gmail.com
<augustine.sterling@gmail.com> wrote:
> On Tue, Jan 30, 2018 at 8:02 PM, Max Filippov <jcmvbkbc@gmail.com> wrote:
>>
>> libgcc/
>> 2018-01-31  Max Filippov  <jcmvbkbc@gmail.com>
>>
>>         * config/xtensa/ieee754-df.S (__adddf3_aux): Add
>>         .literal_position directive.
>>         * config/xtensa/ieee754-sf.S (__addsf3_aux): Likewise.
>
>
> This is fine, but when did it stop working, and why isn't there a test
> that would catch it?

I broke it with the recent softfloat NaN fix. Haven't noticed that because
I usually build without any flags or with -mauto-litpools.
Let me add the test, thanks for the suggestion.
Max Filippov Feb. 1, 2018, 5:12 p.m. UTC | #3
Hi Sterling,

On Wed, Jan 31, 2018 at 11:17 AM, Max Filippov <jcmvbkbc@gmail.com> wrote:
> On Wed, Jan 31, 2018 at 11:11 AM, augustine.sterling@gmail.com <augustine.sterling@gmail.com> wrote:
>> On Tue, Jan 30, 2018 at 8:02 PM, Max Filippov <jcmvbkbc@gmail.com> wrote:
>>>
>>> libgcc/
>>> 2018-01-31  Max Filippov  <jcmvbkbc@gmail.com>
>>>
>>>         * config/xtensa/ieee754-df.S (__adddf3_aux): Add
>>>         .literal_position directive.
>>>         * config/xtensa/ieee754-sf.S (__addsf3_aux): Likewise.
>>
>> This is fine, but when did it stop working, and why isn't there a test
>> that would catch it?
>
> I broke it with the recent softfloat NaN fix. Haven't noticed that because
> I usually build without any flags or with -mauto-litpools.
> Let me add the test, thanks for the suggestion.

I've taken a look at gcc testsuites and I don't see how to add a test that would
check that libgcc builds with different compiler options. Any suggestions?
Max Filippov Feb. 7, 2018, 10:10 p.m. UTC | #4
On Thu, Feb 1, 2018 at 9:12 AM, Max Filippov <jcmvbkbc@gmail.com> wrote:
> On Wed, Jan 31, 2018 at 11:17 AM, Max Filippov <jcmvbkbc@gmail.com> wrote:
>> On Wed, Jan 31, 2018 at 11:11 AM, augustine.sterling@gmail.com <augustine.sterling@gmail.com> wrote:
>>> On Tue, Jan 30, 2018 at 8:02 PM, Max Filippov <jcmvbkbc@gmail.com> wrote:
>>>>
>>>> libgcc/
>>>> 2018-01-31  Max Filippov  <jcmvbkbc@gmail.com>
>>>>
>>>>         * config/xtensa/ieee754-df.S (__adddf3_aux): Add
>>>>         .literal_position directive.
>>>>         * config/xtensa/ieee754-sf.S (__addsf3_aux): Likewise.
>>>
>>> This is fine, but when did it stop working, and why isn't there a test
>>> that would catch it?
>>
>> I broke it with the recent softfloat NaN fix. Haven't noticed that because
>> I usually build without any flags or with -mauto-litpools.
>> Let me add the test, thanks for the suggestion.
>
> I've taken a look at gcc testsuites and I don't see how to add a test that would
> check that libgcc builds with different compiler options. Any suggestions?

If there are no suggestions I will check in the fix as is and will add building
with -mtext-section-literals to my testing scripts.
Max Filippov Feb. 20, 2018, 9:17 p.m. UTC | #5
On Wed, Feb 7, 2018 at 2:10 PM, Max Filippov <jcmvbkbc@gmail.com> wrote:
> On Thu, Feb 1, 2018 at 9:12 AM, Max Filippov <jcmvbkbc@gmail.com> wrote:
>> On Wed, Jan 31, 2018 at 11:17 AM, Max Filippov <jcmvbkbc@gmail.com> wrote:
>>> On Wed, Jan 31, 2018 at 11:11 AM, augustine.sterling@gmail.com <augustine.sterling@gmail.com> wrote:
>>>> On Tue, Jan 30, 2018 at 8:02 PM, Max Filippov <jcmvbkbc@gmail.com> wrote:
>>>>>
>>>>> libgcc/
>>>>> 2018-01-31  Max Filippov  <jcmvbkbc@gmail.com>
>>>>>
>>>>>         * config/xtensa/ieee754-df.S (__adddf3_aux): Add
>>>>>         .literal_position directive.
>>>>>         * config/xtensa/ieee754-sf.S (__addsf3_aux): Likewise.
>>>>
>>>> This is fine, but when did it stop working, and why isn't there a test
>>>> that would catch it?
>>>
>>> I broke it with the recent softfloat NaN fix. Haven't noticed that because
>>> I usually build without any flags or with -mauto-litpools.
>>> Let me add the test, thanks for the suggestion.
>>
>> I've taken a look at gcc testsuites and I don't see how to add a test that would
>> check that libgcc builds with different compiler options. Any suggestions?
>
> If there are no suggestions I will check in the fix as is and will add building
> with -mtext-section-literals to my testing scripts.

I've checked the fix into the trunk, gcc-6 and gcc-7 branches.
diff mbox series

Patch

diff --git a/libgcc/config/xtensa/ieee754-df.S b/libgcc/config/xtensa/ieee754-df.S
index 2662a6600751..a997c1b42632 100644
--- a/libgcc/config/xtensa/ieee754-df.S
+++ b/libgcc/config/xtensa/ieee754-df.S
@@ -55,6 +55,7 @@  __negdf2:
 
 #ifdef L_addsubdf3
 
+	.literal_position
 	/* Addition */
 __adddf3_aux:
 	
diff --git a/libgcc/config/xtensa/ieee754-sf.S b/libgcc/config/xtensa/ieee754-sf.S
index d48b230a7588..695c67b0fc8f 100644
--- a/libgcc/config/xtensa/ieee754-sf.S
+++ b/libgcc/config/xtensa/ieee754-sf.S
@@ -55,6 +55,7 @@  __negsf2:
 
 #ifdef L_addsubsf3
 
+	.literal_position
 	/* Addition */
 __addsf3_aux: