Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 2 Mar 2010 15:11:18 +0000
From:      Florent Thoumie <flz@xbsd.org>
To:        "M. Warner Losh" <imp@bsdimp.com>
Cc:        ports@freebsd.org
Subject:   Re: Best way to have a port...
Message-ID:  <a01628141003020711vebf9e94j3f64e12841bd56b5@mail.gmail.com>
In-Reply-To: <20100301.235125.431102609672430399.imp@bsdimp.com>
References:  <20100301.235125.431102609672430399.imp@bsdimp.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Mar 2, 2010 at 6:51 AM, M. Warner Losh <imp@bsdimp.com> wrote:
> ... that builds part of FreeBSD?
>
> Let me back up...
>
> I'm trying to create a port for gcc and binutils that is configured
> for FreeBSD for a given machine. =A0FreeBSD mips, say. =A0binutils was
> relatively easy (once I ported our mips support forward). =A0However,
> gcc vexes me. =A0It requires, to build libgcc and friends, a fully
> populated include tree. =A0And it wants to use
> /usr/local/freebsd-mips/include instead of /usr/include (which is
> good). =A0However, the former doesn't exist. =A0I'd like to create a port
> for it, but I'm unclear how to even start. =A0This port should consist
> of all files from make includes TARGET_ARCH=3Dmips.
>
> So, some questions: First, how do I know where the FreeBSD source tree
> is? =A0Is there some standard define like SYSDIR that contains this
> infomration?
>
> Second, I need to invoke make includes (and a few other things), with
> some slightly non-standard args. =A0is there a stylied way to do this?
> I'd like to avoid extracting everything into myport/work/FreeBSD :)
>
> Without solving these problems, the notion that we can use a ports
> compiler to build FreeBSD becomes less viable...

IIUC, you really want one new port that installs all mips headers. The
gcc/binutils port can be modified for ${ARCH} =3D=3D "mips".

Something like this should work:
http://people.freebsd.org/~flz/local/ports/freebsd-mips.shar

The thing is, it will have to be modified everytime a header is
added/removed. The easy way out is to only support HEAD so you don't
have to use OSVERSION conditionals. The other solution I'm seeing is
to fetch sources from FTP (which is obviously more work).

--=20
Florent Thoumie
flz@FreeBSD.org
FreeBSD Committer



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