From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Mon, 2 Sep 2013 15:08:56 -0700 From: Nick Owens To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Message-ID: <20130902220856.GA6254@iota.offblast.org> References: <20130902181554.GD8567@iota.offblast.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Subject: Re: [9fans] Building Go/386 Topicbox-Message-UUID: 79430850-ead8-11e9-9d60-3106f5b1d025 On Mon, Sep 02, 2013 at 05:51:15PM -0400, erik quanstrom wrote: > On Mon Sep 2 16:51:31 EDT 2013, robpike@gmail.com wrote: > > I'm pretty sure C defines the include path to be relative to the file > > that includes it. The compiler's working directory should be > > irrelevant. I'm also pretty sure Plan 9's compiler gets this right, or > > at least used to. So more information is required. > > that still works, otherwise the kernel would not compile. > > - erik > the trouble here is that go's src/libmach/8obj.c has '#include "../cmd/8l/8.out.h"', and 8.out.h now has the newly added '#include "../ld/textflag.h"'. i see now that the kernel source has an instance of this, in /sys/src/9/pc: 'fns.h:1: #include "../port/portfns.h"', but i'm not sure how that is treated differently from this situation. i did a small test, and made $home/bin/rc/8c which forces the -p flag of 8c to invoke cpp. when doing ./make.rc in go with this wrapper, the include appears to be resolved correctly. fwiw, the standard does not define the mechanism for includes to be found at all, only that it is implementation-specific [1]. nick [1] http://www.iso-9899.info/n1256.html#6.10.2