[opensuse] How to use the cross compiles included in 42.2?
Hi, just noticed that we have a lot of cross-compilers available in the standard repo: cross-m68k-gcc6-6.2.1+r239768-5.5.4.x86_64 cross-s390x-gcc6-6.2.1+r239768-5.5.4.x86_64 cross-sparc64-gcc6-6.2.1+r239768-5.5.4.x86_64 cross-ppc64le-gcc6-6.2.1+r239768-5.5.4.x86_64 cross-avr-gcc6-6.2.1+r239768-5.5.4.x86_64 cross-sparc-gcc6-6.2.1+r239768-5.5.4.x86_64 cross-ppc64-gcc6-6.2.1+r239768-5.5.4.x86_64 cross-armv7hl-gcc6-6.2.1+r239768-5.5.4.x86_64 cross-aarch64-gcc6-6.2.1+r239768-5.5.4.x86_64 cross-armv6hl-gcc6-6.2.1+r239768-5.5.4.x86_64 cross-m68k-binutils-2.26.1-8.1.x86_64 cross-arm-gcc6-6.2.1+r239768-5.5.4.x86_64 But they are somehow incomplete: $ m68k-suse-linux-gcc-6 bla.c /usr/lib64/gcc/m68k-suse-linux/6/../../../../m68k-suse-linux/bin/ld: cannot find crt1.o: No such file or directory /usr/lib64/gcc/m68k-suse-linux/6/../../../../m68k-suse-linux/bin/ld: cannot find crti.o: No such file or directory /usr/lib64/gcc/m68k-suse-linux/6/../../../../m68k-suse-linux/bin/ld: cannot find crtbegin.o: No such file or directory /usr/lib64/gcc/m68k-suse-linux/6/../../../../m68k-suse-linux/bin/ld: cannot find -lgcc /usr/lib64/gcc/m68k-suse-linux/6/../../../../m68k-suse-linux/bin/ld: cannot find -lgcc_s /usr/lib64/gcc/m68k-suse-linux/6/../../../../m68k-suse-linux/bin/ld: cannot find -lc /usr/lib64/gcc/m68k-suse-linux/6/../../../../m68k-suse-linux/bin/ld: cannot find -lgcc /usr/lib64/gcc/m68k-suse-linux/6/../../../../m68k-suse-linux/bin/ld: cannot find -lgcc_s /usr/lib64/gcc/m68k-suse-linux/6/../../../../m68k-suse-linux/bin/ld: cannot find crtend.o: No such file or directory /usr/lib64/gcc/m68k-suse-linux/6/../../../../m68k-suse-linux/bin/ld: cannot find crtn.o: No such file or directory collect2: error: ld returned 1 exit status Do I need a chrooted m68k base system or something? How can I use these cross compilers? cu, Rudi -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
07.07.2017 18:22, Ruediger Meier пишет:
Hi,
just noticed that we have a lot of cross-compilers available in the standard repo:
cross-m68k-gcc6-6.2.1+r239768-5.5.4.x86_64 cross-s390x-gcc6-6.2.1+r239768-5.5.4.x86_64 cross-sparc64-gcc6-6.2.1+r239768-5.5.4.x86_64 cross-ppc64le-gcc6-6.2.1+r239768-5.5.4.x86_64 cross-avr-gcc6-6.2.1+r239768-5.5.4.x86_64 cross-sparc-gcc6-6.2.1+r239768-5.5.4.x86_64 cross-ppc64-gcc6-6.2.1+r239768-5.5.4.x86_64 cross-armv7hl-gcc6-6.2.1+r239768-5.5.4.x86_64 cross-aarch64-gcc6-6.2.1+r239768-5.5.4.x86_64 cross-armv6hl-gcc6-6.2.1+r239768-5.5.4.x86_64 cross-m68k-binutils-2.26.1-8.1.x86_64 cross-arm-gcc6-6.2.1+r239768-5.5.4.x86_64
But they are somehow incomplete:
Yes, they are compilers. To actually build and run program you need much more than just compiler. And those are not present.
$ m68k-suse-linux-gcc-6 bla.c /usr/lib64/gcc/m68k-suse-linux/6/../../../../m68k-suse-linux/bin/ld: cannot find crt1.o: No such file or directory /usr/lib64/gcc/m68k-suse-linux/6/../../../../m68k-suse-linux/bin/ld: cannot find crti.o: No such file or directory
Those are normally part of glibc-devel, so you would need cross-compiled glibc as well.
/usr/lib64/gcc/m68k-suse-linux/6/../../../../m68k-suse-linux/bin/ld: cannot find crtbegin.o: No such file or directory
That should be part of gcc itself. You need to check whether this file actually exists in cross-m68k-gcc package; if yes, it is probably cross-m68k-binutils bug.
/usr/lib64/gcc/m68k-suse-linux/6/../../../../m68k-suse-linux/bin/ld: cannot find -lgcc /usr/lib64/gcc/m68k-suse-linux/6/../../../../m68k-suse-linux/bin/ld: cannot find -lgcc_s
Again, this should be really part of gcc itself.
/usr/lib64/gcc/m68k-suse-linux/6/../../../../m68k-suse-linux/bin/ld: cannot find -lc
And this is glibc-devel again.
/usr/lib64/gcc/m68k-suse-linux/6/../../../../m68k-suse-linux/bin/ld: cannot find -lgcc /usr/lib64/gcc/m68k-suse-linux/6/../../../../m68k-suse-linux/bin/ld: cannot find -lgcc_s> /usr/lib64/gcc/m68k-suse-linux/6/../../../../m68k-suse-linux/bin/ld: cannot find crtend.o: No such file or directory /usr/lib64/gcc/m68k-suse-linux/6/../../../../m68k-suse-linux/bin/ld: cannot find crtn.o: No such file or directory collect2: error: ld returned 1 exit status
Do I need a chrooted m68k base system or something? How can I use these cross compilers?
You can use it *compile*. To build executable program means adding quite a lot of additional libraries that are simply not part of compiler itself. Although you still should be able to build stand-alone program that does not require them. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (2)
-
Andrei Borzenkov
-
Ruediger Meier