From owner-freebsd-current Thu Dec 14 4:46: 8 2000 From owner-freebsd-current@FreeBSD.ORG Thu Dec 14 04:46:03 2000 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mail.jeamland.net (rafe.jeamland.net [203.18.243.114]) by hub.freebsd.org (Postfix) with ESMTP id 3F1D537B400 for ; Thu, 14 Dec 2000 04:46:02 -0800 (PST) Received: by mail.jeamland.net (Postfix, from userid 1000) id B3B1170601; Thu, 14 Dec 2000 23:45:59 +1100 (EST) Date: Thu, 14 Dec 2000 23:45:59 +1100 From: Benno Rice To: Bruce Evans Cc: freebsd-current@FreeBSD.ORG Subject: Re: Patch to allow overriding of nm in lorder, genassym.sh Message-ID: <20001214234559.B29875@rafe.jeamland.net> References: <20001213224645.A16171@rafe.jeamland.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from bde@zeta.org.au on Thu, Dec 14, 2000 at 11:18:41PM +1100 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Thu, Dec 14, 2000 at 11:18:41PM +1100, Bruce Evans wrote: > On Wed, 13 Dec 2000, Benno Rice wrote: > > > Does anyone object to me committing the attached patch? > > > > It basically allows the overriding of nm in lorder(1) and > > sys/kern/genassym.sh using the environment variable NM. > > > > I've been using this locally as I've been building with 'powerpc-elf-nm' > > rather than nm. > > > > Comments? Objections? Review? =) > > I don't like this much. I think I would prefer to use an extension of > OBJFORMAT to control all binary utilites consistently. Where do you > set NM and corresponding variables for other binary utilities? The compilers et al (from what I can see) have an executable prefix (eg powerpc-elf) compiled in. This is overridable using things like GCC_EXEC_PREFIX but using a scheme like this would still require putting an environment variable into the scripts. I'm happy to do it this way if people prefer it though. I chose the way I did it as it allows people to set NM in Makefiles and have it used by the scripts in the same way CC can be set and used. > genassym.sh and lorder.sh are also missing support for the -aout/-elf > command line option, and this breaks building of kernels in a non-native > object format. I think the correct fix is is to set OBJFORMAT before > running shell scripts that run binary utilities, not to clutter the > shell scripts with code to select the correct binarary utility. This doesn't fix my problem though. The problem I'm facing is that the command 'nm' is hardcoded into both genassym.sh and lorder.sh, when I need to run 'powerpc-elf-nm'. Even if we were to move that piece of config into OBJFORMAT, it'd still require some kind of magic in the scripts. -- Benno Rice benno@FreeBSD.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message