Re: cross platform

From: Ruslan Ermilov <ru_at_FreeBSD.org>
Date: Sun, 13 Feb 2005 00:00:20 +0200
Hi Mathew,

On Sat, Feb 12, 2005 at 09:55:02AM -0500, Mathew Kanner wrote:
> Hi All,
> 	I want to get midi working for amd64 and by fixing up the
> (kernel) printf directives, I have two stupid question:
>  - How do I compile a module for a different platform?
> 
Well, you can:

	cd /usr/src
	make buildworld TARGET_ARCH=amd64
	make buildkernel TARGET_ARCH=amd64

assuming a module is connected to the build in sys/modules/Makefile.
You can save huge time by only building a toolchain:

	cd /usr/src
	make kernel-toolchain TARGET_ARCH=amd64
	make buildkernel TARGET_ARCH=amd64

Or, if you want to compile a single module only (and that's the
fastest way to cross-build), assuming it's in sys/modules/midi:

	cd /usr/src
	make kernel-toolchain TARGET_ARCH=amd64
	make _obj SUBDIR_OVERRIDE=sys/modules/midi TARGET_ARCH=amd64
	make _depend SUBDIR_OVERRIDE=sys/modules/midi TARGET_ARCH=amd64
	make everything SUBDIR_OVERRIDE=sys/modules/midi TARGET_ARCH=amd64

>  - How do I know which is the right directive? Is this documented
>    somewhere? 
> 
Please see the build(7) manpage, it talks a bit about cross-builds.


Cheers,
-- 
Ruslan Ermilov
ru_at_FreeBSD.org
FreeBSD committer

Received on Sat Feb 12 2005 - 21:00:28 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:28 UTC