* [Buildroot] [PATCH 1/1] package/gcc: pass -Wno-error to debug builds
@ 2020-02-04 0:10 James Hilliard
2020-02-04 21:14 ` Romain Naour
0 siblings, 1 reply; 5+ messages in thread
From: James Hilliard @ 2020-02-04 0:10 UTC (permalink / raw)
To: buildroot
Fixes:
../../../../libsanitizer/libbacktrace/../../libbacktrace/elf.c:772:21: error: ?st.st_mode? may be used uninitialized in this function [-Werror=maybe-uninitialized]
return S_ISLNK (st.st_mode);
^
Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
---
package/gcc/gcc.mk | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/package/gcc/gcc.mk b/package/gcc/gcc.mk
index 527f30bf22..badf358707 100644
--- a/package/gcc/gcc.mk
+++ b/package/gcc/gcc.mk
@@ -103,6 +103,10 @@ HOST_GCC_COMMON_CONF_ENV = \
GCC_COMMON_TARGET_CFLAGS = $(TARGET_CFLAGS)
GCC_COMMON_TARGET_CXXFLAGS = $(TARGET_CXXFLAGS)
+ifeq ($(BR2_ENABLE_DEBUG),y)
+GCC_COMMON_TARGET_CFLAGS += -Wno-error
+endif
+
# Propagate options used for target software building to GCC target libs
HOST_GCC_COMMON_CONF_ENV += CFLAGS_FOR_TARGET="$(GCC_COMMON_TARGET_CFLAGS)"
HOST_GCC_COMMON_CONF_ENV += CXXFLAGS_FOR_TARGET="$(GCC_COMMON_TARGET_CXXFLAGS)"
--
2.20.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH 1/1] package/gcc: pass -Wno-error to debug builds
2020-02-04 0:10 [Buildroot] [PATCH 1/1] package/gcc: pass -Wno-error to debug builds James Hilliard
@ 2020-02-04 21:14 ` Romain Naour
2020-02-05 4:23 ` James Hilliard
0 siblings, 1 reply; 5+ messages in thread
From: Romain Naour @ 2020-02-04 21:14 UTC (permalink / raw)
To: buildroot
Hi James,
Le 04/02/2020 ? 01:10, James Hilliard a ?crit?:
> Fixes:
> ../../../../libsanitizer/libbacktrace/../../libbacktrace/elf.c:772:21: error: ?st.st_mode? may be used uninitialized in this function [-Werror=maybe-uninitialized]
> return S_ISLNK (st.st_mode);
> ^
>
Can you provide a defconfig that allow to reproduce the issue.
Thanks!
Best regards,
Romain
> Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
> ---
> package/gcc/gcc.mk | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/package/gcc/gcc.mk b/package/gcc/gcc.mk
> index 527f30bf22..badf358707 100644
> --- a/package/gcc/gcc.mk
> +++ b/package/gcc/gcc.mk
> @@ -103,6 +103,10 @@ HOST_GCC_COMMON_CONF_ENV = \
> GCC_COMMON_TARGET_CFLAGS = $(TARGET_CFLAGS)
> GCC_COMMON_TARGET_CXXFLAGS = $(TARGET_CXXFLAGS)
>
> +ifeq ($(BR2_ENABLE_DEBUG),y)
> +GCC_COMMON_TARGET_CFLAGS += -Wno-error
> +endif
> +
> # Propagate options used for target software building to GCC target libs
> HOST_GCC_COMMON_CONF_ENV += CFLAGS_FOR_TARGET="$(GCC_COMMON_TARGET_CFLAGS)"
> HOST_GCC_COMMON_CONF_ENV += CXXFLAGS_FOR_TARGET="$(GCC_COMMON_TARGET_CXXFLAGS)"
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH 1/1] package/gcc: pass -Wno-error to debug builds
2020-02-04 21:14 ` Romain Naour
@ 2020-02-05 4:23 ` James Hilliard
2020-03-23 21:46 ` Romain Naour
0 siblings, 1 reply; 5+ messages in thread
From: James Hilliard @ 2020-02-05 4:23 UTC (permalink / raw)
To: buildroot
On Tue, Feb 4, 2020 at 4:14 PM Romain Naour <romain.naour@smile.fr> wrote:
>
> Hi James,
>
> Le 04/02/2020 ? 01:10, James Hilliard a ?crit :
> > Fixes:
> > ../../../../libsanitizer/libbacktrace/../../libbacktrace/elf.c:772:21: error: ?st.st_mode? may be used uninitialized in this function [-Werror=maybe-uninitialized]
> > return S_ISLNK (st.st_mode);
> > ^
> >
>
> Can you provide a defconfig that allow to reproduce the issue.
BR2_ENABLE_DEBUG=y
BR2_DEBUG_3=y
BR2_OPTIMIZE_G=y
BR2_TOOLCHAIN_BUILDROOT_GLIBC=y
BR2_TOOLCHAIN_BUILDROOT_CXX=y
BR2_PACKAGE_HOST_GDB=y
BR2_GDB_VERSION_8_3=y
FYI this fix was adapted from openembedded:
https://github.com/openembedded/openembedded-core/blob/d3083e941578fb343454e106eba349adcc525ad3/meta/recipes-devtools/gcc/gcc-sanitizers.inc#L48-L49
>
> Thanks!
>
> Best regards,
> Romain
>
>
> > Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
> > ---
> > package/gcc/gcc.mk | 4 ++++
> > 1 file changed, 4 insertions(+)
> >
> > diff --git a/package/gcc/gcc.mk b/package/gcc/gcc.mk
> > index 527f30bf22..badf358707 100644
> > --- a/package/gcc/gcc.mk
> > +++ b/package/gcc/gcc.mk
> > @@ -103,6 +103,10 @@ HOST_GCC_COMMON_CONF_ENV = \
> > GCC_COMMON_TARGET_CFLAGS = $(TARGET_CFLAGS)
> > GCC_COMMON_TARGET_CXXFLAGS = $(TARGET_CXXFLAGS)
> >
> > +ifeq ($(BR2_ENABLE_DEBUG),y)
> > +GCC_COMMON_TARGET_CFLAGS += -Wno-error
> > +endif
> > +
> > # Propagate options used for target software building to GCC target libs
> > HOST_GCC_COMMON_CONF_ENV += CFLAGS_FOR_TARGET="$(GCC_COMMON_TARGET_CFLAGS)"
> > HOST_GCC_COMMON_CONF_ENV += CXXFLAGS_FOR_TARGET="$(GCC_COMMON_TARGET_CXXFLAGS)"
> >
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH 1/1] package/gcc: pass -Wno-error to debug builds
2020-02-05 4:23 ` James Hilliard
@ 2020-03-23 21:46 ` Romain Naour
0 siblings, 0 replies; 5+ messages in thread
From: Romain Naour @ 2020-03-23 21:46 UTC (permalink / raw)
To: buildroot
Hi James,
Le 05/02/2020 ? 05:23, James Hilliard a ?crit?:
> On Tue, Feb 4, 2020 at 4:14 PM Romain Naour <romain.naour@smile.fr> wrote:
>>
>> Hi James,
>>
>> Le 04/02/2020 ? 01:10, James Hilliard a ?crit :
>>> Fixes:
>>> ../../../../libsanitizer/libbacktrace/../../libbacktrace/elf.c:772:21: error: ?st.st_mode? may be used uninitialized in this function [-Werror=maybe-uninitialized]
>>> return S_ISLNK (st.st_mode);
>>> ^
>>>
>>
>> Can you provide a defconfig that allow to reproduce the issue.
> BR2_ENABLE_DEBUG=y
> BR2_DEBUG_3=y
> BR2_OPTIMIZE_G=y
> BR2_TOOLCHAIN_BUILDROOT_GLIBC=y
> BR2_TOOLCHAIN_BUILDROOT_CXX=y
> BR2_PACKAGE_HOST_GDB=y
> BR2_GDB_VERSION_8_3=y
>
> FYI this fix was adapted from openembedded:
> https://github.com/openembedded/openembedded-core/blob/d3083e941578fb343454e106eba349adcc525ad3/meta/recipes-devtools/gcc/gcc-sanitizers.inc#L48-L49
Ok, I'm able to reproduce the issue even the recent gcc 8 bump.
>>
>> Thanks!
>>
>> Best regards,
>> Romain
>>
>>
>>> Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
>>> ---
>>> package/gcc/gcc.mk | 4 ++++
>>> 1 file changed, 4 insertions(+)
>>>
>>> diff --git a/package/gcc/gcc.mk b/package/gcc/gcc.mk
>>> index 527f30bf22..badf358707 100644
>>> --- a/package/gcc/gcc.mk
>>> +++ b/package/gcc/gcc.mk
>>> @@ -103,6 +103,10 @@ HOST_GCC_COMMON_CONF_ENV = \
>>> GCC_COMMON_TARGET_CFLAGS = $(TARGET_CFLAGS)
>>> GCC_COMMON_TARGET_CXXFLAGS = $(TARGET_CXXFLAGS)
>>>
>>> +ifeq ($(BR2_ENABLE_DEBUG),y)
>>> +GCC_COMMON_TARGET_CFLAGS += -Wno-error
>>> +endif
We don't use Buildroot for gcc development, so -Wno-error can be added
unconditionally. Maybe add a comment like in the Yocto recipes about this issue.
With that fixed:
Reviewed-by: Romain Naour <romain.naour@gmail.com>
Best regards,
Romain
>>> +
>>> # Propagate options used for target software building to GCC target libs
>>> HOST_GCC_COMMON_CONF_ENV += CFLAGS_FOR_TARGET="$(GCC_COMMON_TARGET_CFLAGS)"
>>> HOST_GCC_COMMON_CONF_ENV += CXXFLAGS_FOR_TARGET="$(GCC_COMMON_TARGET_CXXFLAGS)"
>>>
>>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH 1/1] package/gcc: pass -Wno-error to debug builds
@ 2020-03-24 17:36 James Hilliard
0 siblings, 0 replies; 5+ messages in thread
From: James Hilliard @ 2020-03-24 17:36 UTC (permalink / raw)
To: buildroot
Fixes:
../../../../libsanitizer/libbacktrace/../../libbacktrace/elf.c:772:21: error: ?st.st_mode? may be used uninitialized in this function [-Werror=maybe-uninitialized]
return S_ISLNK (st.st_mode);
^
Reviewed-by: Romain Naour <romain.naour@gmail.com>
Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
---
Changes v1 -> v2:
- add comment from Yocto recipes
---
package/gcc/gcc.mk | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/package/gcc/gcc.mk b/package/gcc/gcc.mk
index 524ca83db0..fe7167b2f3 100644
--- a/package/gcc/gcc.mk
+++ b/package/gcc/gcc.mk
@@ -100,6 +100,11 @@ HOST_GCC_COMMON_CONF_ENV = \
GCC_COMMON_TARGET_CFLAGS = $(TARGET_CFLAGS)
GCC_COMMON_TARGET_CXXFLAGS = $(TARGET_CXXFLAGS)
+# used to fix ../../../../libsanitizer/libbacktrace/../../libbacktrace/elf.c:772:21: error: ?st.st_mode? may be used uninitialized in this function [-Werror=maybe-uninitialized]
+ifeq ($(BR2_ENABLE_DEBUG),y)
+GCC_COMMON_TARGET_CFLAGS += -Wno-error
+endif
+
# Propagate options used for target software building to GCC target libs
HOST_GCC_COMMON_CONF_ENV += CFLAGS_FOR_TARGET="$(GCC_COMMON_TARGET_CFLAGS)"
HOST_GCC_COMMON_CONF_ENV += CXXFLAGS_FOR_TARGET="$(GCC_COMMON_TARGET_CXXFLAGS)"
--
2.20.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-03-24 17:36 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-04 0:10 [Buildroot] [PATCH 1/1] package/gcc: pass -Wno-error to debug builds James Hilliard
2020-02-04 21:14 ` Romain Naour
2020-02-05 4:23 ` James Hilliard
2020-03-23 21:46 ` Romain Naour
2020-03-24 17:36 James Hilliard
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.