Bug 26700 - glibc 2.32 has default_cflags="-g -O" instead of "-g -O2"
Summary: glibc 2.32 has default_cflags="-g -O" instead of "-g -O2"
Status: RESOLVED FIXED
Alias: None
Product: glibc
Classification: Unclassified
Component: build (show other bugs)
Version: 2.32
: P2 normal
Target Milestone: 2.32
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-10-02 12:14 UTC by Loïc Yhuel
Modified: 2020-10-02 19:38 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:
fweimer: security-


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Loïc Yhuel 2020-10-02 12:14:52 UTC
default_cflags are set by Makeconfig when calling configure with an empty (but set) CFLAGS, which is currently the case on crosstool-ng master for example.

ifeq ($(release),stable)
default_cflags := -g -O2
else
default_cflags := -g -O
endif

But 2.32 defines RELEASE as "release" in version.h, instead of "stable" for previous versions.

So either the version.h should switch back to "stable", or the test in Makeconfig should be changed.
Comment 1 Carlos O'Donell 2020-10-02 19:37:23 UTC
(In reply to Loïc Yhuel from comment #0)
> default_cflags are set by Makeconfig when calling configure with an empty
> (but set) CFLAGS, which is currently the case on crosstool-ng master for
> example.
> 
> ifeq ($(release),stable)
> default_cflags := -g -O2
> else
> default_cflags := -g -O
> endif
> 
> But 2.32 defines RELEASE as "release" in version.h, instead of "stable" for
> previous versions.
> 
> So either the version.h should switch back to "stable", or the test in
> Makeconfig should be changed.

This was my mistake and is present only on release/2.32/master.

Fixed on the release branch.
Comment 2 Carlos O'Donell 2020-10-02 19:38:03 UTC
Fixed and if we roll a 2.32.1 this will be included.