Subject: bin/14280: lint(1) is not cross-tool safe
To: None <gnats-bugs@gnats.netbsd.org>
From: None <thorpej@shagadelic.org>
List: netbsd-bugs
Date: 10/17/2001 18:36:52
>Number: 14280
>Category: bin
>Synopsis: lint(1) is not cross-tool safe
>Confidential: no
>Severity: critical
>Priority: high
>Responsible: bin-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Oct 17 18:37:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: Jason R. Thorpe
>Release: NetBSD 1.5Y, Oct 15, 2001
>Organization:
Wasabi Systems, Inc.
>Environment:
System: NetBSD dr-evil 1.5Y NetBSD 1.5Y (DR-EVIL) #223: Sat Oct 6 09:54:46 PDT 2001 thorpej@dr-evil:/u1/netbsd/src/sys/arch/i386/compile/DR-EVIL i386
Architecture: i386
Machine: i386
>Description:
lint(1) is not currently cross-safe. In particular, the lint
binaries have machine-dependent parameters set at compile
time -- see xlint/lint1/param.h.
Also note -- those parameters are set based on CPP symbols
provided by the HOST compiler. That means that the lint(1)
binaries produced are effectively targeted to the host.
>How-To-Repeat:
Code inspection.
>Fix:
Not provided. Although, I have suggestions:
(1) Properly target lint(1), and name the back-ends appropriately.
This would require changes to how param.h works ... the
Makefile would need to define TARGET_ARCH_whatever and
TARGET_OBJFMT_whatever (e.g. TARGET_ARCH_arm, TARGET_OBJFMT_ELF)
so that param.h can take appropriate action.
...or...
(2) Make lint(1) change its behavior based on environment variables,
such as TARGET_ARCH and TARGET_OBJFMT, looking up the behavior
to use in a table.
(1) is probably the better solution (consistent with the
compiler).
>Release-Note:
>Audit-Trail:
>Unformatted: