Toolchain update for new binutils

Arch Linux ARM announcements, news, and other important things are posted here.

Toolchain update for new binutils

Postby kmihelich » Sat Dec 10, 2011 11:58 pm

Toolchains have been updated for both v5 and v7h targets for binutils 2.22. The crosstool-ng configurations have also been updated appropriately, so anyone using a distcc cross-compilation setup should grab the new config and rebuild.

Arch Linux ARM exists and continues to grow through community support, please donate today!
kmihelich
Developer
 
Posts: 1133
Joined: Tue Jul 20, 2010 6:55 am
Location: aka leming #archlinuxarm

Re: Toolchain update for new binutils

Postby pepedog » Sun Dec 11, 2011 3:09 pm

I had a good go at this, otherwise my new i7 will be idle
Had to modify config file thus (it didn't like custom)
$this->bbcode_second_pass_code('', '#
# Operating System
#
CT_KERNEL_SUPPORTS_SHARED_LIBS=y
CT_KERNEL="linux"
CT_KERNEL_VERSION="3.1"
# CT_KERNEL_bare_metal is not set
CT_KERNEL_linux=y
CT_KERNEL_bare_metal_AVAILABLE=y
CT_KERNEL_linux_AVAILABLE=y
CT_KERNEL_V_3_1=y
# CT_KERNEL_V_3_0_4 is not set
# CT_KERNEL_V_3_0_3 is not set
# CT_KERNEL_V_3_0_2 is not set
# CT_KERNEL_V_3_0_1 is not set
# CT_KERNEL_V_3_0 is not set
# CT_KERNEL_V_2_6_39_4 is not set
# CT_KERNEL_V_2_6_38_8 is not set
# CT_KERNEL_V_2_6_37_6 is not set
# CT_KERNEL_V_2_6_36_4 is not set
# CT_KERNEL_V_2_6_35_14 is not set
# CT_KERNEL_V_2_6_34_10 is not set
# CT_KERNEL_V_2_6_33_19 is not set
# CT_KERNEL_V_2_6_32_46 is not set
# CT_KERNEL_V_2_6_31_14 is not set
# CT_KERNEL_V_2_6_27_59 is not set
#CT_KERNEL_LINUX_CUSTOM=y
#CT_KERNEL_LINUX_CUSTOM_LOCATION="${HOME}/cross/src/linux-custom.tar.bz2"
CT_KERNEL_mingw32_AVAILABLE=y')
Next, distcc has altered, you define how many threads each can handle, new guide is here
https://wiki.archlinux.org/index.php/Distcc
Can't get this working (yet), logs on i7 look like this
$this->bbcode_second_pass_code('', 'Dec 11 14:44:19 localhost distccd[31777]: (dcc_job_summary) client: 192.168.2.247:53955 COMPILE_OK exit:0 sig:0 core:0 ret:0 time:199ms gcc scripts/kconfig/conf.c
Dec 11 14:44:21 localhost distccd[31778]: (dcc_job_summary) client: 192.168.2.247:53956 COMPILE_OK exit:0 sig:0 core:0 ret:0 time:89ms gcc scripts/kconfig/kxgettext.c
Dec 11 14:44:24 localhost distccd[31779]: (dcc_job_summary) client: 192.168.2.247:53957 COMPILE_OK exit:0 sig:0 core:0 ret:0 time:1194ms gcc scripts/kconfig/zconf.tab.c
Dec 11 14:51:09 localhost distccd[31994]: (dcc_job_summary) client: 192.168.2.247:53960 COMPILE_OK exit:0 sig:0 core:0 ret:0 time:8ms cc /tmp/cgqu3nfl/dummy.c
Dec 11 14:54:19 localhost distccd[31995]: (dcc_job_summary) client: 192.168.2.247:53961 COMPILE_ERROR exit:1 sig:0 core:0 ret:0 time:9ms gcc c-ctype.c
Dec 11 14:54:19 localhost distccd[31996]: (dcc_job_summary) client: 192.168.2.247:53962 COMPILE_ERROR exit:1 sig:0 core:0 ret:0 time:103ms gcc c-strcasecmp.c
Dec 11 14:54:20 localhost distccd[31997]: (dcc_job_summary) client: 192.168.2.247:53963 COMPILE_ERROR exit:1 sig:0 core:0 ret:0 time:374ms gcc c-stack.c')
pepedog
Developer
 
Posts: 2431
Joined: Mon Jun 07, 2010 3:30 pm
Location: London UK

Re: Toolchain update for new binutils

Postby pepedog » Sun Dec 11, 2011 6:11 pm

$this->bbcode_second_pass_quote('crimsonredmk', 'T')old ya kmihelich, I told ya they wouldn't like -custom. :P What I did was just download linux-3.1.tar.bz2 into ~/cross/src and rename it to be linux-custom.tar.bz2...

That didn't work for me, it still unpacks to Linux-3.1 and it wants Linux-custom directory.
What concerns me is distcc works but doesn't work. Plus there is a new directory /etc/distcc
pepedog
Developer
 
Posts: 2431
Joined: Mon Jun 07, 2010 3:30 pm
Location: London UK

Re: Toolchain update for new binutils

Postby kmihelich » Sun Dec 11, 2011 7:30 pm

The only change from distcc 3.1-6 to 3.1-6.1 was adding a patch for user adjustable IO timeout, and the upgrade didn't effect my devices.

I'll take a closer look at the ct-ng configs and see what is happening. Those configs were uploaded directly following my successful rebuilds.
Arch Linux ARM exists and continues to grow through community support, please donate today!
kmihelich
Developer
 
Posts: 1133
Joined: Tue Jul 20, 2010 6:55 am
Location: aka leming #archlinuxarm

Re: Toolchain update for new binutils

Postby kmihelich » Sun Dec 11, 2011 7:44 pm

It looks like you were using one of the newer versions of ct-ng? I just rebuilt using 1.13.0 and the config works as expected. Setting the kernel version to custom, combined with the flag below and location specifies to ct-ng to use that specific tarball as the kernel source. The xtools-dotconfig-v5/7 files specify linux-3.1.tar.bz2 which is what I have dumped into my ~/cross/src directory, and is what gets picked up for the builds.

For distcc, I've only tried running the daemon on Arch x86 once before and it was a complete failure. My computers run Kubuntu and things just work. So far, I don't think anyone has successfully set things up to do this using Arch.
Arch Linux ARM exists and continues to grow through community support, please donate today!
kmihelich
Developer
 
Posts: 1133
Joined: Tue Jul 20, 2010 6:55 am
Location: aka leming #archlinuxarm

Re: Toolchain update for new binutils

Postby pepedog » Sun Dec 11, 2011 8:02 pm

I did notice this-
on dockstar -DHOST='"armv5tel-unknown-linux-gnu"' (part of a single compile command)
build on i7 arm-unknown-linux-gnueabi (the directory), CHHOST on dockstar is this too
Maybe some symlink would help? distcc is new to me too
pepedog
Developer
 
Posts: 2431
Joined: Mon Jun 07, 2010 3:30 pm
Location: London UK

Re: Toolchain update for new binutils

Postby kmihelich » Sun Dec 11, 2011 8:09 pm

Defines shouldn't impact the cross compiler, that's for the code it's actually building not what is being executed to build it. Using distcc with makepkg will adjust the build's PATH to put /usr/lib/distcc/bin first in line, so when configure/make looks for a compiler it finds /usr/lib/distcc/bin/{gcc,c++,etc.} and uses that, which combined with setting DISTCC_HOSTS in makepkg.conf will send those builds off to the host(s) specified. Very very very few program builds will look for a tuple-{gcc,etc} (ie. armv7l-unknown-linux-gnueabi-{gcc,etc}), and to send those over distcc you'd need to add symlinks to the /usr/lib/distcc/bin directory appropriately. That's not something I have done or needed to do, however.
Arch Linux ARM exists and continues to grow through community support, please donate today!
kmihelich
Developer
 
Posts: 1133
Joined: Tue Jul 20, 2010 6:55 am
Location: aka leming #archlinuxarm

Re: Toolchain update for new binutils

Postby pepedog » Mon Dec 12, 2011 12:34 pm

OK, can now distcc to i7 (running archlinux), it's all a matter of path placement
$this->bbcode_second_pass_code('', '#!/bin/bash
[ -f /etc/conf.d/distccd ] && . /etc/conf.d/distccd

. /etc/rc.conf
. /etc/rc.d/functions
PATH=/home/cross/x-tools/arm-unknown-linux-gnueabi/bin:$PATH
.
.
.
')
pepedog
Developer
 
Posts: 2431
Joined: Mon Jun 07, 2010 3:30 pm
Location: London UK

Re: Toolchain update for new binutils

Postby pepedog » Tue Dec 13, 2011 10:48 am

Just comparing, compiling rasberry pi kernel on a dockstar takes 2.25 hours on a dockstar alone, and 30 minutes using distcc, think dockstar still has to do a fair chunk on it's own (uncompressing, LD, stripping, compressing) otherwise it would have been incredibly fast. I left out dockstar as on of the compiling hosts, and had j8 but i7 tells me it can handle 10 threads.
Comparing cross tools configs, apart from obvious floats/flags, I see this
CT_PARALLEL_JOBS=6 (on arm5)
CT_PARALLEL_JOBS=0 (on arm7hf)
pepedog
Developer
 
Posts: 2431
Joined: Mon Jun 07, 2010 3:30 pm
Location: London UK

Re: Toolchain update for new binutils

Postby kmihelich » Tue Dec 13, 2011 3:27 pm

That flag just tells the ct-ng scripts how many threads to use building the toolchain, aka what -jX. Zero is what should have been in the v5 config too, which means use a -jX equal to the number of processors.

Number of jobs a distcc server will accept is a completely different configuration. Personally I only use -j2 on v5 and -j3 on my A9 hosts. Since pre-processing and linking still takes place locally, I've noticed that things work better when it's not trying to pre-process 8 different jobs on tiny little ARM chip.
Arch Linux ARM exists and continues to grow through community support, please donate today!
kmihelich
Developer
 
Posts: 1133
Joined: Tue Jul 20, 2010 6:55 am
Location: aka leming #archlinuxarm


Return to Announcements

Who is online

Users browsing this forum: No registered users and 5 guests