[rust-dev] [ANN] Rust ported to DragonFlyBSD

Rob Latham rlatham at gmail.com
Wed Jul 30 07:04:04 PDT 2014


On Wed, Jul 30, 2014 at 8:44 AM, Michael Neumann <mneumann at ntecs.de> wrote:
> Am 29.07.2014 um 20:37 schrieb Rob Latham:
>> what other errors were you encountering with the --target approach?
>
> When building the related C libraries you also need to specify the
> --sysroot to point to the DragonFly tree, otherwise it's building the
> libraries targeted at DragonFly but with Linux header files, which
> clearly is *wrong*.

I'd set this up in mk/platform.mk.  Check out how arm-apple-ios does it:

CFG_IOS_SDK = $(shell xcrun --show-sdk-path -sdk iphoneos 2>/dev/null)
CFG_IOS_FLAGS = -target armv7-apple-darwin -isysroot $(CFG_IOS_SDK)
-mios-version-min=7.0
CFG_CFLAGS_arm-apple-ios := -arch armv7 -mfpu=vfp3 $(CFG_IOS_FLAGS)

https://github.com/rust-lang/rust/blob/master/mk/platform.mk#L158

> Actually I wasn't able to cross-compile LLVM. Also
> when using the --target approach, I always had to wait for hours until
> it finished the Linux (host) build before it started to build the
> target. I think I was just waiting too much time for compiles to finish.
> If someone else figures out how to cross-compile to DragonFly with the
> --target approach I am happy to know :).

I agree it takes a while.  ccache is a big help but it still takes a while.

==rob


More information about the Rust-dev mailing list