public inbox for gentoo-soc@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-soc] cross_container_support - progress report #11
@ 2012-08-20 14:10 Jing Huang
  0 siblings, 0 replies; only message in thread
From: Jing Huang @ 2012-08-20 14:10 UTC (permalink / raw
  To: lu_zero, gentoo-soc

Hi,

   In the last week, I sucessfuly run native compiler in arm chroot.
The code is also
updated:(http://github.com/jinghuang/cross_container_support).

   At previous experiment, the result is not trusable. That is because
the version of cross gcc and emulated gcc are same(4.5.3). So, the
cross gcc will reuse some paths and binutils. When cross gcc updated
to 4.6.3, the cross gcc cannot find these paths and bins.

   This time, I mount /lib and /usr to arm chroot and create a switch
script(chroot/root/switch.sh) in chroot. The switch.sh will create the
same gnu toolchain paths as the host, including gcc's LDPATH, GCC_PATH
and binutils' LIBPATH, etc. Therefore, I could make the same gcc
running envairment as the host.

   But it is very hard to replace the gcc's
LDPATH(/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.6.3). Once
changing, most of programs cannot run. I address this problem using
the follow way:

   if(LDPATH exist) //means the cross gcc and emulated gcc have the same version
        reuse emulated LDPATH
   else
        mount and use host's LDPATH

   I was testing my script with iputils-s20101006. The emulated gcc
will cause 19.813s. Our cross gcc will cause 1.379s.

   But the script doesn't support X86_64 and hardcods some path and
gcc version. I will find some trick ways to hide them.


Jing.


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-08-20 15:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-20 14:10 [gentoo-soc] cross_container_support - progress report #11 Jing Huang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox