Subject: Re: Building on MacOS X
To: Jason Thorpe <thorpej@wasabisystems.com>
From: =?ISO-8859-1?Q?R=E9mi_Zara?= <remi_zara@mac.com>
List: tech-toolchain
Date: 03/19/2003 12:31:32
Le mercredi, 19 mars 2003, =E0 00:11 Europe/Paris, Jason Thorpe a =E9crit =
:

>
> On Tuesday, March 18, 2003, at 12:14  PM, R=E9mi Zara wrote:
>
>>>  * Is it normal that I saw it show warning about things in =20
>>> /usr/include
>>> p.ex.:
>>> In file included from /usr/include/machine/ansi.h:33,
>>>                  from /usr/include/stdlib.h:60,
>>>                  from =20
>>> /Volumes/SourcesNetBSD/src/tools/toolchain/../../gnu/dist/toolchain/=20=

>>> libiberty/splay-tree.c:32:
>>> /usr/include/ppc/ansi.h:2:3: warning: style of line directive is a =20=

>>> GCC extension
>>> Shouldn't it all be self contained in the netbsd src tree ? My =20
>>> earlier problem seems to be related to that too.
>>
>> I tried to add the -nostdinc option in src/tools/installboot/Makefile
>> It does not work in HOST_CPPFLAGS nor in CPPFLAGS because =20
>> nbhost-mkdep does not know about it.
>>
>> Could someone knowledgeable tell me the right place to put -nostdinc =20=

>> into (or if it is at all the right approach) ?
>
> When building the tools, you are building programs that run on the =20
> host, and so -nostdinc is not appropriate.

My problem is in src/sys/ufs/ffs/ffs_bswap.c which contains : #include =20=

<ufs/ffs/fs.h>
This should reference, I guess,  src/sys/ufs/ffs/fs.h. But, at least on =20=

my system, /usr/include/ufs/ffs/fs.h exists and does not contain some =20=

struct fields needed by NetBSD. I guess that's what gets really =20
included (and that shouldn't). That's why I thought of -nostdinc.

(all that trouble for cross building for mac68k a tool, installboot =20
which is not relevant for mac68k....)

> What version of Mac OS X are you using?  I have had no trouble with =20=

> cross-building i386 and evbarm releases from 10.2.4[*].

I'm using MacOs X 10.2.4.
GCC:
rzara@lundi [~] {1}% gcc -v
Reading specs from /usr/libexec/gcc/darwin/ppc/3.1/specs
Thread model: posix
Apple Computer, Inc. GCC version 1175, based on gcc version 3.1 =20
20020420 (prerelease)

  I've put the NetBSD sources on an UFS disk image, because HFS+ is =20
(somewhat) case insensitive and this cause a problem for (at least) the =20=

cvs sources.

> [*] ...except /usr/bin/join on Mac OS X will crash when building the =20=

> target libraries.  Just compile the NetBSD join(1) on your Mac OS X =20=

> system and use that instead (I have filed a bug report with Apple =20
> about the problem).
>
>         -- Jason R. Thorpe <thorpej@wasabisystems.com>


Thanks for your help,

R=E9mi

--
R=E9mi Zara
web: http://www.remi-zara.net/