[PR43847] fix wrong use of objdump during cross build
Bug #590696 reported by
Marcin Juszkiewicz
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Linaro GCC |
Fix Released
|
Low
|
Andrew Stubbs | ||
4.4 |
Invalid
|
Undecided
|
Unassigned | ||
4.5 |
Fix Released
|
Low
|
Andrew Stubbs | ||
Linaro GCC Tracking |
Fix Released
|
Undecided
|
Matthias Klose | ||
gcc |
Confirmed
|
Medium
|
|||
gcc-4.5 (Ubuntu) |
Fix Released
|
Medium
|
Unassigned |
Bug Description
Binary package hint: gcc-4.5
During cross building of gcc-4.5 there are some checks done to know does host gcc supports plugins.
Problem is that tests are compiled with host CC but checked with target objdump. In result they fail so build ends before it even started.
Attached patch fixes it.
upstream bug: http://
Related: lp:gcc-linaro/4.5,revno=99382
Related branches
Changed in gcc: | |
status: | Unknown → Confirmed |
Changed in linaro: | |
status: | New → Confirmed |
tags: | added: armel toolchain |
affects: | linaro → gcc-linaro |
summary: |
- fix wrong use of objdump during cross build + [PR43847] fix wrong use of objdump during cross build |
description: | updated |
Changed in gcc: | |
importance: | Unknown → Medium |
To post a comment you must log in.
The code in 'gcc-4. 5.0/gcc/ configure' :
------- ------- ------ clip ------- ------- ------- ------- -------
pluginlibs=
if test x"$enable_plugin" = x"yes"; then
{ $as_echo "$as_me: ${as_lineno- $LINENO} : checking for exported symbols" >&5 ${as_lineno- $LINENO} : checking for -rdynamic" >&5 s="-rdynamic" plugin= no ------- ------ clip ------- ------- ------- ------- -------
$as_echo_n "checking for exported symbols... " >&6; }
echo "int main() {return 0;} int foobar() {return 0;}" > conftest.c
${CC} ${CFLAGS} ${LDFLAGS} conftest.c -o conftest > /dev/null 2>&1
if $gcc_cv_objdump -T conftest | grep foobar > /dev/null; then
: # No need to use a flag
else
{ $as_echo "$as_me:
$as_echo_n "checking for -rdynamic... " >&6; }
${CC} ${CFLAGS} ${LDFLAGS} -rdynamic conftest.c -o conftest > /dev/null 2>&1
if $gcc_cv_objdump -T conftest | grep foobar > /dev/null; then
pluginlib
else
enable_
fi
fi
-------
will cause an error when the $target-objdump doesn't understand the $host
binaries like :
------- ------- ------ clip ------- ------- ------- ------- ------- unknown- linux-gnu to arm-unknown-elf. cross-gcc- arm-elf- 4.5.0/arm- elf/bin/ objdump: cross-gcc- arm-elf- 4.5.0/arm- elf/bin/ objdump: ------- ------ clip ------- ------- ------- ------- -------
Links are now set up to build a cross-compiler
from x86_64-
checking for exported symbols...
/usr/local/
conftest: File format not recognized
checking for -rdynamic...
/usr/local/
conftest: File format not recognized
-------
The host GCC (CC) compiles and links a program and then the executable
will be looked with 'objdump' ($gcc_cv_objdump). But the latter is now
pointing to the target one!