diff mbox series

[1/1] package/brotli: fix build on microblazewith -02

Message ID 20190514211526.26467-1-fontaine.fabrice@gmail.com
State Superseded
Headers show
Series [1/1] package/brotli: fix build on microblazewith -02 | expand

Commit Message

Fabrice Fontaine May 14, 2019, 9:15 p.m. UTC
Fixes:
 - http://autobuild.buildroot.org/results/4790c30b75cdec18f67cda9c6afcb6971ee27608

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 package/brotli/brotli.mk | 7 +++++++
 1 file changed, 7 insertions(+)

Comments

Adrian Perez de Castro May 15, 2019, 9:27 a.m. UTC | #1
Hi,

On Tue, 14 May 2019 23:15:26 +0200, Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:
> Fixes:
>  - http://autobuild.buildroot.org/results/4790c30b75cdec18f67cda9c6afcb6971ee27608
> 
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>

Reviewed-by: Adrian Perez de Castro <aperez@igalia.com>

> ---
>  package/brotli/brotli.mk | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/package/brotli/brotli.mk b/package/brotli/brotli.mk
> index 2c1ad48753..4afd3628a8 100644
> --- a/package/brotli/brotli.mk
> +++ b/package/brotli/brotli.mk
> @@ -14,4 +14,11 @@ BROTLI_CONF_OPTS = \
>  	-DBROTLI_DISABLE_TESTS=ON \
>  	-DBROTLI_BUNDLED_MODE=OFF
>  
> +# prevents from triggering GCC ICE
> +# A bug was reported to the gcc bug tracker:
> +# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68485
> +ifeq ($(BR2_microblaze),y)
> +BROTLI_CONF_OPTS += -DCMAKE_C_FLAGS="$(TARGET_CFLAGS) -O0"
> +endif

This is not a great fix, but still better than not being able to build the
package at all, so I think it's okay to merge it. ¯\_(ツ)_/¯ 

>  $(eval $(cmake-package))
> -- 
> 2.20.1
>
Giulio Benetti May 15, 2019, 9:42 a.m. UTC | #2
Hello All, Arnout, Thomas,

Il 15/05/2019 11:27, Adrian Perez de Castro ha scritto:
> Hi,
> 
> On Tue, 14 May 2019 23:15:26 +0200, Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:
>> Fixes:
>>   - http://autobuild.buildroot.org/results/4790c30b75cdec18f67cda9c6afcb6971ee27608
>>
>> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> 
> Reviewed-by: Adrian Perez de Castro <aperez@igalia.com>
> 
>> ---
>>   package/brotli/brotli.mk | 7 +++++++
>>   1 file changed, 7 insertions(+)
>>
>> diff --git a/package/brotli/brotli.mk b/package/brotli/brotli.mk
>> index 2c1ad48753..4afd3628a8 100644
>> --- a/package/brotli/brotli.mk
>> +++ b/package/brotli/brotli.mk
>> @@ -14,4 +14,11 @@ BROTLI_CONF_OPTS = \
>>   	-DBROTLI_DISABLE_TESTS=ON \
>>   	-DBROTLI_BUNDLED_MODE=OFF
>>   
>> +# prevents from triggering GCC ICE
>> +# A bug was reported to the gcc bug tracker:
>> +# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68485
>> +ifeq ($(BR2_microblaze),y)
>> +BROTLI_CONF_OPTS += -DCMAKE_C_FLAGS="$(TARGET_CFLAGS) -O0"
>> +endif
> 
> This is not a great fix, but still better than not being able to build the
> package at all, so I think it's okay to merge it. ¯\_(ツ)_/¯

This is another package added to the list of Microblaze GCC6/7 bug 85180.
List now is:
- atop
- flare-engine
- boost
- gst-ffmpeg
- glibmm
- qt5sensors
- (and this) brotli

I don't think this is the way to solve it. I mean, it would be ok for 
-O0, but at this point I'm going to make a patch that impose it at 
toolchain's Config.in, otherwise we need to wait every package to fail 
and patch it.

Another easier way is what Arnout suggested here:
http://lists.busybox.net/pipermail/buildroot/2019-May/250212.html

What I'm going to can check today is if there's a common fix for C and 
C++ compilation.
And it seems at the moment to be using -O0.

What about the 2 choices?
Thomas Petazzoni May 15, 2019, 9:50 a.m. UTC | #3
Hello,

On Wed, 15 May 2019 11:42:12 +0200
Giulio Benetti <giulio.benetti@micronovasrl.com> wrote:

> >> +# prevents from triggering GCC ICE
> >> +# A bug was reported to the gcc bug tracker:
> >> +# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68485
> >> +ifeq ($(BR2_microblaze),y)
> >> +BROTLI_CONF_OPTS += -DCMAKE_C_FLAGS="$(TARGET_CFLAGS) -O0"
> >> +endif  
> > 
> > This is not a great fix, but still better than not being able to build the
> > package at all, so I think it's okay to merge it. ¯\_(ツ)_/¯  
> 
> This is another package added to the list of Microblaze GCC6/7 bug 85180.

Be careful: we have two separate issues. Gcc bug 85180 and gcc bug 68485.

gcc bug 85180, which you were working on, causes the compiler to got in
an infinite loop

gcc bug 68485, which this patch is about, causes the compiler to throw
an ICE (Internal Compiler Error). I.e the compiler aborts, it does not
enter in an infinite loop.

It would be interesting to see if bug 68485 stills exists with gcc 8.x
or 9.x.

Best regards,

Thomas
Giulio Benetti May 15, 2019, 10:42 a.m. UTC | #4
Il 15/05/2019 11:50, Thomas Petazzoni ha scritto:
> Hello,
> 
> On Wed, 15 May 2019 11:42:12 +0200
> Giulio Benetti <giulio.benetti@micronovasrl.com> wrote:
> 
>>>> +# prevents from triggering GCC ICE
>>>> +# A bug was reported to the gcc bug tracker:
>>>> +# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68485
>>>> +ifeq ($(BR2_microblaze),y)
>>>> +BROTLI_CONF_OPTS += -DCMAKE_C_FLAGS="$(TARGET_CFLAGS) -O0"
>>>> +endif
>>>
>>> This is not a great fix, but still better than not being able to build the
>>> package at all, so I think it's okay to merge it. ¯\_(ツ)_/¯
>>
>> This is another package added to the list of Microblaze GCC6/7 bug 85180.
> 
> Be careful: we have two separate issues. Gcc bug 85180 and gcc bug 68485.
> 
> gcc bug 85180, which you were working on, causes the compiler to got in
> an infinite loop
> 
> gcc bug 68485, which this patch is about, causes the compiler to throw
> an ICE (Internal Compiler Error). I.e the compiler aborts, it does not
> enter in an infinite loop.

Right.

> It would be interesting to see if bug 68485 stills exists with gcc 8.x
> or 9.x.

Then I'm going to test both 8.x and 9.x right now for both bugs.

It seems hard to find a fix for GCC < 8.x and Microblaze is a niche.
So IMHO it seems a waste of time now with all these packages that fail.

Best regards
Arnout Vandecappelle May 15, 2019, 11:39 a.m. UTC | #5
On 15/05/2019 12:42, Giulio Benetti wrote:
> 
> 
> Il 15/05/2019 11:50, Thomas Petazzoni ha scritto:
>> Hello,
>>
>> On Wed, 15 May 2019 11:42:12 +0200
>> Giulio Benetti <giulio.benetti@micronovasrl.com> wrote:
>>
>>>>> +# prevents from triggering GCC ICE
>>>>> +# A bug was reported to the gcc bug tracker:
>>>>> +# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68485
>>>>> +ifeq ($(BR2_microblaze),y)
>>>>> +BROTLI_CONF_OPTS += -DCMAKE_C_FLAGS="$(TARGET_CFLAGS) -O0"
>>>>> +endif
>>>>
>>>> This is not a great fix, but still better than not being able to build the
>>>> package at all, so I think it's okay to merge it. ¯\_(ツ)_/¯
>>>
>>> This is another package added to the list of Microblaze GCC6/7 bug 85180.
>>
>> Be careful: we have two separate issues. Gcc bug 85180 and gcc bug 68485.
>>
>> gcc bug 85180, which you were working on, causes the compiler to got in
>> an infinite loop
>>
>> gcc bug 68485, which this patch is about, causes the compiler to throw
>> an ICE (Internal Compiler Error). I.e the compiler aborts, it does not
>> enter in an infinite loop.
> 
> Right.
> 
>> It would be interesting to see if bug 68485 stills exists with gcc 8.x
>> or 9.x.

 IIUC it was actually introduced in GCC8.x, and we backported the patch that
broke it: 0892-microblaze-Revert.patch

 So, my idea of requiring GCC8 for microblaze may not work out for all failures.

 Regards,
 Arnout

> 
> Then I'm going to test both 8.x and 9.x right now for both bugs.
> 
> It seems hard to find a fix for GCC < 8.x and Microblaze is a niche.
> So IMHO it seems a waste of time now with all these packages that fail.
> 
> Best regards
Giulio Benetti May 15, 2019, 3:45 p.m. UTC | #6
Hello

Il 15/05/2019 11:50, Thomas Petazzoni ha scritto:
> Hello,
> 
> On Wed, 15 May 2019 11:42:12 +0200
> Giulio Benetti <giulio.benetti@micronovasrl.com> wrote:
> 
>>>> +# prevents from triggering GCC ICE
>>>> +# A bug was reported to the gcc bug tracker:
>>>> +# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68485
>>>> +ifeq ($(BR2_microblaze),y)
>>>> +BROTLI_CONF_OPTS += -DCMAKE_C_FLAGS="$(TARGET_CFLAGS) -O0"
>>>> +endif
>>>
>>> This is not a great fix, but still better than not being able to build the
>>> package at all, so I think it's okay to merge it. ¯\_(ツ)_/¯
>>
>> This is another package added to the list of Microblaze GCC6/7 bug 85180.
> 
> Be careful: we have two separate issues. Gcc bug 85180 and gcc bug 68485.
> 
> gcc bug 85180, which you were working on, causes the compiler to got in
> an infinite loop

Yes

> gcc bug 68485, which this patch is about, causes the compiler to throw
> an ICE (Internal Compiler Error). I.e the compiler aborts, it does not
> enter in an infinite loop.

Right. Thank you.

> It would be interesting to see if bug 68485 stills exists with gcc 8.x
> or 9.x.

Gcc bug 68485 still exists with gcc 8.x and 9.x
Need to add specific bug in toolchain Config.in and treat it package per 
package as discussed in IRC.

Kind regards
diff mbox series

Patch

diff --git a/package/brotli/brotli.mk b/package/brotli/brotli.mk
index 2c1ad48753..4afd3628a8 100644
--- a/package/brotli/brotli.mk
+++ b/package/brotli/brotli.mk
@@ -14,4 +14,11 @@  BROTLI_CONF_OPTS = \
 	-DBROTLI_DISABLE_TESTS=ON \
 	-DBROTLI_BUNDLED_MODE=OFF
 
+# prevents from triggering GCC ICE
+# A bug was reported to the gcc bug tracker:
+# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68485
+ifeq ($(BR2_microblaze),y)
+BROTLI_CONF_OPTS += -DCMAKE_C_FLAGS="$(TARGET_CFLAGS) -O0"
+endif
+
 $(eval $(cmake-package))