undefined reference to `pow' when building with -flto
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
binutils |
Fix Released
|
Medium
|
|||
gcc |
Invalid
|
Medium
|
|||
binutils (Ubuntu) |
Fix Released
|
Medium
|
Unassigned | ||
Oneiric |
Fix Released
|
Medium
|
Unassigned | ||
gcc-4.6 (Ubuntu) |
Invalid
|
Medium
|
Unassigned | ||
Oneiric |
Invalid
|
Medium
|
Unassigned |
Bug Description
Binary package hint: gcc-4.6
cairo fails to build in oneiric, because linking with -flto results in an undefined reference:
/bin/bash ../../libtool --tag=CC --mode=link gcc -D_REENTRANT -I/usr/
libtool: link: gcc -shared -fPIC -DPIC .libs/libcairo_
/tmp/ccbzCZUW.
ccbzCZUW.
collect2: ld returned 1 exit status
/tmp/ccJCGA7g.
ccJCGA7g.
collect2: ld returned 1 exit status
https:/
Given that -lm is being explicitly passed, and pow is a symbol provided by libm, that looks like a bug in gcc to me?
Running the same command without -flto works just fine.
Related branches
Changed in gcc-4.6 (Ubuntu): | |
importance: | Undecided → Medium |
status: | New → Confirmed |
Changed in gcc: | |
importance: | Unknown → Medium |
status: | Unknown → New |
Changed in binutils: | |
importance: | Unknown → Medium |
status: | Unknown → Fix Released |
Changed in binutils (Ubuntu): | |
importance: | Undecided → Medium |
status: | New → Confirmed |
Changed in gcc-4.6 (Ubuntu Oneiric): | |
status: | Confirmed → Invalid |
Changed in binutils (Ubuntu Oneiric): | |
status: | Confirmed → In Progress |
Changed in gcc: | |
status: | New → Invalid |
only seen with the combination of -Wl,--as-needed and -flto