Default autotools CFLAGS are overriden in some cases
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Snapcraft |
Expired
|
Undecided
|
Unassigned |
Bug Description
snapcraft overrides CFLAGS in case the staged packages pull files under folders "include", "usr/include", etc. In that case CFLAGS is of the form:
CFLAGS= -I<part_
But, that overrides autotools defaults, which are
CFLAGS=-g -O2
Therefore, inadvertently we disable all optimizations. Even more, things can go weird and in some cases one part is built with "-g -O2", while the others are not. For instance, with the modem-manager snap:
https:/
where libmbim is compiled with "-g -O2" while the other parts are not, as there are headers in "stage" folder.
Changed in snapcraft: | |
status: | New → Incomplete |
status: | Incomplete → Confirmed |
Changed in snapcraft: | |
status: | Confirmed → Fix Released |
We should either keep default CFLAGS when adding our own or provide our own set of defaults applied to all projects