Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 80698 - tinylogin cross compile failed
Summary: tinylogin cross compile failed
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Embedded Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-02-04 03:58 UTC by Vitaly
Modified: 2005-12-11 17:49 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
patch to fix sys-apps/tinylogin/tinylogin-1.4.ebuild (tinylogin-1.4.ebuild.diff,464 bytes, patch)
2005-02-04 03:59 UTC, Vitaly
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Vitaly 2005-02-04 03:58:11 UTC
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
Comment 1 Vitaly 2005-02-04 03:59:57 UTC
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
Comment 2 solar (RETIRED) gentoo-dev 2005-02-06 16:40:07 UTC
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.
Comment 3 SpanKY gentoo-dev 2005-02-06 16:56:20 UTC
done like solar suggested
Comment 4 Radek Podgorny 2005-12-11 15:58:26 UTC
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.
Comment 5 Radek Podgorny 2005-12-11 16:02:32 UTC
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...
Comment 6 SpanKY gentoo-dev 2005-12-11 17:49:56 UTC
just forced CROSS now all the time