libglib2.0-0 fails to build using dpkg-buildpackage when added "-flto" to CFLAGS and LDFLAGS
Bug #856839 reported by
matt_hargett
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
binutils (Ubuntu) |
Fix Released
|
Low
|
Unassigned | ||
gcc-4.6 (Ubuntu) |
Invalid
|
Low
|
Unassigned | ||
glib2.0 (Ubuntu) |
Invalid
|
Low
|
Unassigned |
Bug Description
when using apt-get source libglib2.0-0, and adding -flto to the CFLAGS and LDFLAGS, the build fails with this:
./.libs/
./.libs/
which are errors generated by FORTIFY_SOURCE. it's currently unknown if these are true positives from FORTIFY_SOURCE that are somehow missed without LTO, or are false positives due to codegen issues when enabling LTO.
To post a comment you must log in.
the build fails with glib 2.29.92-0ubuntu1 gcc-4.6 4.6.1-9ubuntu3 and binutils 2.21.53. 20110810- 0ubuntu3 with flto applied to compilation and linking stage:
dpkg-buildpackage config
APPEND CFLAGS -flto
APPEND LDFLAGS -flto
See the attached buildlog
It succeeds without -flto.
When building with -U_FORTIFY_SOURCE the linking failure is solved but one gets this error: glib2.0- 2.29.92/ ./glib/ tests -I../.. -g -I../.. -I../../glib -I/tmp/ glib2.0- 2.29.92/ ./glib -I/tmp/ glib2.0- 2.29.92/ . -DSRCDIR= \""/tmp/ glib2.0- 2.29.92/ ./glib/ tests"\ " -DG_ENABLE_DEBUG -DG_DISABLE_ SINGLE_ INCLUDES -pthread -g -O2 -flto -U_FORTIFY_SOURCE -Wall -c /tmp/glib2. 0-2.29. 92/./glib/ tests/mem- overflow. c 0-2.29. 92/./glib/ tests/mem- overflow. c:137:1: sorry, unimplemented: gimple bytecode streams do not support the optimization attribute
gcc -DHAVE_CONFIG_H -I. -I/tmp/
/tmp/glib2.