Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 13 Feb 2005 00:00:20 +0200
From:      Ruslan Ermilov <ru@FreeBSD.org>
To:        Mathew Kanner <mat@cnd.mcgill.ca>
Cc:        freebsd-current@FreeBSD.org
Subject:   Re: cross platform
Message-ID:  <20050212220020.GD44342@ip.net.ua>
In-Reply-To: <20050212145501.GG5488@cnd.mcgill.ca>
References:  <20050212145501.GG5488@cnd.mcgill.ca>

next in thread | previous in thread | raw e-mail | index | archive | help

--imjhCm/Pyz7Rq5F2
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

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?
>=20
Well, you can:

	cd /usr/src
	make buildworld TARGET_ARCH=3Damd64
	make buildkernel TARGET_ARCH=3Damd64

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=3Damd64
	make buildkernel TARGET_ARCH=3Damd64

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=3Damd64
	make _obj SUBDIR_OVERRIDE=3Dsys/modules/midi TARGET_ARCH=3Damd64
	make _depend SUBDIR_OVERRIDE=3Dsys/modules/midi TARGET_ARCH=3Damd64
	make everything SUBDIR_OVERRIDE=3Dsys/modules/midi TARGET_ARCH=3Damd64

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


Cheers,
--=20
Ruslan Ermilov
ru@FreeBSD.org
FreeBSD committer

--imjhCm/Pyz7Rq5F2
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (FreeBSD)

iD8DBQFCDnx0qRfpzJluFF4RAliRAJ4gPMFgZCQbMZeLMprgGYLUvvb3AACgkf5V
hFzbT8S1h4CuwWXm4pLD7xU=
=ZbLH
-----END PGP SIGNATURE-----

--imjhCm/Pyz7Rq5F2--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050212220020.GD44342>