[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: get a cross compiler sooner



+++ Shawn Landden [2013-11-28 13:14 -0800]:
> clang is already in the archives and already supports cross-compiling
> 
> just
> 
> clang -target arm-linux-gnueabihf foo.c -o foo
> 
> all it needs to do this is a cross binutils, which, unlike gcc cross,
> it doesn't have any cross build dependencies. Can we get get
> a cross binutils uploaded pronto?

Well, not exactly pronto, but I have made a package which built me
something last night: 

https://alioth.debian.org/scm/?group_id=100609 now has a cross-binutils-0.1
package that makes armel and armhf crossbinutils for amd64 (we can expand
those once it's working nicely)

Tests last night seem to show that this doesn't work unless
WITH_SYSROOT=/ is added to the build because gcc calls ld --sysroot

This seems odd to me, but we can go with that if it's right. Does llvm also do this or not?

Anyway it would be great if you can test these packages and see if they
do indeed 'just work' with llvm. I'm currently fiddling a bit with the
repacking to get the details of binary, Source and Built_using versions
right, so there may be breakage.

And someone with better make foo than me could make a generic rule for
the various arch targets rather than lots of copies (OK for 2, annoying for 9)

> the instructions from here work great
> https://wiki.debian.org/BuildingCrossCompilers
> 
> -Shawn
> 
> PS. The include paths when cross compiling with clang are wrong in the
> debian versions, but fixed upstream, see bug 729933

OK. and this is alleged to be fixed now.

Wookey
-- 
Principal hats:  Linaro, Emdebian, Wookware, Balloonboard, ARM
http://wookware.org/


Reply to: