On Fri, Oct 7, 2016 at 8:46 AM, Martin Townsend <mtownsend1...@gmail.com> wrote: > On Fri, Oct 7, 2016 at 5:32 AM, Khem Raj <raj.k...@gmail.com> wrote: >> >>> On Oct 6, 2016, at 12:09 PM, Martin Townsend <mtownsend1...@gmail.com> >>> wrote: >>> >>> On Thu, Oct 6, 2016 at 7:57 PM, Martin Townsend <mtownsend1...@gmail.com> >>> wrote: >>>> Hi, >>>> >>>> We have a poky sato distributions successfully built and running for >>>> our SuperH 4 processor board. The problem is the SDK that is built >>>> when using -cpopulate_sdk doesn't. >>>> >>>> The simple Makefile: >>>> hellomake: HelloWorld.c >>>> $(CC) -o HelloWorld HelloWorld.c >>> >>> Hit send before I had chance to finish :) >>> >>> ignore the missing tab but when trying to compile (after sourcing the >>> SDK environment) I get >>> sh4-poky-linux-gcc -ml -m4 >>> --sysroot=/opt/sdk/vms/2.0.2/sysroots/sh4-poky-linux -o HelloWorld >>> HelloWorld.o >>> /opt/sdk/vms/2.0.2/sysroots/x86_64-pokysdk-linux/usr/libexec/sh4-poky-linux/gcc/sh4-poky-linux/4.9.3/real-ld: >>> cannot find crt1.o: No such file or directory >>> /opt/sdk/vms/2.0.2/sysroots/x86_64-pokysdk-linux/usr/libexec/sh4-poky-linux/gcc/sh4-poky-linux/4.9.3/real-ld: >>> cannot find crti.o: No such file or directory >>> /opt/sdk/vms/2.0.2/sysroots/x86_64-pokysdk-linux/usr/libexec/sh4-poky-linux/gcc/sh4-poky-linux/4.9.3/real-ld: >>> cannot find crtbegin.o: No such file or directory >>> /opt/sdk/vms/2.0.2/sysroots/x86_64-pokysdk-linux/usr/libexec/sh4-poky-linux/gcc/sh4-poky-linux/4.9.3/real-ld: >>> cannot find -lgcc >>> /opt/sdk/vms/2.0.2/sysroots/x86_64-pokysdk-linux/usr/libexec/sh4-poky-linux/gcc/sh4-poky-linux/4.9.3/real-ld: >>> cannot find -lgcc_s >>> /opt/sdk/vms/2.0.2/sysroots/x86_64-pokysdk-linux/usr/libexec/sh4-poky-linux/gcc/sh4-poky-linux/4.9.3/real-ld: >>> cannot find -lc >>> /opt/sdk/vms/2.0.2/sysroots/x86_64-pokysdk-linux/usr/libexec/sh4-poky-linux/gcc/sh4-poky-linux/4.9.3/real-ld: >>> cannot find -lgcc >>> /opt/sdk/vms/2.0.2/sysroots/x86_64-pokysdk-linux/usr/libexec/sh4-poky-linux/gcc/sh4-poky-linux/4.9.3/real-ld: >>> cannot find -lgcc_s >>> /opt/sdk/vms/2.0.2/sysroots/x86_64-pokysdk-linux/usr/libexec/sh4-poky-linux/gcc/sh4-poky-linux/4.9.3/real-ld: >>> cannot find crtend.o: No such file or directory >>> /opt/sdk/vms/2.0.2/sysroots/x86_64-pokysdk-linux/usr/libexec/sh4-poky-linux/gcc/sh4-poky-linux/4.9.3/real-ld: >>> cannot find crtn.o: No such file or directory >>> >>> So I tried the compiler and sysroot from the build >>> CC=/ws/vms/vms-rsc-yocto-build/build_vms/tmp/sysroots/x86_64-linux/usr/bin/sh4-poky-linux/sh4-poky-linux-gcc >>> SYSROOT=/ws/vms/vms-rsc-yocto-build/build_vms/tmp/sysroots/sh7760 >>> >>> hellomake: HelloWorld.c >>> $(CC) --sysroot=$(SYSROOT) -o HelloWorld HelloWorld.c >>> >>> and it compiles fine. >>> >>> So I ran $CC -print-search-dirs >>> install: >>> /opt/sdk/vms/2.0.2/sysroots/x86_64-pokysdk-linux/usr/lib/sh4-poky-linux/gcc/sh4-poky-linux/4.9.3/ >>> programs: >>> =/opt/sdk/vms/2.0.2/sysroots/x86_64-pokysdk-linux/usr/libexec/sh4-poky-linux/gcc/sh4-poky-linux/4.9.3/:/opt/sdk/vms/2.0.2/sysroots/x86_64-pokysdk-linux/usr/libexec/sh4-poky-linux/gcc/sh4-poky-linux/4.9.3/:/opt/sdk/vms/2.0.2/sysroots/x86_64-pokysdk-linux/usr/libexec/sh4-poky-linux/gcc/sh4-poky-linux/:/opt/sdk/vms/2.0.2/sysroots/x86_64-pokysdk-linux/usr/lib/sh4-poky-linux/gcc/sh4-poky-linux/4.9.3/:/opt/sdk/vms/2.0.2/sysroots/x86_64-pokysdk-linux/usr/lib/sh4-poky-linux/gcc/sh4-poky-linux/:/opt/sdk/vms/2.0.2/sysroots/x86_64-pokysdk-linux/usr/lib/sh4-poky-linux/gcc/sh4-poky-linux/4.9.3/../../../../../sh4-poky-linux/bin/sh4-poky-linux/4.9.3/:/opt/sdk/vms/2.0.2/sysroots/x86_64-pokysdk-linux/usr/lib/sh4-poky-linux/gcc/sh4-poky-linux/4.9.3/../../../../../sh4-poky-linux/bin/ >>> libraries: >>> =/opt/sdk/vms/2.0.2/sysroots/x86_64-pokysdk-linux/usr/lib/sh4-poky-linux/gcc/sh4-poky-linux/4.9.3/:/opt/sdk/vms/2.0.2/sysroots/x86_64-pokysdk-linux/usr/lib/sh4-poky-linux/gcc/sh4-poky-linux/4.9.3/../../../../../sh4-poky-linux/lib/sh4-poky-linux/4.9.3/:/opt/sdk/vms/2.0.2/sysroots/x86_64-pokysdk-linux/usr/lib/sh4-poky-linux/gcc/sh4-poky-linux/4.9.3/../../../../../sh4-poky-linux/lib/:/opt/sdk/vms/2.0.2/sysroots/sh4-poky-linux/m4/lib/sh4-poky-linux/4.9.3/:/opt/sdk/vms/2.0.2/sysroots/sh4-poky-linux/m4/lib/:/opt/sdk/vms/2.0.2/sysroots/sh4-poky-linux/m4/usr/lib/sh4-poky-linux/4.9.3/:/opt/sdk/vms/2.0.2/sysroots/sh4-poky-linux/m4/usr/lib/ >>> >>> Then I checked that these files exist: >>> martin@martin-ubuntu-pconcepts:/opt/sdk/vms/2.0.2/sysroots/sh4-poky-linux$ >>> find $SDKTARGETSYSROOT -name "crt*" >>> /opt/sdk/vms/2.0.2/sysroots/sh4-poky-linux/usr/lib/crtn.o >>> /opt/sdk/vms/2.0.2/sysroots/sh4-poky-linux/usr/lib/crti.o >>> /opt/sdk/vms/2.0.2/sysroots/sh4-poky-linux/usr/lib/crt1.o >>> /opt/sdk/vms/2.0.2/sysroots/sh4-poky-linux/usr/lib/sh4-poky-linux/4.9.3/crtendS.o >>> /opt/sdk/vms/2.0.2/sysroots/sh4-poky-linux/usr/lib/sh4-poky-linux/4.9.3/crtend.o >>> /opt/sdk/vms/2.0.2/sysroots/sh4-poky-linux/usr/lib/sh4-poky-linux/4.9.3/crtbeginT.o >>> /opt/sdk/vms/2.0.2/sysroots/sh4-poky-linux/usr/lib/sh4-poky-linux/4.9.3/crtbeginS.o >>> /opt/sdk/vms/2.0.2/sysroots/sh4-poky-linux/usr/lib/sh4-poky-linux/4.9.3/crtbegin.o >>> >>> Putting the library search directories on a separate line >>> martin@martin-ubuntu-pconcepts:/opt/sdk/vms/2.0.2/sysroots/sh4-poky-linux$ >>> $CC -print-search-dirs | grep "^libraries:" | tr ':' '\n' >>> libraries >>> =/opt/sdk/vms/2.0.2/sysroots/x86_64-pokysdk-linux/usr/lib/sh4-poky-linux/gcc/sh4-poky-linux/4.9.3/ >>> /opt/sdk/vms/2.0.2/sysroots/x86_64-pokysdk-linux/usr/lib/sh4-poky-linux/gcc/sh4-poky-linux/4.9.3/../../../../../sh4-poky-linux/lib/sh4-poky-linux/4.9.3/ >>> /opt/sdk/vms/2.0.2/sysroots/x86_64-pokysdk-linux/usr/lib/sh4-poky-linux/gcc/sh4-poky-linux/4.9.3/../../../../../sh4-poky-linux/lib/ >>> /opt/sdk/vms/2.0.2/sysroots/sh4-poky-linux/m4/lib/sh4-poky-linux/4.9.3/ >>> /opt/sdk/vms/2.0.2/sysroots/sh4-poky-linux/m4/lib/ >>> /opt/sdk/vms/2.0.2/sysroots/sh4-poky-linux/m4/usr/lib/sh4-poky-linux/4.9.3/ >>> /opt/sdk/vms/2.0.2/sysroots/sh4-poky-linux/m4/usr/lib/ >>> >>> So it looks like there is a spurious m4 is the library path. Anyone >>> know why this has happened and how I can fix it before I wade into the >>> populate_sdk task. >>> >> >> Can you pass --disable-multilib to gcc cross canadian configure options ? >> >>> We are using the Jethro branch and we have fixed the GCC version to >>> 4.9.3 because this version works for SH4. >>> >>> Many Thanks, >>> Martin. >>> -- >>> _______________________________________________ >>> yocto mailing list >>> yocto@yoctoproject.org >>> https://lists.yoctoproject.org/listinfo/yocto >> > > Thanks for the swift reply Khem. I commented out the line from > gcc-cross-candian.inc > #GCCMULTILIB = "--enable-multilib" > > and tried > --disable-multilib > in the EXTRA_OECONF > > but I still get the same error when linking. Let me know if there is > anything else I could try as I'm stumped. Is there a workaround just > so I can get the developers up and running? > > Cheers, Martin.
OK I have a workaround I create a symlink in the target sysroot /opt/vms/sdk/2.0.2/sysroots/sh4-poky-linux/m4 -> . And everything now compiles fine. Any ideas on how to fix this in the GCC cross canadian recipe? Cheers, Martin. -- _______________________________________________ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto