tinylogin compile always by default gcc compiler and not by cross compiler until I specity CROSS variable for make command in ebuild. Reproducible: Always Steps to Reproduce: 1. Setup cross compiler as described in http://dev.gentoo.org/~vapier/CROSS-COMPILE-HOWTO for example i486-pc-linux-uclibc 2. try to emerge tinylogin to separate ROOT: CHOST="i486-pc-linux-uclibc" ROOT="/mnt/tiny/root/" emerge uclibc busybox tinylogin 3. ldd /mnt/tiny/root/bin/tinylogin Actual Results: /mnt/tiny/root/bin/tinylogin linked with build_host glibc, not target_host uclibc because it compiled by gcc not by i486-pc-linux-uclibc-gcc it simple to fix copy busybox_set_cross_compiler() function from busybox ebuild, execute it in src_compile() remove emake ${myconf} || die add emake CROSS="${CROSS}" ${myconf} || die see attached patch
Created attachment 50320 [details, diff] patch to fix sys-apps/tinylogin/tinylogin-1.4.ebuild patch add CROSS variable to make command, for selecting correct compiler when cross compile
You do not need to define a function if your calling something only one time. A simple type -p ${CHOST}-ar && export CROSS=${CHOST}- in the src_compile() of the ebuild should do the trick and be less invasive. Note: Also if your using busybox then chances are you already have the tinylogin applet builtin already and don't really need tinylogin.
done like solar suggested
This still seems to be an issue. At least for my arm-unknown-linux-gnu compiler under i686-pc-linux-gnu system. Can someone please reopen this? Ask for more info if you need it.
Now, after applying this part of the patch (to 1.4 version ebuild), it works: - emake ${myconf} || die + emake CROSS="${CROSS}" ${myconf} || die It seems you've corrected it only half-way...
just forced CROSS now all the time