Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Dec 2000 23:45:59 +1100
From:      Benno Rice <benno@FreeBSD.org>
To:        Bruce Evans <bde@zeta.org.au>
Cc:        freebsd-current@FreeBSD.ORG
Subject:   Re: Patch to allow overriding of nm in lorder, genassym.sh
Message-ID:  <20001214234559.B29875@rafe.jeamland.net>
In-Reply-To: <Pine.BSF.4.21.0012142237280.3687-100000@besplex.bde.org>; from bde@zeta.org.au on Thu, Dec 14, 2000 at 11:18:41PM %2B1100
References:  <20001213224645.A16171@rafe.jeamland.net> <Pine.BSF.4.21.0012142237280.3687-100000@besplex.bde.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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




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