`noopt` should imply `optimize=-lto`

Bug #2075501 reported by Michał Sawicz
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
dpkg (Ubuntu)
New
Undecided
Unassigned

Bug Description

There's no sense in enabling LTO if `noopt` is part of the build flags:

```
$ DEB_BUILD_OPTIONS=noopt dpkg-buildflags
ASFLAGS=
ASFLAGS_FOR_BUILD=
CFLAGS=-g -O0 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -ffile-prefix-map=/tmp=. -flto=auto -ffat-lto-objects -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection
CFLAGS_FOR_BUILD=-g -O0
CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=0
CPPFLAGS_FOR_BUILD=
CXXFLAGS=-g -O0 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -ffile-prefix-map=/tmp=. -flto=auto -ffat-lto-objects -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection
CXXFLAGS_FOR_BUILD=-g -O0
DFLAGS=-fdebug
DFLAGS_FOR_BUILD=-fdebug
FCFLAGS=-g -O0 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -ffile-prefix-map=/tmp=. -flto=auto -ffat-lto-objects -fstack-protector-strong -fstack-clash-protection -fcf-protection
FCFLAGS_FOR_BUILD=-g -O0
FFLAGS=-g -O0 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -ffile-prefix-map=/tmp=. -flto=auto -ffat-lto-objects -fstack-protector-strong -fstack-clash-protection -fcf-protection
FFLAGS_FOR_BUILD=-g -O0
LDFLAGS=-Wl,-Bsymbolic-functions -flto=auto -ffat-lto-objects -Wl,-z,relro
LDFLAGS_FOR_BUILD=
OBJCFLAGS=-g -O0 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -ffile-prefix-map=/tmp=. -flto=auto -ffat-lto-objects -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection
OBJCFLAGS_FOR_BUILD=-g -O0
OBJCXXFLAGS=-g -O0 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -ffile-prefix-map=/tmp=. -flto=auto -ffat-lto-objects -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection
OBJCXXFLAGS_FOR_BUILD=-g -O0
```

ProblemType: Bug
DistroRelease: Ubuntu 24.04
Package: dpkg-dev 1.22.6ubuntu6
ProcVersionSignature: Ubuntu 6.8.0-38.38-generic 6.8.8
Uname: Linux 6.8.0-38-generic x86_64
NonfreeKernelModules: zfs
ApportVersion: 2.28.1-0ubuntu3
Architecture: amd64
CasperMD5CheckResult: pass
CurrentDesktop: ubuntu:GNOME
Date: Thu Aug 1 11:36:51 2024
InstallationDate: Installed on 2024-02-07 (176 days ago)
InstallationMedia: Ubuntu 22.04.3 LTS "Jammy Jellyfish" - Release amd64 (20230807.2)
PackageArchitecture: all
ProcEnviron:
 LANG=pl_PL.UTF-8
 PATH=(custom, no user)
 SHELL=/usr/bin/zsh
 TERM=screen-256color
 XDG_RUNTIME_DIR=<set>
RebootRequiredPkgs: Error: path contained symlinks.
SourcePackage: dpkg
UpgradeStatus: Upgraded to noble on 2024-02-07 (176 days ago)

Revision history for this message
Michał Sawicz (saviq) wrote :
description: updated
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.