[yocto] [poky] Is this a bug of binutils

Laurentiu Palcu laurentiu.palcu at intel.com
Fri Sep 20 04:00:22 PDT 2013


Hi,

On Fri, Sep 20, 2013 at 06:25:19PM +0800, Li Zhijian wrote:
> >>>>>
> >>>>>III) compile a simple C program
> >>>>># cat test.c
> >>>>>int main ()
> >>>>>{
> >>>>>printf("hello world\n");
> >>>>>return 0;
> >>>>>}
> >>>>># source toolchain-1.3-tcmode-default/environment-setup-x86_64-poky-linux
> >>>>># $CC -o test test.c -L tmp/sysroots/qemux86-64/usr/lib/ -lm
OK, it looks like something strange happens in your setup.

To debug it, let's add '-Wl,--verbose' at the end of your command and you
should be able to see where the linker is looking for libraries. Also,
the linker script will be printed.

You should see it try your directory first
tmp/sysroots/qemux86-64/usr/lib/, and then fall through the default ones
with the sysroot prefix added and, at the end, the system ones:
/lib:/usr/lib.

Thanks,
Laurentiu



More information about the yocto mailing list