[yocto] When I build kernel with toolchain comes from yocto, I met an issue

Lei, Maohui leimaohui at cn.fujitsu.com
Wed Jan 28 19:46:52 PST 2015


Hi Paul


I got it. Thank you very much.


Cheers
Lei



> -----Original Message-----
> From: Paul Eggleton [mailto:paul.eggleton at linux.intel.com]
> Sent: Tuesday, January 27, 2015 8:15 PM
> To: Lei, Maohui/雷 茂慧
> Cc: yocto at yoctoproject.org
> Subject: Re: [yocto] When I build kernel with toolchain comes from yocto, I
> met an issue
> 
> On Friday 23 January 2015 02:36:30 Lei, Maohui wrote:
> > I compiled my kernel by toolchain that supported by yocto 1.7.
> > The following is my steps:
> > 1. Run the following command to install the toolchain.
> >    # ./poky-lsb-glibc-x86_64-meta-toolchain-ppce500v2-toolchain-1.7.sh
> >
> > 2. Set up the cross-development environment:
> >    # . /opt/poky-lsb/1.7/environment-setup-ppce500v2-poky-linux-gnuspe
> >
> > And then, I compiled the kernel source. But an error occurred:
> > ----------------------------------------------------------------------
> > ------
> > powerpc-poky-linux-gnuspe-ld: unrecognized option '-Wl,-O1'
> > powerpc-poky-linux-gnuspe-ld: use the --help option for usage
> > information
> > make[1]: *** [init/mounts.o] Error 1
> > make: *** [init] Error 2
> > ----------------------------------------------------------------------
> > ------
> >
> > I have to unset "LDFLAGS" to continue the build.
> >
> > Is there some wrong with my step? Is there some good method to build a
> > kernel source by the toolchain?
> 
> We generally expect the linker to be gcc rather than ld, hence our default value
> of LDFLAGS, so I think for building those bits of software that use ld directly
> (such as the kernel) it is expected that you need to either unset LDFLAGS or
> set it to a value that is appropriate for passing directly to ld (i.e. by removing
> -Wl, prefixes from all options).
> 
> Cheers,
> Paul
> 
> --
> 
> Paul Eggleton
> Intel Open Source Technology Centre



More information about the yocto mailing list