From mboxrd@z Thu Jan 1 00:00:00 1970 To: 9fans@cse.psu.edu Subject: Re: [9fans] Building P9P for multiple architectures from the same source tree? From: "Russ Cox" Date: Thu, 27 Dec 2007 11:09:56 -0500 In-Reply-To: <4664-67673@sneakemail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Message-Id: <20071227210953.EAF431E8C1C@holo.morphisms.net> Topicbox-Message-UUID: 22e4f5ae-ead3-11e9-9d60-3106f5b1d025 > Is it possible to build P9P for multiple architectures (e.g. > linux i386 and amd64) in the same tree? I looked at the > documentation but didn't see anything. > > In my work environment I can't install in /usr/local/plan9 because > I don't control the machines, so I install in my (NFS mounted) > home directory. This has worked fine up until now because all > the machines are running i386 linux. Unfortunately, we are now > starting to have some machines running amd64 linux, so I need > to build an amd64 version of P9P. I would like to avoid having > two complete copies of the tree if possible. The easiest thing to do is to create a second tree that symlinks back to the first for all top-level directories except bin and lib. The right thing to do is change $PLAN9/src/mkhdr to change BIN and LIBDIR to something like BIN=$PLAN9/bin/$OBJTYPE LIBDIR=$PLAN9/lib/$OBJTYPE and then also change the $PLAN9/bin/9l script to use the right -L argument. There are likely to be other places that "know" the paths of those directories and will need to be fixed too. This will be more work than the sleazy symlink fix. Russ