All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] libsdl2: disable check gcc -Wdeclaration-after-statement for ppc
@ 2017-04-10  3:14 kai.kang
  2017-04-10  7:28 ` Richard Purdie
  2017-04-18 15:30 ` Burton, Ross
  0 siblings, 2 replies; 6+ messages in thread
From: kai.kang @ 2017-04-10  3:14 UTC (permalink / raw)
  To: openembedded-core

From: Kai Kang <kai.kang@windriver.com>

Disable check gcc option -Wdeclaration-after-statement for powerpc and
powerpc64 which causes compile failures:

|   CC     build/SDL_blit_N.lo
| .../tmp/work/ppc7400-wrs-linux/libsdl2/2.0.5-r0/SDL2-2.0.5/src/video/SDL_blit_N.c: In function 'calc_swizzle32':
| .../tmp/work/ppc7400-wrs-linux/libsdl2/2.0.5-r0/SDL2-2.0.5/src/video/SDL_blit_N.c:127:5: error: ISO C90 forbids
| mixed declarations and code [-Werror=declaration-after-statement]
|      const vector unsigned char plus = VECUINT8_LITERAL(0x00, 0x00, 0x00, 0x00,
|      ^~~~~

Signed-off-by: Kai Kang <kai.kang@windriver.com>
---
 ...able-check-gcc-Wdeclaration-after-statement.patch | 20 ++++++++++++++++++++
 meta/recipes-graphics/libsdl2/libsdl2_2.0.5.bb       |  2 ++
 2 files changed, 22 insertions(+)
 create mode 100644 meta/recipes-graphics/libsdl2/libsdl2/disable-check-gcc-Wdeclaration-after-statement.patch

diff --git a/meta/recipes-graphics/libsdl2/libsdl2/disable-check-gcc-Wdeclaration-after-statement.patch b/meta/recipes-graphics/libsdl2/libsdl2/disable-check-gcc-Wdeclaration-after-statement.patch
new file mode 100644
index 0000000..ad48af7
--- /dev/null
+++ b/meta/recipes-graphics/libsdl2/libsdl2/disable-check-gcc-Wdeclaration-after-statement.patch
@@ -0,0 +1,20 @@
+Upstream-Status: Inappropriate [disable feature]
+
+Disable check gcc option -Wdeclaration-after-statement for powerpc and
+powerpc64 which causes compile failures.
+
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
+---
+diff --git a/configure.in b/configure.in
+index e2ddc9c..73b10f5 100644
+--- a/configure.in
++++ b/configure.in
+@@ -2950,7 +2950,7 @@ case "$host" in
+             *-*-minix*)         ARCH=minix ;;
+         esac
+         CheckVisibilityHidden
+-        CheckDeclarationAfterStatement
++#        CheckDeclarationAfterStatement
+         CheckDummyVideo
+         CheckDiskAudio
+         CheckDummyAudio
diff --git a/meta/recipes-graphics/libsdl2/libsdl2_2.0.5.bb b/meta/recipes-graphics/libsdl2/libsdl2_2.0.5.bb
index d747cf1..33963c1 100644
--- a/meta/recipes-graphics/libsdl2/libsdl2_2.0.5.bb
+++ b/meta/recipes-graphics/libsdl2/libsdl2_2.0.5.bb
@@ -20,6 +20,8 @@ SRC_URI = " \
     file://0001-prepend-our-sysroot-path-so-that-make-finds-our-wayl.patch \
     file://0002-Avoid-finding-build-host-s-wayland-scanner.patch \
 "
+SRC_URI_append_powerpc = " file://disable-check-gcc-Wdeclaration-after-statement.patch"
+SRC_URI_append_powerpc64 = " file://disable-check-gcc-Wdeclaration-after-statement.patch"
 
 S = "${WORKDIR}/SDL2-${PV}"
 
-- 
2.10.1



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] libsdl2: disable check gcc -Wdeclaration-after-statement for ppc
  2017-04-10  3:14 [PATCH] libsdl2: disable check gcc -Wdeclaration-after-statement for ppc kai.kang
@ 2017-04-10  7:28 ` Richard Purdie
  2017-04-10 19:51   ` Khem Raj
  2017-04-18 15:30 ` Burton, Ross
  1 sibling, 1 reply; 6+ messages in thread
From: Richard Purdie @ 2017-04-10  7:28 UTC (permalink / raw)
  To: kai.kang, openembedded-core

On Mon, 2017-04-10 at 11:14 +0800, kai.kang@windriver.com wrote:
> From: Kai Kang <kai.kang@windriver.com>
> 
> Disable check gcc option -Wdeclaration-after-statement for powerpc
> and
> powerpc64 which causes compile failures:
> 
> > 
> >   CC     build/SDL_blit_N.lo
> > .../tmp/work/ppc7400-wrs-linux/libsdl2/2.0.5-r0/SDL2-
> > 2.0.5/src/video/SDL_blit_N.c: In function 'calc_swizzle32':
> > .../tmp/work/ppc7400-wrs-linux/libsdl2/2.0.5-r0/SDL2-
> > 2.0.5/src/video/SDL_blit_N.c:127:5: error: ISO C90 forbids
> > mixed declarations and code [-Werror=declaration-after-statement]
> >      const vector unsigned char plus = VECUINT8_LITERAL(0x00, 0x00,
> > 0x00, 0x00,
> >      ^~~~~
> Signed-off-by: Kai Kang <kai.kang@windriver.com>
> ---
>  ...able-check-gcc-Wdeclaration-after-statement.patch | 20
> ++++++++++++++++++++
>  meta/recipes-graphics/libsdl2/libsdl2_2.0.5.bb       |  2 ++
>  2 files changed, 22 insertions(+)
>  create mode 100644 meta/recipes-graphics/libsdl2/libsdl2/disable-
> check-gcc-Wdeclaration-after-statement.patch
> 
> diff --git a/meta/recipes-graphics/libsdl2/libsdl2/disable-check-gcc-
> Wdeclaration-after-statement.patch b/meta/recipes-
> graphics/libsdl2/libsdl2/disable-check-gcc-Wdeclaration-after-
> statement.patch
> new file mode 100644
> index 0000000..ad48af7
> --- /dev/null
> +++ b/meta/recipes-graphics/libsdl2/libsdl2/disable-check-gcc-
> Wdeclaration-after-statement.patch
> @@ -0,0 +1,20 @@
> +Upstream-Status: Inappropriate [disable feature]

Given upstream explicitly enable this warning and the issue looks to be
in their code, surely upstream would want to fix this.

Also, would it not be easier to patch the code and fix this than
disabling the warning?

Cheers,

Richard


> +Disable check gcc option -Wdeclaration-after-statement for powerpc
> and
> +powerpc64 which causes compile failures.
> +
> +Signed-off-by: Kai Kang <kai.kang@windriver.com>
> +---
> +diff --git a/configure.in b/configure.in
> +index e2ddc9c..73b10f5 100644
> +--- a/configure.in
> ++++ b/configure.in
> +@@ -2950,7 +2950,7 @@ case "$host" in
> +             *-*-minix*)         ARCH=minix ;;
> +         esac
> +         CheckVisibilityHidden
> +-        CheckDeclarationAfterStatement
> ++#        CheckDeclarationAfterStatement
> +         CheckDummyVideo
> +         CheckDiskAudio
> +         CheckDummyAudio
> diff --git a/meta/recipes-graphics/libsdl2/libsdl2_2.0.5.bb
> b/meta/recipes-graphics/libsdl2/libsdl2_2.0.5.bb
> index d747cf1..33963c1 100644
> --- a/meta/recipes-graphics/libsdl2/libsdl2_2.0.5.bb
> +++ b/meta/recipes-graphics/libsdl2/libsdl2_2.0.5.bb
> @@ -20,6 +20,8 @@ SRC_URI = " \
>      file://0001-prepend-our-sysroot-path-so-that-make-finds-our-
> wayl.patch \
>      file://0002-Avoid-finding-build-host-s-wayland-scanner.patch \
>  "
> +SRC_URI_append_powerpc = " file://disable-check-gcc-Wdeclaration-
> after-statement.patch"
> +SRC_URI_append_powerpc64 = " file://disable-check-gcc-Wdeclaration-
> after-statement.patch"
>  
>  S = "${WORKDIR}/SDL2-${PV}"
>  
> -- 
> 2.10.1
> 


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] libsdl2: disable check gcc -Wdeclaration-after-statement for ppc
  2017-04-10  7:28 ` Richard Purdie
@ 2017-04-10 19:51   ` Khem Raj
  2017-04-11  2:46     ` Kang Kai
  0 siblings, 1 reply; 6+ messages in thread
From: Khem Raj @ 2017-04-10 19:51 UTC (permalink / raw)
  To: Richard Purdie, kai.kang, openembedded-core


[-- Attachment #1.1: Type: text/plain, Size: 3378 bytes --]



On 4/10/17 12:28 AM, Richard Purdie wrote:
> On Mon, 2017-04-10 at 11:14 +0800, kai.kang@windriver.com wrote:
>> From: Kai Kang <kai.kang@windriver.com>
>>
>> Disable check gcc option -Wdeclaration-after-statement for powerpc
>> and
>> powerpc64 which causes compile failures:
>>
>>>
>>>   CC     build/SDL_blit_N.lo
>>> .../tmp/work/ppc7400-wrs-linux/libsdl2/2.0.5-r0/SDL2-
>>> 2.0.5/src/video/SDL_blit_N.c: In function 'calc_swizzle32':
>>> .../tmp/work/ppc7400-wrs-linux/libsdl2/2.0.5-r0/SDL2-
>>> 2.0.5/src/video/SDL_blit_N.c:127:5: error: ISO C90 forbids
>>> mixed declarations and code [-Werror=declaration-after-statement]
>>>      const vector unsigned char plus = VECUINT8_LITERAL(0x00, 0x00,
>>> 0x00, 0x00,
>>>      ^~~~~
>> Signed-off-by: Kai Kang <kai.kang@windriver.com>
>> ---
>>  ...able-check-gcc-Wdeclaration-after-statement.patch | 20
>> ++++++++++++++++++++
>>  meta/recipes-graphics/libsdl2/libsdl2_2.0.5.bb       |  2 ++
>>  2 files changed, 22 insertions(+)
>>  create mode 100644 meta/recipes-graphics/libsdl2/libsdl2/disable-
>> check-gcc-Wdeclaration-after-statement.patch
>>
>> diff --git a/meta/recipes-graphics/libsdl2/libsdl2/disable-check-gcc-
>> Wdeclaration-after-statement.patch b/meta/recipes-
>> graphics/libsdl2/libsdl2/disable-check-gcc-Wdeclaration-after-
>> statement.patch
>> new file mode 100644
>> index 0000000..ad48af7
>> --- /dev/null
>> +++ b/meta/recipes-graphics/libsdl2/libsdl2/disable-check-gcc-
>> Wdeclaration-after-statement.patch
>> @@ -0,0 +1,20 @@
>> +Upstream-Status: Inappropriate [disable feature]
> 
> Given upstream explicitly enable this warning and the issue looks to be
> in their code, surely upstream would want to fix this.
> 
> Also, would it not be easier to patch the code and fix this than
> disabling the warning?

yes, I think it should be fixed in code unless we know that this warning
is being wrongly generated for ppc64

> 
> Cheers,
> 
> Richard
> 
> 
>> +Disable check gcc option -Wdeclaration-after-statement for powerpc
>> and
>> +powerpc64 which causes compile failures.
>> +
>> +Signed-off-by: Kai Kang <kai.kang@windriver.com>
>> +---
>> +diff --git a/configure.in b/configure.in
>> +index e2ddc9c..73b10f5 100644
>> +--- a/configure.in
>> ++++ b/configure.in
>> +@@ -2950,7 +2950,7 @@ case "$host" in
>> +             *-*-minix*)         ARCH=minix ;;
>> +         esac
>> +         CheckVisibilityHidden
>> +-        CheckDeclarationAfterStatement
>> ++#        CheckDeclarationAfterStatement
>> +         CheckDummyVideo
>> +         CheckDiskAudio
>> +         CheckDummyAudio
>> diff --git a/meta/recipes-graphics/libsdl2/libsdl2_2.0.5.bb
>> b/meta/recipes-graphics/libsdl2/libsdl2_2.0.5.bb
>> index d747cf1..33963c1 100644
>> --- a/meta/recipes-graphics/libsdl2/libsdl2_2.0.5.bb
>> +++ b/meta/recipes-graphics/libsdl2/libsdl2_2.0.5.bb
>> @@ -20,6 +20,8 @@ SRC_URI = " \
>>      file://0001-prepend-our-sysroot-path-so-that-make-finds-our-
>> wayl.patch \
>>      file://0002-Avoid-finding-build-host-s-wayland-scanner.patch \
>>  "
>> +SRC_URI_append_powerpc = " file://disable-check-gcc-Wdeclaration-
>> after-statement.patch"
>> +SRC_URI_append_powerpc64 = " file://disable-check-gcc-Wdeclaration-
>> after-statement.patch"
>>  
>>  S = "${WORKDIR}/SDL2-${PV}"
>>  
>> -- 
>> 2.10.1
>>


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 211 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] libsdl2: disable check gcc -Wdeclaration-after-statement for ppc
  2017-04-10 19:51   ` Khem Raj
@ 2017-04-11  2:46     ` Kang Kai
  0 siblings, 0 replies; 6+ messages in thread
From: Kang Kai @ 2017-04-11  2:46 UTC (permalink / raw)
  To: Khem Raj, Richard Purdie, openembedded-core

On 2017年04月11日 03:51, Khem Raj wrote:
>
> On 4/10/17 12:28 AM, Richard Purdie wrote:
>> On Mon, 2017-04-10 at 11:14 +0800, kai.kang@windriver.com wrote:
>>> From: Kai Kang <kai.kang@windriver.com>
>>>
>>> Disable check gcc option -Wdeclaration-after-statement for powerpc
>>> and
>>> powerpc64 which causes compile failures:
>>>
>>>>    CC     build/SDL_blit_N.lo
>>>> .../tmp/work/ppc7400-wrs-linux/libsdl2/2.0.5-r0/SDL2-
>>>> 2.0.5/src/video/SDL_blit_N.c: In function 'calc_swizzle32':
>>>> .../tmp/work/ppc7400-wrs-linux/libsdl2/2.0.5-r0/SDL2-
>>>> 2.0.5/src/video/SDL_blit_N.c:127:5: error: ISO C90 forbids
>>>> mixed declarations and code [-Werror=declaration-after-statement]
>>>>       const vector unsigned char plus = VECUINT8_LITERAL(0x00, 0x00,
>>>> 0x00, 0x00,
>>>>       ^~~~~
>>> Signed-off-by: Kai Kang <kai.kang@windriver.com>
>>> ---
>>>   ...able-check-gcc-Wdeclaration-after-statement.patch | 20
>>> ++++++++++++++++++++
>>>   meta/recipes-graphics/libsdl2/libsdl2_2.0.5.bb       |  2 ++
>>>   2 files changed, 22 insertions(+)
>>>   create mode 100644 meta/recipes-graphics/libsdl2/libsdl2/disable-
>>> check-gcc-Wdeclaration-after-statement.patch
>>>
>>> diff --git a/meta/recipes-graphics/libsdl2/libsdl2/disable-check-gcc-
>>> Wdeclaration-after-statement.patch b/meta/recipes-
>>> graphics/libsdl2/libsdl2/disable-check-gcc-Wdeclaration-after-
>>> statement.patch
>>> new file mode 100644
>>> index 0000000..ad48af7
>>> --- /dev/null
>>> +++ b/meta/recipes-graphics/libsdl2/libsdl2/disable-check-gcc-
>>> Wdeclaration-after-statement.patch
>>> @@ -0,0 +1,20 @@
>>> +Upstream-Status: Inappropriate [disable feature]
>> Given upstream explicitly enable this warning and the issue looks to be
>> in their code, surely upstream would want to fix this.
>>
>> Also, would it not be easier to patch the code and fix this than
>> disabling the warning?
> yes, I think it should be fixed in code unless we know that this warning
> is being wrongly generated for ppc64

I suppose this a gcc bug about powerpc/ppc64. gcc 6 uses default 
'-std=gnu11' to compile but it stills fails with 'ISO C90 forbids...'.
Compare to x86, it also compiles with -Wdeclaration-after-statement and 
-Werror=declaration-after-statement too but succeeds.


Regards,
Kai
>
>> Cheers,
>>
>> Richard
>>
>>
>>> +Disable check gcc option -Wdeclaration-after-statement for powerpc
>>> and
>>> +powerpc64 which causes compile failures.
>>> +
>>> +Signed-off-by: Kai Kang <kai.kang@windriver.com>
>>> +---
>>> +diff --git a/configure.in b/configure.in
>>> +index e2ddc9c..73b10f5 100644
>>> +--- a/configure.in
>>> ++++ b/configure.in
>>> +@@ -2950,7 +2950,7 @@ case "$host" in
>>> +             *-*-minix*)         ARCH=minix ;;
>>> +         esac
>>> +         CheckVisibilityHidden
>>> +-        CheckDeclarationAfterStatement
>>> ++#        CheckDeclarationAfterStatement
>>> +         CheckDummyVideo
>>> +         CheckDiskAudio
>>> +         CheckDummyAudio
>>> diff --git a/meta/recipes-graphics/libsdl2/libsdl2_2.0.5.bb
>>> b/meta/recipes-graphics/libsdl2/libsdl2_2.0.5.bb
>>> index d747cf1..33963c1 100644
>>> --- a/meta/recipes-graphics/libsdl2/libsdl2_2.0.5.bb
>>> +++ b/meta/recipes-graphics/libsdl2/libsdl2_2.0.5.bb
>>> @@ -20,6 +20,8 @@ SRC_URI = " \
>>>       file://0001-prepend-our-sysroot-path-so-that-make-finds-our-
>>> wayl.patch \
>>>       file://0002-Avoid-finding-build-host-s-wayland-scanner.patch \
>>>   "
>>> +SRC_URI_append_powerpc = " file://disable-check-gcc-Wdeclaration-
>>> after-statement.patch"
>>> +SRC_URI_append_powerpc64 = " file://disable-check-gcc-Wdeclaration-
>>> after-statement.patch"
>>>   
>>>   S = "${WORKDIR}/SDL2-${PV}"
>>>   
>>> -- 
>>> 2.10.1
>>>


-- 
Regards,
Neil | Kai Kang



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] libsdl2: disable check gcc -Wdeclaration-after-statement for ppc
  2017-04-10  3:14 [PATCH] libsdl2: disable check gcc -Wdeclaration-after-statement for ppc kai.kang
  2017-04-10  7:28 ` Richard Purdie
@ 2017-04-18 15:30 ` Burton, Ross
  2017-04-19  2:54   ` Kang Kai
  1 sibling, 1 reply; 6+ messages in thread
From: Burton, Ross @ 2017-04-18 15:30 UTC (permalink / raw)
  To: Kang Kai; +Cc: OE-core

[-- Attachment #1: Type: text/plain, Size: 603 bytes --]

On 10 April 2017 at 04:14, <kai.kang@windriver.com> wrote:

> |   CC     build/SDL_blit_N.lo
> | .../tmp/work/ppc7400-wrs-linux/libsdl2/2.0.5-r0/SDL2-2.0.5/src/video/SDL_blit_N.c:
> In function 'calc_swizzle32':
> | .../tmp/work/ppc7400-wrs-linux/libsdl2/2.0.5-r0/SDL2-2.
> 0.5/src/video/SDL_blit_N.c:127:5: error: ISO C90 forbids
> | mixed declarations and code [-Werror=declaration-after-statement]
> |      const vector unsigned char plus = VECUINT8_LITERAL(0x00, 0x00,
> 0x00, 0x00,
> |      ^~~~~
>

Upstream has already fixed this: http://hg.libsdl.org/SDL/rev/5184186d4366.

Ross

[-- Attachment #2: Type: text/html, Size: 1202 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] libsdl2: disable check gcc -Wdeclaration-after-statement for ppc
  2017-04-18 15:30 ` Burton, Ross
@ 2017-04-19  2:54   ` Kang Kai
  0 siblings, 0 replies; 6+ messages in thread
From: Kang Kai @ 2017-04-19  2:54 UTC (permalink / raw)
  To: Burton, Ross; +Cc: OE-core

[-- Attachment #1: Type: text/plain, Size: 856 bytes --]

On 2017年04月18日 23:30, Burton, Ross wrote:
>
> On 10 April 2017 at 04:14, <kai.kang@windriver.com 
> <mailto:kai.kang@windriver.com>> wrote:
>
>     |   CC     build/SDL_blit_N.lo
>     |
>     .../tmp/work/ppc7400-wrs-linux/libsdl2/2.0.5-r0/SDL2-2.0.5/src/video/SDL_blit_N.c:
>     In function 'calc_swizzle32':
>     |
>     .../tmp/work/ppc7400-wrs-linux/libsdl2/2.0.5-r0/SDL2-2.0.5/src/video/SDL_blit_N.c:127:5:
>     error: ISO C90 forbids
>     | mixed declarations and code [-Werror=declaration-after-statement]
>     |      const vector unsigned char plus = VECUINT8_LITERAL(0x00,
>     0x00, 0x00, 0x00,
>     |      ^~~~~
>
>
> Upstream has already fixed this: 
> http://hg.libsdl.org/SDL/rev/5184186d4366.

Thanks, Ross. I'll send a review request for it.


--Kai

>
> Ross


-- 
Regards,
Neil | Kai Kang


[-- Attachment #2: Type: text/html, Size: 2496 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-04-19  2:55 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-10  3:14 [PATCH] libsdl2: disable check gcc -Wdeclaration-after-statement for ppc kai.kang
2017-04-10  7:28 ` Richard Purdie
2017-04-10 19:51   ` Khem Raj
2017-04-11  2:46     ` Kang Kai
2017-04-18 15:30 ` Burton, Ross
2017-04-19  2:54   ` Kang Kai

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.