Commit Graph

165 Commits

Author SHA1 Message Date
thorpej b6d2afdc45 Add constants that describe the target's max/min INT, UINT, LONG, ULONG,
QUAD, and UQUAD values.
2002-02-20 16:10:34 +00:00
thorpej b02b24b1d7 Replace u_quad_t with uint64_t and quad_t with int64_t, and use
<inttypes.h> to get those type definitions.  These types are more
portable, and a little more sane to do autoconf tests for.
2002-02-05 03:04:26 +00:00
thorpej b985fb5f23 Need <bsd.own.mk> to use ${MACHINE_CPU}. 2002-02-04 08:37:37 +00:00
thorpej a53ece1b64 On m68000, we need different target parameters than on m68k,
because "long double" is a different size on m68000.
2002-02-04 00:18:32 +00:00
lukem 9c3323249d need -lm in the HOSTPROG case too... 2002-02-01 05:44:40 +00:00
ross 4ecd3ab001 now needs -lm for finite(3) 2002-02-01 01:32:20 +00:00
he 1bf20079aa Typo correction. 2002-01-31 23:31:34 +00:00
tv 9fbd88883c Roll in fixes to permit cross-compiling from non-NetBSD hosts. This
round has been tested on Solaris/x86 and Linux hosts.

* Add host tools cap_mkdb, ctags, m4, uudecode.
* Protect __RCSID() and __COPYRIGHT() better.
* Reduce the number of places that need to include "config.h", to keep
  sources closer to their "vanilla" versions.
* Add more compat #defines and autoconf-checked functions.
2002-01-31 22:43:33 +00:00
tv 95407c5758 Use !finite() instead of isinf() in two places for better compatibility. 2002-01-31 22:30:20 +00:00
tv 76834aef57 Protect __RCSID and __COPYRIGHT from being invoked if not defined. 2002-01-31 19:36:47 +00:00
tv 6980d8094a Use setprogname() in main(). 2002-01-31 19:33:50 +00:00
tv dd39a6001e Provide a placebo default for ALIGN() for hosts which don't have this. 2002-01-31 19:33:27 +00:00
tv 084822fde7 * Use setprogname() in main().
* Don't grossly abuse getopt(); allow only -l and -L after filenames are
  encountered, and do the parsing of these options manually.
2002-01-31 19:09:33 +00:00
thorpej 1e27695917 Define FLOAT_SIZE, DOUBLE_SIZE, LDOUBLE_SIZE, and ENUM_SIZE in
target-specific headers, and use the definitions when initializing
the type table.
2002-01-30 06:54:56 +00:00
thorpej 65260ae99b Add a missing "static" on a function decl. 2002-01-30 06:48:32 +00:00
tv 1ae7d35cc2 Remove #include <err.h> (now in lint.h). 2002-01-29 02:43:38 +00:00
thorpej 6e4e75cdae Add a missing "break;" statement so that this actually works again. 2002-01-22 01:14:03 +00:00
tv 44fbde6015 Add hooks for compiling on non-NetBSD hosts. 2002-01-21 19:49:51 +00:00
thorpej 81a86a8f72 Centralize the initialization/declaration of the ttab. 2002-01-18 21:01:38 +00:00
thorpej 41d48940fa * Move stuff shared between lint1 and lint2 to the new common/ directory.
* Move the arch/ directory out of lint1/ into the top-level.
2002-01-18 20:39:17 +00:00
thorpej 55e9ae94b2 Initialize the type table with the correct type sizes for the target. 2002-01-18 20:14:32 +00:00
tron a86fbba5c1 Add "case" statements for "NTSPEC" to fix "gcc" warnings. 2002-01-03 18:50:54 +00:00
thorpej c5e919f6c9 Make sure the tspec_t enum starts at 0, and declare NTSPEC in
the enum proper.
2002-01-03 05:37:39 +00:00
thorpej c73e79666d Simplify test for integer types in the BITFIELDTYPE handling path. 2002-01-03 05:26:53 +00:00
thorpej 9971ed0315 * Add header files (ilp32.h and lp64.h) that describe the two
models of type sizes that we currently support, and include
  the appropriate one in each arch's targparam.h.
* Use the type size constants provided by targparam.h in the
  type table, rather than using "sizeof(type) * CHAR_BIT" (which
  would get the host's type size, not the target's).  XXX Not
  yet done for floating point types.
* Add a new BITFIELDTYPE lint comment that suppresses illegal
  bitfield type errors if the type is an integer type (e.g.
  long, long long), and also suppresses non-portable bitfield
  type warnings.
2002-01-03 04:25:14 +00:00
wiz eeb870f152 Fix typo. 2001-12-24 20:52:09 +00:00
tv b8cee5e237 If USETOOLS=yes, as in a cross build or standard tool-based build, create
lint1.7 using the host lint1 tool.  Otherwise run lint1 from here, as has
been done historically.

Should fix toolchain/15001.
2001-12-19 18:10:40 +00:00
augustss a30c07720a Don't use fd_set to keep track of errors to ignore. Doing so relies on
overriding FD_SETSIZE.  Not overriding it makes it stomp all over memory
(which caused the debug outputs we've seen lately).
It used to work, but toolification of lint broke it.
2001-12-13 23:56:00 +00:00
tv 8e6f7afb5b MKfoo=no -> NOfoo 2001-12-12 01:48:43 +00:00
wiz a775ffcd09 Punctuation nits. 2001-12-08 19:27:56 +00:00
wiz b4371d47f5 Replace some misuses of "then" with "than". 2001-12-04 17:56:30 +00:00
wiz 1fd7eeefcd "than" instead of "then". 2001-11-21 19:14:19 +00:00
wiz 55e6492076 Explicitly write explicitly without a second e. 2001-11-21 17:33:26 +00:00
perry 46164f478c Fix a bug in detecting overflow in unsigned multiplication.
XXX Note that the overflow code for many cases seems to be buggy. I've
only fixed one bug that was bothering me. A set of regression tests
and extensive testing are needed.
2001-11-17 04:35:32 +00:00
tv b5cd2489b2 Major overhaul of src/tools and host toolchain. Summary of changes:
* Rewrite src/tools Make logic to work like the rest of the tree wrt
  "dependall" and "install".  The old "make build" hack is gone.

* Remove the MKTOOLS logic.  This was linked to the "make build" hack,
  and was only needed because TOOLDIR originally had no writable default.

* Redo the GNU configure/make logic to make it fit reasonably in a
  BSD make wrapper.  Use new ${.ALLTARGETS} variable to scan for
  targets in $(srcdir), and mark them with .MADE: to prevent rebuilding.

* Only build cross tools in src/tools; remove some messy logic in
  src/usr.* and src/gnu/usr.* that would do target filename rewriting
  (improves consistency and readability).

* Add the ability to build cross gdb at tool build time by setting
  MKCROSSGDB (default no) to "yes" in mk.conf.

* Add src/tools/groff and set up paths to work with this cross groff.
2001-11-12 23:16:17 +00:00
yamt 9ab12a24fa our wchar_t is int, not short. 2001-10-28 05:24:37 +00:00
thorpej 5f0a22902a Give host tool builds better control over the HOST_CPPFLAGS. 2001-10-25 02:22:55 +00:00
thorpej 75f45f0ffb Add support for putting prefixes on the name of lint(1)'s front
and back ends.  This means that it can be built as a cross tool.
Part of the fix for bin/14280.
2001-10-24 02:31:09 +00:00
tv d3c2262c8b Back out part of rev. 1.16 (my build didn't pick up the -I from
../Makefile.inc the first time around, for some reason.)
2001-10-24 01:12:45 +00:00
thorpej 20d4cc1a5a Set a CPP define on the command line to indicate which object
format lint(1) is being targeted at, and use this knowledge
as appropriate in the target param headers.
2001-10-24 00:42:35 +00:00
tv b96cc8c40e Let lint.7 get auto-built by the bsd.man.mk logic (don't explicitly depend
on it via "realall:").  Fixes lint.7 problem in src/tools reported by mrg.

While here, actually -I the arch subdir to pull in the correct targparam.h.
2001-10-24 00:07:39 +00:00
jmc d63596f307 Move CPPFLAGS addition for lint1/arch to Makefile.inc so each subdir will
pick them up
2001-10-22 05:19:31 +00:00
thorpej 62f88da44c Split out target parameters into separate header files, and
pull the correct one in based on the MACHINE_CPU variable.
MACHINE_CPU will be set according to the target system we are
building for by <bsd.own.mk>.

One component of addressing bin/14280.
2001-10-21 21:39:49 +00:00
bjh21 67fe54beb4 On ARM ELF platforms, size_t and ptrdiff_t are u_long and long respectively.
See <arm/ansi.h>.
2001-10-06 12:25:56 +00:00
wiz 9fa0b17629 Give initiali[sz]e all the "i"s it deserves. 2001-09-18 18:15:49 +00:00
wiz 456dff6cb8 Spell 'occurred' with two 'r's. 2001-09-16 16:34:23 +00:00
wiz 1e378c4c12 precede, not preceed. 2001-08-20 12:00:46 +00:00
eeh 7cac6218f0 Don't use long double on sparc64 since the compiler is borked. 2001-08-17 05:49:43 +00:00
tv dba5d44670 Add hooks to allow toolchain bits to be reachover-built at the top level. 2001-08-14 10:18:26 +00:00
wiz 30b2bf87ed Various typos in comments (neccessary, sceme, choise, ...). 2001-07-26 15:05:07 +00:00