Bug 3878 - arm-oe-linux-gnueabi-ld: unrecognized option '-Wl,-O1'
Summary: arm-oe-linux-gnueabi-ld: unrecognized option '-Wl,-O1'
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: devtools / tool chain (show other bugs)
Version: 1.4
Hardware: x86 Multiple
: Medium major
Target Milestone: 1.4
Assignee: Bogdan Marinescu
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2013-02-12 10:55 UTC by Simon Vanveerdeghem
Modified: 2013-03-07 15:56 UTC (History)
3 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Vanveerdeghem 2013-02-12 10:55:20 UTC
I have build meta-toolchain-qte, this create a toolchain. 
I have installed the toolchain, and run the environment-setup-...

I have made a qt application that i will build with the toolchain
I run qmake (this create the Makefile), then i run make. The toolchain build all the C files but when the toolchain links the object files together it fails with following error.

arm-oe-linux-gnueabi-ld: unrecognized option '-Wl,-O1'
arm-oe-linux-gnueabi-ld: use the --help option for usage information


When i use poky to build the application, i have no errors (bitbake <appname>).
Comment 1 Richard Purdie 2013-02-14 15:43:07 UTC
I don't think this is a bug in OE itself, only how you're using the toolchain. The issue is you're passing cc flags to ld. If you're going to do this, use gcc as the linker, then this will work (LD verses CCLD).
Comment 2 Simon Vanveerdeghem 2013-02-14 16:11:31 UTC
Hi,


Okey, thanks, this helps when is use the g++ as the linker.

When i look further to the recipes of qt i see the have recently changed the exports that are used in the toolchain. But they have also changed the linker form g++ to ld 

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/meta/recipes-qt/meta?id=a68c456e851023606c882f287a398bbaba16f298

I don't know why the have changed that, i think the comment the have posted is about the " OE_QMAKE_CXX=${TARGET_PREFIX}g++' to OE_QMAKE_CXX=$CXX' " but they have also changed OE_QMAKE_LINK=${TARGET_PREFIX}g++' to OE_QMAKE_LINK=$LD'
Comment 3 Richard Purdie 2013-03-07 15:56:04 UTC
I think this is fixed by http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=3b9636a0a986f87d996a10fcc4b01add5c4d1e64. If this doesn't help, please reopen the bug.