Re: compiling with distcc on x86_64 from within a 32-bit chroot?
"Benjamin R. Haskell" <[email protected]> Sun, 26 Jun 2011 18:37:18 -0400 (EDT)
| Newsgroups | gmane.comp.compilers.distcc |
|---|---|
| Message-ID | <[email protected]> |
On Sun, 26 Jun 2011, Audio Phile wrote: > $ ls /usr/bin | grep gcc > gcc > winegcc > x86_64-unknown-linux-gnu-gcc > x86_64-unknown-linux-gnu-gcc-4.6.0 > > And in the chroot: > > $ ls /usr/bin | grep gcc > gcc > i686-pc-linux-gnu-gcc > i686-pc-linux-gnu-gcc-4.6.0 > > How would you suggest I proceed with the goal of keep just one distcc > server for both the native x86_64 environment and also for the 32-bit > chroot? Create a script outside of the chroot with the name i686-pc-linux-gnu-gcc-4.6.0 (along with a versionless symlink). The script should enter the chroot and pass all of its arguments to the corresponding gcc inside the chroot. Then, when compiling, specify the fully-qualified `gcc`. E.g. To compile for x86_64: make CC=x86_64-unknown-linux-gnu-gcc To compile for i686 in the chroot: make CC=i686-pc-linux-gnu-gcc I'm unfamiliar with the schroot and makepkg commands, but after a quick glance at your ArchWiki entry, maybe this would serve as the script: ==> /usr/bin/chroot-gcc <== #!/bin/sh exec linux32 chroot /opt/arch32 $0 "$@" # maybe: (not knowing anything about schroot...) # exec schroot -p -- $0 "$@" ============================================ By using $0 there, you can then symlink it to whatever executables that you'd like to chroot, e.g.: ln -s chroot-gcc /usr/bin/i686-pc-linux-gnu-gcc-4.6.0 ln -s chroot-gcc /usr/bin/i686-pc-linux-gnu-gcc Depending on how you (or Arch) set up distcc, you might have to make a second set of symlinks in some directory akin to: /usr/lib/distcc/bin/ (See the 'INSTALLING DISTCC' and 'MASQUERADING' sections of http://distcc.googlecode.com/svn/trunk/doc/web/man/distcc_1.html#TOC_10 ) e.g. ln -s ../../../bin/distcc /usr/lib/distcc/i686-pc-linux-gnu-gcc -- Best, Ben __ distcc mailing list http://distcc.samba.org/ To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/distcc