Hi, Am 07.07.2015 um 11:48 schrieb Guillaume Gardet: > Le 04/07/2015 18:24, Stefan Bruens a écrit : >> I tried to cross-compile some stuff for ARMv7hl on a x86_host, but >> have some >> issues. >> >> The installed compiler/binutils are: >> >> cross-armv7hl-gcc49-4.9.0+r211729-2.1.7.x86_64 >> cross-arm-binutils-2.25.0-215.1.x86_64 >> >> both from the devel:gcc OBS repository > > Seems that GCC 4.9 is no more in the repo. Could you try version 4.8 > and/or 5? > > > Guillaume > >> >> The first issue is the assembler (as) is not found by the compiler. >> According >> to "armv7hl-suse-linux-gnueabi-gcc-4.9 -v --print-search-dirs" it uses: >> >> /usr/lib64/gcc/armv7hl-suse-linux-gnueabi/4.9/ >> /usr/lib64/gcc/armv7hl-suse-linux-gnueabi/ >> /usr/lib64/gcc/armv7hl-suse-linux-gnueabi/4.9/../../../../armv7hl-suse-linux- >> >> gnueabi/bin/armv7hl-suse-linux-gnueabi/4.9/ >> /usr/lib64/gcc/armv7hl-suse-linux-gnueabi/4.9/../../../../armv7hl-suse-linux- >> >> gnueabi/bin/ >> >> and then falls back to $PATH.
That's a known issue under discussion at https://bugzilla.opensuse.org/show_bug.cgi?id=936463 I worked around it using symlinks in /usr/arm-suse-linux-gnueabi/bin and /usr/bin; another idea is to switch from cross-arm-binutils to cross-armv7hl-binutils, which would allow having separate sys-root directories at the cost of some tool duplication. >> I can work around this by setting the GCC env var COMPILER_PATH to >> /usr/arm- >> suse-linux-gnueabi/bin/ , where the binutils are located. >> >> The problem here obviously is the different architecture in the gcc and >> binutils package, as the last search dir entry points to >> /usr/armv7hl-suse- >> linux-gnueabi/bin/ instead of /usr/arm-suse-linux-gnueabi/bin >> >> >> The second issue it hit is a missing "unwind.h". The x86_64 gcc >> provides one >> for its arch in /usr/lib64/gcc/x86_64-suse-linux/4.9/include/unwind.h, >> but the >> armv7hl gcc is missing it. Don't know about unwind.h, but it's a known issue that arm cross-compilers are only provided in bare "icecream" flavors, without any target library support. For that we would need to drop %define gcc_icecream 1 in gcc5's change_spec script and deal with any fallout. Until then kernels and, e.g., U-Boot with private libgcc are the only things you can expect to successfully cross-compile. That's why our Wiki always instructs to do native compilation, either on an arm machine or in a chroot with qemu-linux-user: https://en.opensuse.org/openSUSE:OpenSUSE_on_your_ARM_board Regards, Andreas P.S. For the curious, I'm preparing a cross-armv7ml-uclibc-gcc5 toolchain, experimenting with some of the workarounds there: https://build.opensuse.org/project/show/home:a_faerber:uclinux Using a new cross-armv7ml-uclibc-binutils works just fine there. -- SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Felix Imendörffer, Jane Smithard, Dilip Upmanyu, Graham Norton; HRB 21284 (AG Nürnberg) -- To unsubscribe, e-mail: [email protected] To contact the owner, e-mail: [email protected]
