Commit Graph

137 Commits

Author SHA1 Message Date
christos e9a36b93da Add -Wextra -Wno-unused-parameter to WARNS > 2 2006-10-22 22:17:30 +00:00
elad 83704dec18 PR/28368: Peter Postma: unrecognized option `-Wnetbsd-format-audit'
Apply patch from rivo nurges in #NetBSD-code, thanks!
2006-10-08 17:16:51 +00:00
simonb b53f76b4fe Use -Wno-uninitialized for ns32k. For some reason, gcc on ns32k
doesn't detect initialisation correction in simple "for" loops like:
	for (i = 0; i < 10; i++)
		var = i;
2006-09-09 03:53:19 +00:00
mrg 252f1af0f5 -std=gnu99 can be applied with GCC>=3, not MACHINE != vax. 2006-07-01 06:02:51 +00:00
gdamore 494d0cb31a Forgot to commit these for TOOL_SED. Thanks to tsutsui@ for pointing it out. 2006-06-18 14:38:48 +00:00
mrg db19e89e04 remove support for building (with) GCC 2.95. also:
- always install <stdbool.h>
- don't generate a fake one for vax / gettext.
2006-06-02 22:16:18 +00:00
uwe d5328b65a0 Enable -Wold-style-cast for sh3 now that its stadarg.h doesn't use LHS casts. 2006-05-22 00:43:04 +00:00
christos 0d1e2d0056 Remove -Wno-attribute for gcc4 2006-05-20 00:48:41 +00:00
mrg 1ed40e7c8b add support for ${OBJCOPTS} and ${OBJCOPTS}.<lib|prog|fn>. 2006-05-11 23:47:34 +00:00
mrg 0db1500b43 retire HAVE_GCC3/HAVE_GCC4 and introduce HAVE_GCC that is set to 2, 3 or 4. 2006-04-07 19:38:58 +00:00
he 50ea083318 The -Wno-packed switch is a gcc3+ thing, so place it where it won't
be picked up by gcc 2.95.3.  Fixes build problem for vax.
2006-03-27 11:50:08 +00:00
dogcow 7c781162f5 Add -Wno-packed, in preparation for gcc4.1.x; unlike most of the other
warnings, it (at best) flags possible underoptimization, and not any
code defects.
2006-03-25 22:23:04 +00:00
christos 48d8900cac For now, s/c99/gnu99/ for WARNS=4. This is so that alloca() is defined (and
possibly other built-in functions). Another solution would be to add:

    #ifdef __GNUC__
    #define alloca(a) __builtin_alloca(a)
    #else
    void *alloca(size_t);
    #endif

in stdlib.h, since we have assembly support for some architectures on
non-gcc environments, and we can add the rest.
2005-12-02 21:34:50 +00:00
jwise 3deae99425 Add proper support for using bsd.hostprog.mk to build c++-based host
programs -- doesn't affect current host tools build (groff is built the
Makefile.gnuhost way).

Provides {.cc,.cpp,.cxx,.C}.lo rule, associated variables, and HOSTPROG_CXX
support (mirroring PROG_CXX in bsd.prog.mk).

Tested with from-scratch `build.sh tools' and full system build.
2005-09-02 03:57:10 +00:00
he be72885616 Disable the C++ warning -Wold-style-cast for sh3 as well, because
that CPU's headers' va_start() uses a cast.

Discussed with christos.
2005-08-09 22:16:19 +00:00
he 1042d80dad Gcc 2.95.3 doesn't support the -Wabi warning flag, so don't try to use
it there.

The vax port's va_start() macro uses a cast, so for the moment disable
the -Wold-style-cast warning flag for the old GCC as well (as vax is
the only remaining port using this compiler).
2005-08-09 15:24:26 +00:00
christos 4d135558d7 Add CXXFLAGS for WARNS=2 2005-08-09 02:38:06 +00:00
christos d818d83647 Add .m in the list of suffixes, otherwise including bsd.sys.mk in a Makefile
treats the .m.o:  suffix rule as a target. This broke typing 'make' in
${NETBSDSRC}/sys/kern.
2005-07-09 18:45:16 +00:00
lukem 87b3e94478 Don't add -Wno-uninitialized to CFLAGS if WARNS > 0 and HAVE_GCC != no,
as gcc3 generates much less false positives for -Wuninitalized and I
have found genuine bugs with this warning enabled.
Tested by building a full release of NetBSD/i386.
2005-06-04 12:17:45 +00:00
christos 3088775912 We need a non-tool version of genassym. 2005-05-31 03:45:42 +00:00
riz fbc99af11a Provide a default definition of OBJDUMP - bsd.kmod.mk expects it.
Approved by heas.
2005-05-23 21:58:21 +00:00
tron 1f47028b14 Don't use "-std=c99" for NetBSD-vax because gcc 2.95.3 doesn't support it. 2005-04-05 11:56:09 +00:00
matt 6dc6ca22f8 Add support for WARNS=4 (-std=c99) 2005-02-20 01:31:44 +00:00
simonb 6c2e9fc212 Add CPUFLAGS to AFLAGS as well as CFLAGS so that CPUFLAGS is used for
assembly files.
2004-10-19 01:05:40 +00:00
abs a43917f536 Add TOOL_SPARKCRC. Need to clean up what happens in the non tools case. 2004-06-08 21:46:52 +00:00
lukem 019cfb87ee add a blank line to improve readability 2004-04-18 03:19:02 +00:00
lukem af85ccad70 Replace
:M-[IDU]*
with
	:C/-([IDU])[  ]*/-\1/Wg:M-[IDU]*
so that arguments with whitespace after them work correctly.
Resolves [toolchain/18248] from Andrew White at Motorola.

Be consisent in this syntax; previously we'd sometimes we'd just have :M-[ID]*
which would ignore -Ufoo ...

(This needs :C///W support in make(1) that Simon Gerraty added for me :)
2004-01-27 03:31:48 +00:00
lukem ec71eec11f .c.lo: support per-target COPTS, CPPFLAGS, CPUFLAGS 2003-11-16 16:10:50 +00:00
matt ac869c13c5 Add a AWK for awk. 2003-11-14 05:22:02 +00:00
matt 707e787138 Add a HOST_LN. 2003-11-13 05:54:44 +00:00
lukem 820345f78c Remove single suffix inference rules from here; nothing in the tree
relies upon them (AFAICT).

(This fixes the build issue with src/x11, because the .cpp rule in
bsd.x11.mk was being overridden by the .cpp rule here)
2003-11-08 06:06:50 +00:00
lukem 443c980dcd use ${.PREFIX} instead of ${.TARGET:R} 2003-10-29 02:10:57 +00:00
lukem 7675cc90f4 Move the MAKEVERBOSE setup from <bsd.sys.mk> to <bsd.own.mk>, and
change all the variable assignments from = to ?=
2003-10-21 16:36:58 +00:00
lukem 130ab7336b Rework how MAKEVERBOSE operates:
*	Don't bother prefixing commands with a line of  ${_MKCMD}\
	and instead rely upon "make -s".  This is less intrusive on
	all the Makefiles than the former.  Idea from David Laight.

    *	Rename the variables use to print messages.  The scheme now is:
	    _MKMSG_FOO		Run  _MKMSG 'foo'
	    _MKTARGET_FOO	Run  _MKMSG_FOO ${.TARGET}
	From discussion with Alistair Crooks.
2003-10-21 10:01:19 +00:00
lukem 0e3525fabb Add MAKEVERBOSE pretty versions for .cc .cpp .cxx .C
Fix typo in .l.o and .y.o rule
2003-10-20 00:24:22 +00:00
lukem 094017b449 add _MKMSGCREATE.m 2003-10-19 14:23:02 +00:00
lukem bef75a2e23 add _MKMSGINSTALL.m 2003-10-19 03:53:33 +00:00
lukem d2142fb492 fix _MKSHECHO for MAKEVERBOSE=1 2003-10-19 03:21:18 +00:00
lukem 4ccb31e74a Provide _MKMSG{BUILD,CREATE,COMPILE,FORMAT,INSTALL,LINK,LEX,YACC} to display
${_MKMSG} "  ...  {$.TARGET}"  and use appropriately.

Provide _MKMSGLINK.m to provide "link" message by itself (without ${.TARGET})

Replace _MKSHCMD with _MKSHECHO
2003-10-19 03:00:55 +00:00
lukem e14dfde075 Add rules for .s .s.o .S .S.o to support per-source COPTS,CPUFLAGS,CPPFLAGS
and MAKEVERBOSE
2003-10-19 02:11:29 +00:00
lukem f1e290c260 implement MAKEVERBOSE for rules which are of the form:
@cmp -s ${.ALLSRC} ${.TARGET} || ( echo cmd && cmd )
2003-10-18 16:41:19 +00:00
lukem 03b6213598 Implement MAKEVERBOSE to control how "verbose" the standard make(1) rules are.
Supported values:
    0	Minimal output ("quiet")
    1	Describe what is occurring
    2	Describe what is occurring and echo the actual command ("verbose")
	This is the default, and is equivalent to the previous behaviour.
2003-10-18 15:33:59 +00:00
christos 4ef8a70c82 Disable -Wtraditional and explain why. 2003-08-22 18:07:21 +00:00
lukem 5e2ad4afcc Be consistent how "multiple include protection" is implemented. I.e,
.if !defined(_BSD_foo_MK_)
	_BSD_foo_MK_=1

	# ...

	.endif	# !defined(_BSD_foo_MK_)
2003-07-28 02:38:33 +00:00
lukem 29c0479a2a Add source-file-specific variables in <bsd.lib.mk> and <bsd.prog.mk>:
COPTS.<fn>	Additional flags to the compiler when creating the C objects
		for <fn>.

CPUFLAGS.<fn>	Additional flags to the compiler/assembler for <fn>.

CPPFLAGS.<fn>	Additional flags to the C pre-processor for <fn>.


(For <fn>.[ly], "<fn>.c" must be used.)
2003-07-22 06:53:21 +00:00
lukem 65668567d3 add TOOL_STAT for stat(1) 2003-07-20 14:36:12 +00:00
lukem 4d63406463 Add MKMANZ; if not set to "no", compress the manual pages at installation time.
This replaces the previous  .if defined (MANZ) behaviour, although the latter
will set MKMANZ=yes for compatibility purposes.

Don't bother with -P-bou in TOOL_ROFF_HTML; it doesn't appear to be
necessary with groff 1.19.

Fix NOHTML implementation to be consistent with other NOxxx / MKxxx
variables, and expose the user-tweakable MKHTML.
2003-07-18 02:52:51 +00:00
lukem f0dafe0c0e use full path in default TOOL_MAKEWHATIS 2003-07-14 00:41:17 +00:00
lukem 001c68bd94 Rename a large chunk of the make(1) variables which refer to a
program/tool from "FOO" to "TOOL_FOO".  The new variables are:
	TOOL_ASN1_COMPILE  TOOL_CAP_MKDB  TOOL_CAT  TOOL_CKSUM  TOOL_COMPILE_ET
	TOOL_CONFIG  TOOL_CRUNCHGEN  TOOL_CTAGS  TOOL_DB  TOOL_EQN  TOOL_FGEN
	TOOL_GENCAT  TOOL_GROFF  TOOL_HEXDUMP  TOOL_INDXBIB  TOOL_INSTALLBOOT
	TOOL_INSTALL_INFO  TOOL_M4  TOOL_MAKEFS  TOOL_MAKEINFO  TOOL_MAKEWHATIS
	TOOL_MDSETIMAGE  TOOL_MENUC  TOOL_MKCSMAPPER  TOOL_MKESDB
	TOOL_MKLOCALE  TOOL_MKMAGIC  TOOL_MKTEMP  TOOL_MSGC  TOOL_MTREE
	TOOL_PAX  TOOL_PIC  TOOL_PREPMKBOOTIMAGE  TOOL_PWD_MKDB  TOOL_REFER
	TOOL_ROFF_ASCII  TOOL_ROFF_DVI  TOOL_ROFF_HTML  TOOL_ROFF_PS
	TOOL_ROFF_RAW  TOOL_RPCGEN  TOOL_SOELIM  TOOL_SUNLABEL  TOOL_TBL
	TOOL_UUDECODE  TOOL_VGRIND  TOOL_ZIC

For each, provide default in <bsd.sys.mk> of the form:
	TOOL_FOO?=	foo
and for the ${USETOOLS}=="yes" case in <bsd.own.mk>, provide override:
	TOOL_FOO=	${TOOLDIR}/bin/${_TOOL_PREFIX}foo

Document all of these in bsd.README.

This cleans up a chunk of potential (and actual) namespace collision
within our build infrastructure, as well as improves consistency in
the share/mk documentation and provision of appropriate defaults for
each of these variables.
2003-07-10 10:33:58 +00:00
tshiozak e376aa8308 Citrus iconv support(3)
add host tools : mkcsmapper and mkesdb
  mkcsmapper - coded character set mapping table compiler
  mkesdb - encoding scheme database compiler
2003-06-26 06:30:07 +00:00