Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 320851

Summary: qt4-build{,-edge}.eclass: LINK variable has to be explicitly defined with $(tc-getXX)
Product: Gentoo Linux Reporter: Andrey <ahipp0>
Component: EclassesAssignee: Qt Bug Alias <qt>
Status: RESOLVED FIXED    
Severity: normal    
Priority: Highest    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: proposed fix

Description Andrey 2010-05-21 11:44:26 UTC
qt4-build.eclass as of CVS revision 1.66 contains the following code in qt4-build_src_prepare():
sed -e "s:\(\$MAKE\):\1 CC=$(tc-getCC) CXX=$(tc-getCXX) LD=$(tc-getCXX):" \
        -i config.tests/unix/compile.test || die "sed test compilers failed"

passing LD=$(tc-getCXX) doesn't make much sense because qmake-generated makefiles uses LINK variable for that purpose.

This can cause errors during cross-compilation or while working in prefix.

Reproducible: Always

Steps to Reproduce:
1. Setup cross-compilation or prefix environment
2. Try to emerge, say, qt-core
Actual Results:  
In different setups linker produces warnings like
/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/../../../../i686-pc-linux-gnu/bin/ld: this linker was not configured to use sysroots
or
could not read symbols: File in wrong format

Expected Results:  
Picked up correct linker and compilation is successful.
Comment 1 Andrey 2010-05-21 11:47:31 UTC
Created attachment 232335 [details, diff]
proposed fix
Comment 2 Markos Chandras (RETIRED) gentoo-dev 2010-05-21 17:43:24 UTC
The patch seems correct to me? I think we should push it directly to both of our eclasses ( qt4-build{,-edge} )
Comment 3 Alex Alexander (RETIRED) gentoo-dev 2010-05-22 15:31:17 UTC
fixed, thanks for reporting and for patch! ;)
Comment 4 Andrey 2010-05-22 20:11:38 UTC
(In reply to comment #3)
> fixed, thanks for reporting and for patch! ;)

Thanks for a quick action! :)