Commit Graph

27 Commits

Author SHA1 Message Date
Baptiste Daroussin
3e11bd9e2a Convert to usr.bin/ to LIBADD
Reduce overlinking
2014-11-25 14:29:10 +00:00
Warner Losh
c6063d0da8 Use src.opts.mk in preference to bsd.own.mk except where we need stuff
from the latter.
2014-05-06 04:22:01 +00:00
Gleb Smirnoff
9968f056d6 Fix world build WITHOUT_PF.
Sponsored by:	Nginx, Inc.
2014-02-12 09:59:48 +00:00
Pawel Jakub Dawidek
68cfe72642 Include bsd.own.mk for MK_CASPER to work.
Reported by:	nwhitehorn
2013-12-15 23:49:42 +00:00
Pawel Jakub Dawidek
4622f0e183 Make use of Casper's system.pwd and system.grp services when the -r option
is given to convert uids and gids to user names and group names even when
running in capability mode sandbox.

While here log on stderr when we successfully enter the sandbox.

Sponsored by:	The FreeBSD Foundation
2013-12-15 23:09:05 +00:00
Dimitry Andric
c1b2e4fc21 In kdump's mkioctls script, use '${CPP}' instead of hardcodedly using
'gcc -E'.  This fixes building when WITH_CLANG_IS_CC is in effect.

Report by:	Niclas Zeising <zeising@daemonic.se>
MFC after:	1 week
2012-04-09 14:47:18 +00:00
Dag-Erling Smørgrav
c04743dac1 It turns out that truss also used kdump's mkioctls script, and expected
ioctlname() to return a pointer to the name rather than print it.  This did
not show up in testing because truss had its own prototype for ioctlname(),
so it would build fine and run fine as long as the program being traced did
not issue an ioctl.

Teach mkioctls to generate different versions of ioctlname() based on its
first command-line argument.

Pointed out by:	Garrett Cooper <yanegomi@gmail.com>
2011-10-21 11:08:25 +00:00
Dag-Erling Smørgrav
51b6c61f98 Clean up mkioctls a bit, and fix cross-building by checking ${MACHINE}
instead of $(uname -m).

Pointed out by:	nyan@
2011-10-13 16:29:24 +00:00
Dag-Erling Smørgrav
81a3139422 Make kdump compile cleanly at WARNS level 6, with one exception: the
ipfilter headers contain a duplicated function declaration.  Turn off
-Werror to allow kdump to compile in spite of this.

It would be neat to be able to turn off -Werror on a file-by-file basis...

PR:		bin/161478
Submitted by:	Garrett Cooper <yanegomi@gmail.com>
2011-10-12 21:45:12 +00:00
Dag-Erling Smørgrav
6eaa54110b Fix the dependency issue properly by a) moving kdump_subr.c to the front
of the SRCS list and b) listing kdump_subr.h in DPSRCS.
2011-10-08 12:59:41 +00:00
Dag-Erling Smørgrav
34bb8e6d12 1) Some of the #defines or enums for which we auto-generate naming
functions may be wider than int, so use intmax_t throughout.  Also
   add missing casts in printf() calls.

2) Clean up some of the auto-generated code to improve readability.

3) Auto-generate kdump_subr.h.  Note that this requires a semi-ugly hack
   in the Makefile to make sure it is generated before make(1) tries to
   build kdump.c, or preprocess it for 'make depend'.

MFC after:	3 weeks
2011-10-08 09:57:29 +00:00
Dmitry Chagin
dde5f9b938 Teach kdump to decode linux syscalls names too.
Fix bug introduced in my previous commit: the kernel always dump native
signal numbers, so no need to check the ABI in ktrpsig().

Suggested by:	jhb
MFC after:	1 Month.
2011-03-01 16:42:28 +00:00
Ed Schouten
b7946da96b Build usr.bin/ with WARNS=6 by default.
Also add some missing $FreeBSD$ to keep svn happy.
2010-01-02 10:27:05 +00:00
Dag-Erling Smørgrav
5fb6bed92c Revert CLEANDEPFILES commit per ru@'s request; it does not really solve
the problem.  The correct fix will follow.
2008-02-05 08:52:36 +00:00
Dag-Erling Smørgrav
0d7cc1d0eb Normally, when a header file is removed from the build (as i4b headers
were recently), a simple 'make cleandepend; make depend' is sufficient
to keep the tree buildable after a cvs update when doing incremental
builds.

However, kdump and truss use a script which searches for header files
that define ioctls, and generates C code that includes them.  This
script will usually not need updating when a header file is removed,
so the normal dependency mechanism will not realize that it needs to
be re-run.  One is therefore left with code that references dead files
but will only be removed by a full 'make clean', which defeats the
purpose of incremental builds.

To work around this, modify the cleandepend target in bsd.dep.mk to
also remove any files listed in a new variable named CLEANDEPFILES,
and modify kdump's and truss's Makefiles accordingly.

MFC after:	2 weeks
2008-02-03 11:34:56 +00:00
Alexander Leidinger
98a68a586f Change kdump to print more useful information, i.e. it changes from
32229 telnet   CALL  mmap(0,0x8000,0x3,0x1002,0xffffffff,0,0,0)
 32229 telnet   CALL  open(0x2807bc28,0,0x1b6)
 32229 telnet   CALL  socket(0x2,0x2,0)
to
 32229 telnet   CALL mmap(0,0x8000,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON,0xffffffff,0,0,0)
 32229 telnet   CALL  open(0x2807bc28,O_RDONLY,<unused>0x1b6)
 32229 telnet   CALL  socket(PF_INET,SOCK_DGRAM,0)

David wanted to implement the suggestions which came up at the review from
arch@ too, but real life rejected this proposal. So I commit what we already
got and let another volunteer pick the remaining work from the ideas list.

Submitted by:	"David Kirchner" <dpk@dpk.net>
Suggested by:	FreeBSD ideas list page
Reviewed by:	arch
2006-05-20 14:27:22 +00:00
Ruslan Ermilov
95ad74d7cf Dependencies are delimited by space not tab. 2002-07-23 09:15:45 +00:00
Mark Murray
4c2fb88368 Better fix for style.
Suggested by:	ru (but modified a bit by markm)
2002-06-21 11:06:11 +00:00
Mark Murray
09b904c8e5 Style tidy-up. 2002-06-21 10:21:21 +00:00
Ruslan Ermilov
b2490f915f I now don't seem to be able to reproduce the -DNOCLEAN buildworld
breakage with ioctl.c.  The .depend file should track dependencies
just fine, and the worst we can have is to miss new ioctls.

But I still think it's a good idea to have -DNOCLEAN build produce
the same ioctl.c as it would without -DNOCLEAN.

Prodded for a long time by:	bde
2002-04-11 14:49:32 +00:00
Jordan K. Hubbard
d9f61e83b6 Fix ioctl.c creation to deal with the depend case more properly.
Submitted by:	Ruslan Ermilov <ru@sunbay.com>
2000-09-14 18:52:48 +00:00
Jordan K. Hubbard
6b61687292 remove .PHONY to avoid gratuitous rebuild of ioctl.c each time.
Approved by:	sef
2000-09-14 06:20:19 +00:00
Ruslan Ermilov
ed7cf099c6 Make auto-generated ioctl.c to be always considered out of date
since it could potentially depend on any ${DESTDIR}/usr/include
preprocessor file.  This fixes the broken -DNOCLEAN world build
I experienced yesterday.
2000-08-01 10:21:13 +00:00
Marcel Moolenaar
e2366ecc70 Avoid hardcoding any paths and variables. The include directory must
now be specified on the command line. Accept a '-s' option which
controls whether a switch-statement is to be used instead of a series
of if-statements.

Replace cpp with gcc -E.

Discussed with: bde
1999-12-03 12:50:02 +00:00
Marcel Moolenaar
5d00a945b6 Make sure DESTDIR is set in the environment of mkioctls. This fixes
the breakage people have encountered at certain times (for example
when the altq_*.h files were removed).

$FreeBSD$ tag added.
1999-12-02 13:47:17 +00:00
Poul-Henning Kamp
122e125592 -I${.CURDIR}/../.. 1994-11-21 00:54:28 +00:00
Rodney W. Grimes
9b50d90275 BSD 4.4 Lite Usr.bin Sources 1994-05-27 12:33:43 +00:00