[ 
https://issues.apache.org/jira/browse/MESOS-2690?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14529431#comment-14529431
 ] 

Benjamin Mahler commented on MESOS-2690:
----------------------------------------

{quote}
If you are modifying the CXXFLAGS I think it makes the most sense to add the 
`Wno-maybe-uninitialized` flag to that CXXFLAGS.
{quote}

We're not modifying CXXFLAGS ourselves, this is something that is done 
automatically as part of an RPM build when using the {{%configure}} macro. I 
agree with your sentiment, but this is a regression for those building RPMs 
that would be nice to address if it's not too difficult. Otherwise we have to 
hard code the things that {{%configure}} provides. :)

{quote}
the moment you augment CXX flags then this invalidates the `enable-optimize`
{quote}

Yes that's true, but why do we need to rely on enable-optimize for this 
particular check?

{code}
if test "x$CLANG" = "xno"; then
  ...

  # Disable 'maybe-uninitialized' warning when using 'enable-optimize'
  # flag due to MESOS-2690.
  if test "x$enable_optimize" = "xyes"; then
    CXXFLAGS="${CXXFLAGS} -Wno-maybe-uninitialized"
  fi
{code}

Is it hard to echo CXXFLAGS and pipe that into a grep for {{-O2}} here? Agree 
that the broader issue of {{--enable-optimize}} should be tackled separately, 
but hoping for a fix to the RPM build regression here. Always disabling the 
warning would be ok as a short term fix as well IMO.

> --enable-optimize build fails with maybe-uninitialized
> ------------------------------------------------------
>
>                 Key: MESOS-2690
>                 URL: https://issues.apache.org/jira/browse/MESOS-2690
>             Project: Mesos
>          Issue Type: Bug
>          Components: build
>         Environment: GCC 4.8 -> 4.9
>            Reporter: Joris Van Remoortere
>            Assignee: Joris Van Remoortere
>            Priority: Blocker
>
> When building with the `enable-optimize` flag, the build fails with 
> `maybe-uninitialized' errors.
> This is due to a bug in GCC when building optimized code triggering false 
> positives for this warning. Please see:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59970
> We can disable this warning when using GCC + --enable-optimize.
> A quick work-around until there is a patch:
> ../configure CXXFLAGS="-Wno-maybe-uninitialized" <your-other-flags-here>



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to