diff mbox series

elfutils: disable deprecation errors in all builds, not just native

Message ID 20230106161621.1288055-1-ross.burton@arm.com
State Accepted, archived
Commit 64ddce0cdbda4efe65f59a04ecb999e9fd3f82a4
Headers show
Series elfutils: disable deprecation errors in all builds, not just native | expand

Commit Message

Ross Burton Jan. 6, 2023, 4:16 p.m. UTC
The curl-related deprecation errors affect all builds not just native,
so set CFLAGS instead of BUILD_CFLAGS.

Signed-off-by: Ross Burton <ross.burton@arm.com>
---
 meta/recipes-devtools/elfutils/elfutils_0.188.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Alexander Kanavin Jan. 6, 2023, 5:09 p.m. UTC | #1
But how did this make it through all the builds? Something doesn't compute here.

Alex

On Fri, 6 Jan 2023 at 17:16, Ross Burton <ross.burton@arm.com> wrote:
>
> The curl-related deprecation errors affect all builds not just native,
> so set CFLAGS instead of BUILD_CFLAGS.
>
> Signed-off-by: Ross Burton <ross.burton@arm.com>
> ---
>  meta/recipes-devtools/elfutils/elfutils_0.188.bb | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meta/recipes-devtools/elfutils/elfutils_0.188.bb b/meta/recipes-devtools/elfutils/elfutils_0.188.bb
> index c94e36071cd..084908a38c0 100644
> --- a/meta/recipes-devtools/elfutils/elfutils_0.188.bb
> +++ b/meta/recipes-devtools/elfutils/elfutils_0.188.bb
> @@ -34,7 +34,7 @@ EXTRA_OECONF = "--program-prefix=eu-"
>
>  BUILD_CFLAGS += "-Wno-error=stringop-overflow"
>  # compatibility with curl 7.87; can be removed when elfutils upstream fixes the deprecation fails
> -BUILD_CFLAGS += "-Wno-error=deprecated-declarations"
> +CFLAGS:append = " -Wno-error=deprecated-declarations"
>
>  DEPENDS_BZIP2 = "bzip2-replacement-native"
>  DEPENDS_BZIP2:class-target = "bzip2"
> --
> 2.34.1
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#175598): https://lists.openembedded.org/g/openembedded-core/message/175598
> Mute This Topic: https://lists.openembedded.org/mt/96096249/1686489
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [alex.kanavin@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
Alexander Kanavin Jan. 6, 2023, 6:10 p.m. UTC | #2
Curl marks deprecated API with this macro:

#define CURL_DEPRECATED(version, message) \
    __attribute__((deprecated("since " # version ". " message)))

For some reason, our target gcc 12.x does not interpret it as a
'deprecation' and stays silent - no warnings, no errors. But other
compilers do take it as an issue.

Any hints?

Alex



On Fri, 6 Jan 2023 at 18:09, Alexander Kanavin via
lists.openembedded.org <alex.kanavin=gmail.com@lists.openembedded.org>
wrote:
>
> But how did this make it through all the builds? Something doesn't compute here.
>
> Alex
>
> On Fri, 6 Jan 2023 at 17:16, Ross Burton <ross.burton@arm.com> wrote:
> >
> > The curl-related deprecation errors affect all builds not just native,
> > so set CFLAGS instead of BUILD_CFLAGS.
> >
> > Signed-off-by: Ross Burton <ross.burton@arm.com>
> > ---
> >  meta/recipes-devtools/elfutils/elfutils_0.188.bb | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/meta/recipes-devtools/elfutils/elfutils_0.188.bb b/meta/recipes-devtools/elfutils/elfutils_0.188.bb
> > index c94e36071cd..084908a38c0 100644
> > --- a/meta/recipes-devtools/elfutils/elfutils_0.188.bb
> > +++ b/meta/recipes-devtools/elfutils/elfutils_0.188.bb
> > @@ -34,7 +34,7 @@ EXTRA_OECONF = "--program-prefix=eu-"
> >
> >  BUILD_CFLAGS += "-Wno-error=stringop-overflow"
> >  # compatibility with curl 7.87; can be removed when elfutils upstream fixes the deprecation fails
> > -BUILD_CFLAGS += "-Wno-error=deprecated-declarations"
> > +CFLAGS:append = " -Wno-error=deprecated-declarations"
> >
> >  DEPENDS_BZIP2 = "bzip2-replacement-native"
> >  DEPENDS_BZIP2:class-target = "bzip2"
> > --
> > 2.34.1
> >
> >
> >
> >
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#175602): https://lists.openembedded.org/g/openembedded-core/message/175602
> Mute This Topic: https://lists.openembedded.org/mt/96096249/1686489
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [alex.kanavin@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
Jacob Kroon Jan. 11, 2023, 11:24 a.m. UTC | #3
On 1/6/23 17:16, Ross Burton wrote:
> The curl-related deprecation errors affect all builds not just native,
> so set CFLAGS instead of BUILD_CFLAGS.
> 
> Signed-off-by: Ross Burton <ross.burton@arm.com>
> ---
>   meta/recipes-devtools/elfutils/elfutils_0.188.bb | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/meta/recipes-devtools/elfutils/elfutils_0.188.bb b/meta/recipes-devtools/elfutils/elfutils_0.188.bb
> index c94e36071cd..084908a38c0 100644
> --- a/meta/recipes-devtools/elfutils/elfutils_0.188.bb
> +++ b/meta/recipes-devtools/elfutils/elfutils_0.188.bb
> @@ -34,7 +34,7 @@ EXTRA_OECONF = "--program-prefix=eu-"
>   
>   BUILD_CFLAGS += "-Wno-error=stringop-overflow"
>   # compatibility with curl 7.87; can be removed when elfutils upstream fixes the deprecation fails
> -BUILD_CFLAGS += "-Wno-error=deprecated-declarations"
> +CFLAGS:append = " -Wno-error=deprecated-declarations"
>   

Why use ":append" and not "+=" ? I thought the general idea is that "+=" 
is preferred, since it is easier to remove the snippet in a .bbappend, 
so core should avoid :append when possible ?

>   DEPENDS_BZIP2 = "bzip2-replacement-native"
>   DEPENDS_BZIP2:class-target = "bzip2"
> 
> 
> 
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#175598): https://lists.openembedded.org/g/openembedded-core/message/175598
> Mute This Topic: https://lists.openembedded.org/mt/96096249/4454410
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [jacob.kroon@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
Ross Burton Jan. 11, 2023, 11:35 a.m. UTC | #4
On 11 Jan 2023, at 11:24, Jacob Kroon via lists.openembedded.org <jacob.kroon=gmail.com@lists.openembedded.org> wrote:
> 
> On 1/6/23 17:16, Ross Burton wrote:
>> The curl-related deprecation errors affect all builds not just native,
>> so set CFLAGS instead of BUILD_CFLAGS.
>> Signed-off-by: Ross Burton <ross.burton@arm.com>
>> ---
>>  meta/recipes-devtools/elfutils/elfutils_0.188.bb | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>> diff --git a/meta/recipes-devtools/elfutils/elfutils_0.188.bb b/meta/recipes-devtools/elfutils/elfutils_0.188.bb
>> index c94e36071cd..084908a38c0 100644
>> --- a/meta/recipes-devtools/elfutils/elfutils_0.188.bb
>> +++ b/meta/recipes-devtools/elfutils/elfutils_0.188.bb
>> @@ -34,7 +34,7 @@ EXTRA_OECONF = "--program-prefix=eu-"
>>    BUILD_CFLAGS += "-Wno-error=stringop-overflow"
>>  # compatibility with curl 7.87; can be removed when elfutils upstream fixes the deprecation fails
>> -BUILD_CFLAGS += "-Wno-error=deprecated-declarations"
>> +CFLAGS:append = " -Wno-error=deprecated-declarations"
>>  
> 
> Why use ":append" and not "+=" ? I thought the general idea is that "+=" is preferred, since it is easier to remove the snippet in a .bbappend, so core should avoid :append when possible ?

Because of how the defaults and native.bbclass interact.

Ross
diff mbox series

Patch

diff --git a/meta/recipes-devtools/elfutils/elfutils_0.188.bb b/meta/recipes-devtools/elfutils/elfutils_0.188.bb
index c94e36071cd..084908a38c0 100644
--- a/meta/recipes-devtools/elfutils/elfutils_0.188.bb
+++ b/meta/recipes-devtools/elfutils/elfutils_0.188.bb
@@ -34,7 +34,7 @@  EXTRA_OECONF = "--program-prefix=eu-"
 
 BUILD_CFLAGS += "-Wno-error=stringop-overflow"
 # compatibility with curl 7.87; can be removed when elfutils upstream fixes the deprecation fails
-BUILD_CFLAGS += "-Wno-error=deprecated-declarations"
+CFLAGS:append = " -Wno-error=deprecated-declarations"
 
 DEPENDS_BZIP2 = "bzip2-replacement-native"
 DEPENDS_BZIP2:class-target = "bzip2"