Commit Graph

467 Commits

Author SHA1 Message Date
Mariusz Zaborski
c501d73c7e Convert casperd(8) daemon to the libcasper.
After calling the cap_init(3) function Casper will fork from it's original
process, using pdfork(2). Forking from a process has a lot of advantages:
1. We have the same cwd as the original process.
2. The same uid, gid and groups.
3. The same MAC labels.
4. The same descriptor table.
5. The same routing table.
6. The same umask.
7. The same cpuset(1).
From now services are also in form of libraries.
We also removed libcapsicum at all and converts existing program using Casper
to new architecture.

Discussed with:		pjd, jonathan, ed, drysdale@google.com, emaste
Partially reviewed by:	drysdale@google.com, bdrewery
Approved by:		pjd (mentor)
Differential Revision:	https://reviews.freebsd.org/D4277
2016-02-25 18:23:40 +00:00
Glen Barber
0fe0fe112f MFH
Sponsored by:	The FreeBSD Foundation
2016-02-15 21:58:52 +00:00
Ed Maste
c1da297433 Add libpe for elfcopy(1) PE/COFF support
Sponsored by:	The FreeBSD Foundation
2016-02-12 21:12:47 +00:00
Glen Barber
bb4355f72d Remove duplicate line, likely result of a mismerge.
Sponsored by:	The FreeBSD Foundation
2016-02-04 17:03:12 +00:00
Glen Barber
f9421853ad MFH
Sponsored by:	The FreeBSD Foundation
2016-01-25 14:13:28 +00:00
Ruslan Bukin
5ac86464fc Style. 2016-01-25 10:44:10 +00:00
Ruslan Bukin
194aedf71a Do build libproc and librtld_db for RISC-V as well. 2016-01-25 10:23:36 +00:00
Glen Barber
241984530f Fix svn:mergeinfo, and MFH a commit that was previously missed.
Sponsored by:	The FreeBSD Foundation
2016-01-04 22:32:37 +00:00
Glen Barber
b626f5a73a MFH r289384-r293170
Sponsored by:	The FreeBSD Foundation
2016-01-04 19:19:48 +00:00
Ian Lepore
91ee346313 Make the building of libsmb and mount_smbfs unconditional, now that r292552
has eliminated alignment and endian problems that were making it fail on
some platforms.

PR:        180438
PR:        189415
2015-12-21 17:41:08 +00:00
John Baldwin
d6fb489498 Start on a new library (libsysdecode) that provides routines for decoding
system call information such as system call arguments.  Initially this
will consist of pulling duplicated code out of truss and kdump though it
may prove useful for other utilities in the future.

This commit moves the shared utrace(2) record parser out of kdump into
the library and updates kdump and truss to use it.  One difference from
the previous version is that the library version treats unknown events
that start with the "RTLD" signature as unknown events.  This simplifies
the interface and allows the consumer to decide how to handle all
non-recognized events.  Instead, this function only generates a string
description for known malloc() and RTLD records.

Reviewed by:	bdrewery
Differential Revision:	https://reviews.freebsd.org/D4537
2015-12-15 00:05:07 +00:00
Bryan Drewery
d32e83c26d Move obscure lib/ installation of /usr/lib/include symlink to include/.
This avoids the need for an afterinstall: hook and a check for LIBRARIES_ONLY.
It also now respects INCLUDEDIR.

This came in r249484.

Sponsored by:	EMC / Isilon Storage Division
2015-12-04 03:18:02 +00:00
Adrian Chadd
127be1a706 Add lib80211, a small (but hopefully soon to grow) set of library
routines to interface with net80211.

This is all from the ifconfig program; the duplicate code from ifconfig
will be removed when it starts using this API.

Differential Revision:	https://reviews.freebsd.org/D4290
2015-11-30 04:41:50 +00:00
Bryan Drewery
0d9e60c857 Always build libevent, which fixes the build for usr.sbin/ypldap after r291230.
The dependency for ypldap is only with WITH_NIS, but libevent is small
enough to not warrant the extra logic and maintenance cost here so just
always build it.

Sponsored by:	EMC / Isilon Storage Division
2015-11-26 01:54:09 +00:00
Craig Rodrigues
a36eca08bb Rename libohash to libopenbsd.
libopenbsd is an internal library which
to bring in compatibility stuff from OpenBSD.
This will allow us to bring in more
OpenBSD utilities into the FreeBSD base system.

We similarly use libnetbsd for bringing in stuff from NetBSD.

Reviewed by: bapt
Differential Revision: https://reviews.freebsd.org/D4078
2015-11-04 07:20:55 +00:00
Bryan Drewery
eb774fcd58 libstdc++ also snook in incorrectly in r267511, despite not being a real
subdir.

Sponsored by:	EMC / Isilon Storage Division
2015-10-15 20:49:20 +00:00
Bryan Drewery
d023e38f61 Remove unneeded libg++ reference that came in with r267511 based on a removed
comment.

Sponsored by:	EMC / Isilon Storage Division
2015-10-15 20:46:34 +00:00
Bryan Drewery
e0d253678e Fix another ++= parsed as '+=', missed in r289384.
Sponsored by:	EMC / Isilon Storage Division
2015-10-15 20:40:23 +00:00
Bryan Drewery
468a365ddd Let the SUBDIR_DEPEND*c++ variables actually work rather than being parsed
as a +=.  These were safe due to a .WAIT very early on.

Sponsored by:	EMC / Isilon Storage Division
2015-10-15 20:27:15 +00:00
Ed Maste
1bc28ffccd Roll WITHOUT_ELFTOOLCHAIN_TOOLS into WITHOUT_TOOLCHAIN
The option was added only to ease the transition from GNU Binutils to
ELF Tool Chain tools, and that process is now complete (for the viable
replacements). Noting the removal in UPDATING is sufficient as we have
not shipped a release with the option.

Reviewed by:	brooks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D3240
2015-08-13 17:50:47 +00:00
Ruslan Bukin
b78ee15e9f First cut of DTrace for AArch64.
Reviewed by:	andrew, emaste
Sponsored by:	ARM Limited
Differential Revision:	https://reviews.freebsd.org/D2738
2015-07-01 15:51:11 +00:00
Enji Cooper
4ed27da932 Remove SUBDIR_DEPEND for non-existent libreadline directory
libreadline lives under gnu/lib

MFC after: 1 week
2015-05-24 23:19:47 +00:00
Baptiste Daroussin
8def216e05 Drop libmandoc and incorporate it into the main mandoc Makefile
This simplifies maintainance of mandoc(1).
Note that the same direction was taken on OpenBSD
2015-05-21 12:51:56 +00:00
Ed Maste
4d37254910 Remove redundant csu subdir logic
The appropriate subdirectories are handled by lib/csu/Makefile. There's
no need to duplicate this logic in Makefile.inc1 and lib/Makefile.

Reviewed by:	imp
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D2523
2015-05-12 17:53:22 +00:00
Kenneth D. Merry
43518607b2 Significant upgrades to sa(4) and mt(1).
The primary focus of these changes is to modernize FreeBSD's
tape infrastructure so that we can take advantage of some of the
features of modern tape drives and allow support for LTFS.

Significant changes and new features include:

 o sa(4) driver status and parameter information is now exported via an
   XML structure.  This will allow for changes and improvements later
   on that will not break userland applications.  The old MTIOCGET
   status ioctl remains, so applications using the existing interface
   will not break.

 o 'mt status' now reports drive-reported tape position information
   as well as the previously available calculated tape position
   information.  These numbers will be different at times, because
   the drive-reported block numbers are relative to BOP (Beginning
   of Partition), but the block numbers calculated previously via
   sa(4) (and still provided) are relative to the last filemark.
   Both numbers are now provided.  'mt status' now also shows the
   drive INQUIRY information, serial number and any position flags
   (BOP, EOT, etc.) provided with the tape position information.
   'mt status -v' adds information on the maximum possible I/O size,
   and the underlying values used to calculate it.

 o The extra sa(4) /dev entries (/dev/saN.[0-3]) have been removed.

   The extra devices were originally added as place holders for
   density-specific device nodes.  Some OSes (NetBSD, NetApp's OnTap
   and Solaris) have had device nodes that, when you write to them,
   will automatically select a given density for particular tape drives.

   This is a convenient way of switching densities, but it was never
   implemented in FreeBSD.  Only the device nodes were there, and that
   sometimes confused users.

   For modern tape devices, the density is generally not selectable
   (e.g. with LTO) or defaults to the highest availble density when
   the tape is rewritten from BOT (e.g. TS11X0).  So, for most users,
   density selection won't be necessary.  If they do need to select
   the density, it is easy enough to use 'mt density' to change it.

 o Protection information is now supported.  This is either a
   Reed-Solomon CRC or CRC32 that is included at the end of each block
   read and written.  On write, the tape drive verifies the CRC, and
   on read, the tape drive provides a CRC for the userland application
   to verify.

 o New, extensible tape driver parameter get/set interface.

 o Density reporting information.  For drives that support it,
   'mt getdensity' will show detailed information on what formats the
   tape drive supports, and what formats the tape drive supports.

 o Some mt(1) functionality moved into a new mt(3) library so that
   external applications can reuse the code.

 o The new mt(3) library includes helper routines to aid in parsing
   the XML output of the sa(4) driver, and build a tree of driver
   metadata.

 o Support for the MTLOAD (load a tape in the drive) and MTWEOFI
   (write filemark immediate) ioctls needed by IBM's LTFS
   implementation.

 o Improve device departure behavior for the sa(4) driver.  The previous
   implementation led to hangs when the device was open.

 o This has been tested on the following types of drives:
	IBM TS1150
	IBM TS1140
	IBM LTO-6
	IBM LTO-5
	HP LTO-2
	Seagate DDS-4
	Quantum DLT-4000
	Exabyte 8505
	Sony DDS-2

contrib/groff/tmac/doc-syms,
share/mk/bsd.libnames.mk,
lib/Makefile,
	Add libmt.

lib/libmt/Makefile,
lib/libmt/mt.3,
lib/libmt/mtlib.c,
lib/libmt/mtlib.h,
	New mt(3) library that contains functions moved from mt(1) and
	new functions needed to interact with the updated sa(4) driver.

	This includes XML parser helper functions that application writers
	can use when writing code to query tape parameters.

rescue/rescue/Makefile:
	Add -lmt to CRUNCH_LIBS.

src/share/man/man4/mtio.4
	Clarify this man page a bit, and since it contains what is
	essentially the mtio.h header file, add new ioctls and structure
	definitions from mtio.h.

src/share/man/man4/sa.4
	Update BUGS and maintainer section.

sys/cam/scsi/scsi_all.c,
sys/cam/scsi/scsi_all.h:
	Add SCSI SECURITY PROTOCOL IN/OUT CDB definitions and CDB building
	functions.

sys/cam/scsi/scsi_sa.c
sys/cam/scsi/scsi_sa.h
	Many tape driver changes, largely outlined above.

	Increase the sa(4) driver read/write timeout from 4 to 32
	minutes.  This is based on the recommended values for IBM LTO
	5/6 drives.  This may also avoid timeouts for other tape
	hardware that can take a long time to do retries and error
	recovery.  Longer term, a better way to handle this is to ask
	the drive for recommended timeout values using the REPORT
	SUPPORTED OPCODES command.  Modern IBM and Oracle tape drives
	at least support that command, and it would allow for more
	accurate timeout values.

	Add XML status generation.  This is done with a series of
	macros to eliminate as much duplicate code as possible.  The
	new XML-based status values are reported through the new
	MTIOCEXTGET ioctl.

	Add XML driver parameter reporting, using the new MTIOCPARAMGET
	ioctl.

	Add a new driver parameter setting interface, using the new
	MTIOCPARAMSET and MTIOCSETLIST ioctls.

	Add a new MTIOCRBLIM ioctl to get block limits information.

	Add CCB/CDB building routines scsi_locate_16, scsi_locate_10,
	and scsi_read_position_10().

	scsi_locate_10 implements the LOCATE command, as does the
	existing scsi_set_position() command.  It just supports
	additional arguments and features.  If/when we figure out a
	good way to provide backward compatibility for older
	applications using the old function API, we can just revamp
	scsi_set_position().  The same goes for
	scsi_read_position_10() and the existing scsi_read_position()
	function.

	Revamp sasetpos() to take the new mtlocate structure as an
	argument.  It now will use either scsi_locate_10() or
	scsi_locate_16(), depending upon the arguments the user
	supplies.  As before, once we change position we don't have a
	clear idea of what the current logical position of the tape
	drive is.

	For tape drives that support long form position data, we
	read the current position and store that for later reporting
	after changing the position.  This should help applications
	like Bacula speed tape access under FreeBSD once they are
	modified to support the new ioctls.

	Add a new quirk, SA_QUIRK_NO_LONG_POS, that is set for all
	drives that report SCSI-2 or older, as well as drives that
	report an Illegal Request type error for READ POSITION with
	the long format.  So we should automatically detect drives
	that don't support the long form and stop asking for it after
	an initial try.

	Add a partition number to the sa(4) softc.

	Improve device departure handling. The previous implementation
	led to hangs when the device was open.

	If an application had the sa(4) driver open, and attempted to
	close it after it went away, the cam_periph_release() call in
	saclose() would cause the periph to get destroyed because that
	was the last reference to it.  Because destroy_dev() was
	called from the sa(4) driver's cleanup routine (sacleanup()),
	and would block waiting for the close to happen, a deadlock
	would result.

	So instead of calling destroy_dev() from the cleanup routine,
	call destroy_dev_sched_cb() from saoninvalidate() and wait for
	the callback.

	Acquire a reference for devfs in saregister(), and release it
	in the new sadevgonecb() routine when all devfs devices for
	the particular sa(4) driver instance are gone.

	Add a new function, sasetupdev(), to centralize setting
	per-instance devfs device parameters instead of repeating the
	code in saregister().

	Add an open count to the softc, so we know how many
	peripheral driver references are a result of open
       	sessions.

	Add the D_TRACKCLOSE flag to the cdevsw flags so
	that we get a 1:1 mapping of open to close calls
	instead of a N:1 mapping.

	This should be a no-op for everything except the
	control device, since we don't allow more than one
	open on non-control devices.

	However, since we do allow multiple opens on the
	control device, the combination of the open count
	and the D_TRACKCLOSE flag should result in an
	accurate peripheral driver reference count, and an
	accurate open count.

	The accurate open count allows us to release all
	peripheral driver references that are the result
	of open contexts once we get the callback from devfs.

sys/sys/mtio.h:
	Add a number of new mt(4) ioctls and the requisite data
	structures.  None of the existing interfaces been removed
	or changed.

	This includes definitions for the following new ioctls:

	MTIOCRBLIM      /* get block limits */
	MTIOCEXTLOCATE	/* seek to position */
	MTIOCEXTGET     /* get tape status */
	MTIOCPARAMGET	/* get tape params */
	MTIOCPARAMSET	/* set tape params */
	MTIOCSETLIST	/* set N params */

usr.bin/mt/Makefile:
	mt(1) now depends on libmt, libsbuf and libbsdxml.

usr.bin/mt/mt.1:
	Document new mt(1) features and subcommands.

usr.bin/mt/mt.c:
	Implement support for mt(1) subcommands that need to
	use getopt(3) for their arguments.

	Implement a new 'mt status' command to replace the old
	'mt status' command.  The old status command has been
	renamed 'ostatus'.

	The new status function uses the MTIOCEXTGET ioctl, and
	therefore parses the XML data to determine drive status.
	The -x argument to 'mt status' allows the user to dump out
	the raw XML reported by the kernel.

	The new status display is mostly the same as the old status
	display, except that it doesn't print the redundant density
	mode information, and it does print the current partition
	number and position flags.

	Add a new command, 'mt locate', that will supersede the
	old 'mt setspos' and 'mt sethpos' commands.  'mt locate'
	implements all of the functionality of the MTIOCEXTLOCATE
	ioctl, and allows the user to change the logical position
	of the tape drive in a number of ways.  (Partition,
	block number, file number, set mark number, end of data.)
	The immediate bit and the explicit address bits are
	implemented, but not documented in the man page.

	Add a new 'mt weofi' command to use the new MTWEOFI ioctl.
	This allows the user to ask the drive to write a filemark
	without waiting around for the operation to complete.

	Add a new 'mt getdensity' command that gets the XML-based
	tape drive density report from the sa(4) driver and displays
	it.  This uses the SCSI REPORT DENSITY SUPPORT command
	to get comprehensive information from the tape drive about
	what formats it is able to read and write.

	Add a new 'mt protect' command that allows getting and setting
	tape drive protection information.  The protection information
	is a CRC tacked on to the end of every read/write from and to
	the tape drive.

Sponsored by:	Spectra Logic
MFC after:	1 month
2015-02-23 21:59:30 +00:00
George V. Neville-Neil
fcb5606706 Initial version of DTrace on ARM32.
Submitted by:	Howard Su based on work by Oleksandr Tymoshenko
Reviewed by:	ian, andrew, rpaulo, markj
2015-02-10 19:41:30 +00:00
Rui Paulo
532000256b Merge xz 5.2.0.
This brings support for multi-threaded compression.  This brings close
N times faster compression where N is the number of CPU cores.
Because of this, liblzma now depends on libthr.

Soon libarchive will be modified to use the new lzma API.

Thanks to antoine@ for the exp-run.

Differential Revision:	 https://reviews.freebsd.org/D1786
Reviewed by:	bapt
2015-02-09 06:20:34 +00:00
John Baldwin
64de80195b Add a new device control utility for new-bus devices called devctl. This
allows the user to request administrative changes to individual devices
such as attach or detaching drivers or disabling and re-enabling devices.
- Add a new /dev/devctl2 character device which uses ioctls for device
  requests.  The ioctls use a common 'struct devreq' which is somewhat
  similar to 'struct ifreq'.
- The ioctls identify the device to operate on via a string.  This
  string can either by the device's name, or it can be a bus-specific
  address.  (For unattached devices, a bus address is the only way to
  locate a device.)  Bus drivers register an eventhandler to claim
  unrecognized device names that the driver recognizes as a valid address.
  Two buses currently support addresses: ACPI recognizes any device
  in the ACPI namespace via its full path starting with "\" and
  the PCI bus driver recognizes an address specification of
  'pci[<domain>:]<bus>:<slot>:<func>' (identical to the PCI selector
  strings supported by pciconf).
- To make it easier to cut and paste, change the PnP location string
  in the PCI bus driver to output a full PCI selector string rather
  than 'slot=<slot> function=<func>'.
- Add a devctl(3) interface in libdevctl which provides a wrapper around
  the ioctls and is the preferred interface for other userland code.
- Add a devctl(8) program which is a simple wrapper around the requests
  supported by devctl(3).
- Add a device_is_suspended() function to check DF_SUSPENDED.
- Add a resource_unset_value() function that can be used to remove a
  hint from the kernel environment.  This is used to clear a
  hint.<driver>.<unit>.disabled hint when re-enabling a boot-time
  disabled device.

Reviewed by:	imp (parts)
Requested by:	imp (changing PCI location string)
Relnotes:	yes
2015-02-06 16:09:01 +00:00
Enji Cooper
c7b6816fa9 Add MK_FILE to control whether or not to build file(1), libmagic(3), etc
MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division
2015-02-04 10:24:40 +00:00
Enji Cooper
31a741f473 Conditionalize building radius support into libpam, ppp, etc via
MK_RADIUS_SUPPORT

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division
2015-02-04 06:53:45 +00:00
Enji Cooper
02629e469f Add MK_BHYVE knob for building and installing bhyve(4), et al
MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division
2015-01-26 06:44:48 +00:00
Enji Cooper
3b09bf5e55 Build lib/libgpio if MK_GPIO != no
Fill in corresponding entries for MK_GPIO == no in OptionalObsoleteFiles.inc

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division
2015-01-25 05:37:06 +00:00
Dimitry Andric
8028b78dbf Connect libclang_rt to the build, for specific architectures. This
contains the libraries for Address Sanitizer (asan), Undefined Behavior
Sanitizer (ubsan) and Profile Guided Optimization.

ASan is a fast memory error detector. It can detect the following types
of bugs:

    Out-of-bounds accesses to heap, stack and globals
    Use-after-free
    Use-after-return (to some extent)
    Double-free, invalid free
    Memory leaks (experimental)

Typical slowdown introduced by AddressSanitizer is 2x.

UBSan is a fast and compatible undefined behavior checker. It enables a
number of undefined behavior checks that have small runtime cost and no
impact on address space layout or ABI.

PLEASE NOTE: the sanitizers still have some rough edges on FreeBSD,
particularly on i386.  These will hopefully be smoothed out in the
coming time.

Differential Revision: https://reviews.freebsd.org/D1505
2015-01-13 19:54:47 +00:00
Poul-Henning Kamp
c05bafc566 Deorbit the IEEE-488/GPIB support. 2014-12-25 20:15:13 +00:00
Ed Maste
3194293903 Build infrastructure for elftoolchain tools
Set WITH_ELFTOOLCHAIN_TOOLS in src.conf to use the elftoolchain version
of the following tools:

 * addr2line
 * elfcopy (strip / mcs)
 * nm
 * size
 * strings

Reviewed by:	bapt (earlier version)
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D1224
2014-12-01 17:49:42 +00:00
Rui Paulo
f12128e4df Import libgpio.
This is a thin wrapper around the kernel interface which should make
it easier to write GPIO applications.  gpioctl(8) will be converted to
use this library in a separate commit.

Differential Revision:	https://reviews.freebsd.org/D1183
Reviewed by:	adrian, loos
Discussed on:	arm@, embedded@
Relnotes:	yes
2014-11-24 21:49:40 +00:00
Baptiste Daroussin
362492e53e Promote SQLite3 as a privatelib as it will also be used by mandoc
While here ensure sqlite3 is using pread(2) and enable the suppot for FTS4
2014-11-22 19:44:49 +00:00
Devin Teske
7fc89952f1 Re-enable dpv(1,3): Introduced via r274116; temporarily disabled
shortly thereafter via r274124 until I could get the right recipe
down w/respect to SUBDIR_DEPEND.

Thanks to:      ngie, ian
Reviewed by:    ian
MFC after:      21 days
X-MFC-to:       stable/10 stable/9
X-MFC-with:     274116 274120 274121 274123 274144 274146
2014-11-06 19:28:01 +00:00
Devin Teske
2d0439fab9 Upon second-thought (following r274144), remove spurious (unused)
line-noise (libdialog never lived in lib/ -- but rather the noise
came from translating a comment that was introduced 16 years ago
via r40306; translation from comment to code occurred via r267511).

MFC after:	3 days
Reviewed by:	ngie
X-MFC-to:	stable/10
2014-11-06 01:46:33 +00:00
Devin Teske
4bfabf1404 Fix code-typo; introduced by r267511
MFC after:	3 days
X-MFC-to:	stable/10
2014-11-05 19:54:14 +00:00
Devin Teske
39341fd090 Temporarily _disable_ compilation of dpv(3) and dpv(1).
Will revisit this to find out how to solve the ordering
issue in buildworld (potentially `make -j' specific).

Reviewed by:	shurd
2014-11-05 02:58:02 +00:00
Devin Teske
041394f38a Add new libraries/utilities for data throughput visualization.
dpv(3): dialog progress view library
dpv(1): stream data from stdin or multiple paths with dialog progress view
figpar(3): configuration file parsing library

Reviews:	D714
Reviewed by:	jelischer, shurd
Discussed at:	MeetBSD California 2014 Vendor/Dev Summit
Discussed on:	-current
MFC after:	21 days
X-MFC-to:	stable/10 stable/9
2014-11-04 23:46:01 +00:00
Marcel Moolenaar
d7790611c1 Hook libxo to the build.
Sponsored by:	Juniper Networks, Inc.
2014-10-23 23:14:23 +00:00
Warner Losh
b55e8e6e0d My previous commit exposed an issue as it fixed a different
issue. lib/atf isn't a prereq_lib, since it isn't required for other
libraries to build. Remove it. The old kludge of always building it
had effectively been retired. Since we don't want to build the
libraries with the tests when we're bootstrapping, invent
MK_TESTS_SUPPORT which normally defaults to the current MK_TESTS
value, except when explicitly defined. Make lib/atf depend on it being
yes. When building the libraries set MK_TESTS to no, and
MK_TESTS_SUPPORT to the current value of MK_TESTS so that later stages
of the build work correctly. This should fix (and does for me)
people's issues with parallel builds racing between lib/atf and
libexec/atf. Since lib/atf is built during the libraries phase, the
race disappears.
2014-10-22 03:39:11 +00:00
Xin LI
f972197651 Promote libevent to lib/ level and fold ftp-proxy into its parent Makefile.
This allows us to use libevent for other application in the future.

For now libevent is still INTERNALLIB and no shared library is installed.

MFC after:	1 month
2014-10-13 22:15:26 +00:00
Baptiste Daroussin
e806d5088b Make libohash a proper internallib instead of hidding it in m4
mandoc development seems to be also using ohash so prepare to share the code when
needed
2014-08-06 22:46:15 +00:00
Marcel Moolenaar
e7d939bda2 Remove ia64.
This includes:
o   All directories named *ia64*
o   All files named *ia64*
o   All ia64-specific code guarded by __ia64__
o   All ia64-specific makefile logic
o   Mention of ia64 in comments and documentation

This excludes:
o   Everything under contrib/
o   Everything under crypto/
o   sys/xen/interface
o   sys/sys/elf_common.h

Discussed at: BSDcan
2014-07-07 00:27:09 +00:00
Ian Lepore
a1c70d6943 Create a mechanism for providing fine-grained build order dependencies
during SUBDIR_PARALLEL builds.  This augments the coarse .WAIT mechanism,
which is still useful if you've got a situation such as "almost everything
depends on A and B".

Because the parallel subdir mechanism uses non-obvious mangling of
target names, which should probably remain a private detail of the
implementation, it's not easy to do things like "libfoo: libbar", so
instead the new mechanism lets you set a variable that lists dependencies:

  SUBDIR_DEPEND_libfoo= libgroodah libpouet

Note that while I'm using libraries as an example here, it really has
nothing to do with the generated library files.  This is really saying
"build in directory libfoo after building in the libgroodah and libpouet
directories."

This updates lib/Makefile with dependency information based on the old
almost-accurate comment block and by combing through lib/* makefiles
looking for LDADD dependencies to other libraries within lib/*.

Reviewed by:	Jia-Shiun Li <jiashiun@gmail.com>
2014-06-15 13:45:37 +00:00
Hans Petter Selasky
36716419f3 Attach the CUSE library and kernel module to the default FreeBSD
builds. Bump the FreeBSD version number.
2014-06-13 08:53:49 +00:00
Warner Losh
b8fffe166d Sprinkle a few more .WAITs into the mix after csu, libc, msun and the
early built libraries. This should be sufficient for most cases and
has eliminated the issues I've seen with high -j builds. Races likely
still remain, but this knocks the problem down a notch.
2014-05-10 16:39:00 +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
Jilles Tjoelker
fc57f9bb5a lib: Remove duplicate SUBDIR libnv.
With SUBDIR_PARALLEL, duplicates in ${SUBDIR} cause harmless but verbose
warnings.
2014-04-05 19:48:19 +00:00
Dimitry Andric
54ff5d7323 Add a SUBDIR_PARALLEL option to bsd.subdir.mk, to allow make to process
all the SUBDIR entries in parallel, instead of serially.  Apply this
option to a selected number of Makefiles, which can greatly speed up the
build on multi-core machines, when using make -j.

This can be extended to more Makefiles later on, whenever they are
verified to work correctly with parallel building.

I tested this on a 24-core machine, with make -j48 buildworld (N = 6):

                before    stddev       after    stddev
                =======   ======       =======  ======
real time        1741.1     16.5         959.8     2.7
user time       12468.7     16.4       14393.0    16.8
sys  time        1825.0     54.8        2110.6    22.8

(user+sys)/real     8.2                   17.1

E.g. the build was approximately 45% faster in real time.  On machines
with less cores, or with lower -j settings, the speedup will not be as
impressive.  But at least you can now almost max out a machine with
buildworld!

Submitted by:	jilles
MFC after:	2 weeks
2014-03-26 22:30:38 +00:00
Gleb Smirnoff
2c284d9395 Remove IPX support.
IPX was a network transport protocol in Novell's NetWare network operating
system from late 80s and then 90s. The NetWare itself switched to TCP/IP
as default transport in 1998. Later, in this century the Novell Open
Enterprise Server became successor of Novell NetWare. The last release
that claimed to still support IPX was OES 2 in 2007. Routing equipment
vendors (e.g. Cisco) discontinued support for IPX in 2011.

Thus, IPX won't be supported in FreeBSD 11.0-RELEASE.
2014-03-14 02:58:48 +00:00
Adrian Chadd
81bd3d89e8 Add 'libstatfoo' from Sam Leffler. 2014-03-06 04:06:36 +00:00
Baptiste Daroussin
d0bfcaf83e Remove libyaml, it has been replaced by libucl 2014-02-23 22:27:14 +00:00
Baptiste Daroussin
4ca4d6a814 Branch libucl to the build 2014-02-23 21:50:11 +00:00
Pawel Jakub Dawidek
42a8595256 Please welcome casperd daemon. It (and its services) will be responsible for
giving access to functionality that is not available in capability mode
sandbox. The functionality can be precisely restricted.

Start with the following services:
- system.dns - provides API compatible to:
	- gethostbyname(3),
	- gethostbyname2(3),
	- gethostbyaddr(3),
	- getaddrinfo(3),
	- getnameinfo(3),
- system.grp - provides getgrent(3)-compatible API,
- system.pwd - provides getpwent(3)-compatible API,
- system.random - allows to obtain entropy from /dev/random,
- system.sysctl - provides sysctlbyname(3-compatible API.

Sponsored by:	The FreeBSD Foundation
2013-12-02 08:21:28 +00:00
Pawel Jakub Dawidek
2f02600abf Move my simple logging API to a separate library. It is now already used
by hastctl(8), hastd(8) and auditdistd(8) and will soon be also used
by casperd(8) and its services. There is no documentation and pjdlog.h
header file is not installed in /usr/include/ to keep it private.
Unfortunately we don't have /lib/private/ at this point, only
/usr/lib/private/, so the library is installed in /lib/.

Sponsored by:	The FreeBSD Foundation
2013-12-01 09:41:06 +00:00
Peter Wemm
091b8336ae Attempt to move the POSIX iconv* symbols out of runtime linker space.
FreeBSD systems usually implemented this as a third party module and
our implementation hasn't played as nicely with the old way as it could
have.

To that end:
* Rename the iconv* symbols in libc.so.7 to have a __bsd_ prefix.
* Provide .symver compatability with existing 10.x+ binaries that
  referenced the iconv symbols. All existing binaries should work.
* Like on Linux/glibc systems, add a libc_nonshared.a to the ldscript
  at /usr/lib/libc.so.
* Move the "iconv*" wrapper symbols to libc_nonshared.a

This should solve the runtime ambiguity about which symbols resolve
to where.  If you compile against the iconv in libc, your runtime
dependencies will be unambiguous.

Old 9.x libraries and binaries will always resolve against their
libiconv.so.3 like they did on 9.x.  They won't resolve against libc.

Old 10.x binaries will be satisified by the .symver helpers.

This should allow ports to selectively compile against the libiconv
port if needed and it should behave without ambiguity now.

Discussed with:	 kib
2013-11-17 22:52:17 +00:00
Pawel Jakub Dawidek
36da5199bb Bring in libnv library for managing name/value pairs. The following types
are currently supported:

- NV_TYPE_NULL - only name, no data;
- NV_TYPE_BOOL - boolean (true or false);
- NV_TYPE_NUMBER - 64bit unsigned integer;
- NV_TYPE_STRING - C string;
- NV_TYPE_NVLIST - nested nvlist;
- NV_TYPE_DESCRIPTOR - file descriptor;
- NV_TYPE_BINARY - binary data.

For detailed documentation and examples see nv(3) manual page.

Sponsored by:	The FreeBSD Foundation
2013-11-12 19:39:14 +00:00
Julio Merino
cc21b86f50 Install category Kyuafiles from their category directories.
Move the installation of /usr/tests/lib/Kyuafile from src/tests/lib/
to src/lib/.  This is to keep the src/tests/ hierarchy unaware of the
rest of the tree, which makes things clearer in general.  In particular:

1) Everything related to the construction of /usr/tests/lib/ is kept
   in src/lib/.  There is no need to think about different directories
   and how they relate to each other.  (The same applies for libexec,
   usr.bin, etc. but these are not yet handled.)

2) src/tests becomes the place to keep cross-functional test programs
   and nothing else, which also helps in simplifying things.

Reviewed by:	freebsd-testing
Approved by:	rpaulo (mentor)
2013-11-08 14:29:06 +00:00
Julio Merino
e01d128a42 Subsume the functionality of MK_ATF into MK_TESTS.
There is no reason to keep the two knobs separate: if tests are
enabled, the ATF libraries are required; and if tests are disabled,
the ATF libraries are not necessary.  Keeping the two just serves
to complicate the build.

Reviewed by:	freebsd-testing
Approved by:	rpaulo (mentor)
2013-11-08 14:24:47 +00:00
Peter Wemm
912ce912e1 Remove the WITH_LIBICONV_COMPAT hack that seems to do more harm than
good.  This caused libc to spoof the ports libiconv namespace and
provide a colliding libiconv.so.3 to fool rtld.  This should have
been removed some time ago.
2013-11-03 19:04:57 +00:00
Dag-Erling Smørgrav
56b72efe82 Remove BIND.
Approved by:	re (gjb)
2013-09-30 17:23:45 +00:00
Dag-Erling Smørgrav
71b5e1bb76 Move libldns to the correct (ordered) library list.
Approved by:	re (blanket)
2013-09-15 15:55:21 +00:00
Dag-Erling Smørgrav
8f8790cdf4 Build and install the Unbound caching DNS resolver daemon.
Approved by:	re (blanket)
2013-09-15 14:51:23 +00:00
Ed Maste
4b1fb8ff16 Connect libexecinfo to the build
Sponsored by:	DARPA, AFRL
2013-09-03 15:22:04 +00:00
Peter Wemm
0ff204bbd1 The iconv in libc did two things - implement the standard APIs, the GNU
extensions and also tried to be link time compatible with ports libiconv.
This splits that functionality and enables the parts that shouldn't
interfere with the port by default.

WITH_ICONV (now on by default) - adds iconv.h, iconv_open(3) etc.
WITH_LIBICONV_COMPAT (off by default) adds the libiconv_open etc API, linker
symbols and even a stub libiconv.so.3 that are good enough to be able
to 'pkg delete -f libiconv' on a running system and reasonably expect it
to work.

I have tortured many machines over the last few days to try and reduce
the possibilities of foot-shooting as much as I can.  I've successfully
recompiled to enable and disable the libiconv_compat modes, ports that use
libiconv alongside system iconv etc.  If you don't enable the
WITH_LIBICONV_COMPAT switch, they don't share symbol space.

This is an extension of behavior on other system.  iconv(3) is a standard
libc interface and libiconv port expects to be able to run alongside it on
systems that have it.

Bumped osreldate.
2013-08-13 07:15:01 +00:00
Davide Italiano
237abf0c56 - Trim an unused and bogus Makefile for mount_smbfs.
- Reconnect with some minor modifications, in particular now selsocket()
internals are adapted to use sbintime units after recent'ish calloutng
switch.
2013-06-28 21:00:08 +00:00
Brooks Davis
7be2362060 Wrap the creation of the ../include link in /usr/lib in
!defined(LIBRARIES_ONLY) so it is only created once on architectures
with 32-bit compat support.

Replace ln -fhs with ${INSTALL_SYMLINK} to the link is logged in the
METALOG.
2013-04-30 18:14:22 +00:00
Tim Kientzle
eb012e1c4c An even more refined version of r249484, until we can come up with
a good fix for the -print-file-name=include breakage.

As suggested by Andrey Chernov.
2013-04-19 05:13:57 +00:00
Tim Kientzle
463f397c4e Fix the symlink creation from r249484 so that repeated
installs work correctly.

Suggested by Tijl Coosemans.
2013-04-19 05:01:14 +00:00
Tim Kientzle
7c83e4431a Install a symlink
/usr/lib/include ==> /usr/include

This fixes -print-file-name=include in clang (and is
arguably a better way to fix the same issue in GCC than
the change I made in r231336).

MFC after:	1 week
2013-04-14 19:13:51 +00:00
Baptiste Daroussin
e51c53f366 Import libyaml as libbsdyml (private brand name)
LibYAML is a YAML 1.1 parser and emitter under MIT license which will
soon be used by the pkg boostrap (usr.bin/pkg) and bhyve

Reviewed by:	roberto, antoine
2013-03-04 11:27:41 +00:00
Dag-Erling Smørgrav
7b5038d71c Import LDNS and build it as an internal library. 2013-02-15 13:44:18 +00:00
Dag-Erling Smørgrav
35e370a2d5 Sort by MK_* knob like the comment says
MFC after:	1 week
2013-02-04 19:05:53 +00:00
Neel Natu
46b1c55d9e IFC @ r244983. 2013-01-04 19:28:32 +00:00
Nathan Whitehorn
c857d06af7 With the old sade removed, libdisk is no longer used by anything in HEAD
and uses a number of problematic pre-gpart interfaces. Since it has been
entirely obsoleted by interfaces in geom, remove it.
2012-12-30 16:28:06 +00:00
Brooks Davis
6bea876644 Add libnetbsd, a thin compatibility layer intended to allow a limited
set of NetBSD software to compile as part of the FreeBSD build with
little or no modifiction.  It is built as a static library and not
installed for general use.  Likewise, its header files are not
installed.

Sponsored by:	DARPA, AFRL
2012-12-21 20:37:38 +00:00
Neel Natu
7d3d462b09 IFC @ r242940 2012-11-13 07:39:05 +00:00
Neel Natu
a10c6f5544 IFC @ r242684 2012-11-11 03:26:14 +00:00
Justin Hibbits
c757049235 Implement DTrace for PowerPC. This includes both 32-bit and 64-bit.
There is one known issue:  Some probes will display an error message along the
lines of:  "Invalid address (0)"

I tested this with both a simple dtrace probe and dtruss on a few different
binaries on 32-bit.  I only compiled 64-bit, did not run it, but I don't expect
problems without the modules loaded.  Volunteers are welcome.

MFC after:	1 month
2012-11-07 23:45:09 +00:00
Marcel Moolenaar
c175365cec Add ATF to the build. This is may be a bit rought around the egdes,
but committing it helps to get everyone on the same page and makes
sure we make progress.

Tinderbox breakages that are the result of this commit are entirely
the committer's fault -- in other words: buildworld testing on amd64
only.

Credits follow:

Submitted by:	Garrett Cooper <yanegomi@gmail.com>
Sponsored by:	Isilon Systems
Based on work by:	keramida@
Thanks to:	gnn@, mdf@, mlaier@, sjg@
Special thanks to:	keramida@
2012-10-22 01:18:41 +00:00
Ulrich Spörlein
cc4842a1c7 Apply local patches to mandoc and connect it to the build.
- adds a couple more library strings used in the tree
- changes some more to the current groff spelling
- changes page footer to match groff style
2012-10-20 10:06:38 +00:00
Attilio Rao
2e564269d0 Disconnect non-MPSAFE SMBFS from the build in preparation for dropping
GIANT from VFS. In addition, disconnect also netsmb, which is a base
requirement for SMBFS.

In the while SMBFS regular users can use FUSE interface and smbnetfs
port to work with their SMBFS partitions.

Also, there are ongoing efforts by vendor to support in-kernel smbfs,
so there are good chances that it will get relinked once properly locked.

This is not targeted for MFC.
2012-10-18 12:04:56 +00:00
Attilio Rao
e6116d5b8e Disconnect non-MPSAFE NWFS from the build in preparation for dropping
GIANT from VFS. In addition, disconnect also netncp, which is a base
requirement for NWFS.

In the possibility of a future maintenance of the code and later
readd to the FreeBSD base, maybe we should think about a better location
for netncp. I'm not entirely sure the / top location is actually right,
however I will let network people to comment on that more specifically.

This is not targeted for MFC.
2012-10-17 11:16:17 +00:00
Peter Grehan
b652778e42 IFC @ r238370 2012-07-11 19:54:21 +00:00
Grzegorz Bernacki
7f725bcd5c Import work done under project/nand (@235533) into head.
The NAND Flash environment consists of several distinct components:
  - NAND framework (drivers harness for NAND controllers and NAND chips)
  - NAND simulator (NANDsim)
  - NAND file system (NAND FS)
  - Companion tools and utilities
  - Documentation (manual pages)

This work is still experimental. Please use with caution.

Obtained from: Semihalf
Supported by:  FreeBSD Foundation, Juniper Networks
2012-05-17 10:11:18 +00:00
Jeremie Le Hen
6486b015fc Import stdbuf(1) and the shared library it relies on.
This tool changes the default buffering behaviour of standard
stdio streams.

It only works on dynamic binaries.  To make it work for static
ones it would require cluttering stdio because there no single
entry point.

PR:		166660
Reviewed by:	current@, jhb
Approved by:	kib (mentor)
MFC after:	1 week
2012-04-28 20:52:20 +00:00
Peter Grehan
38f1b189cd IFC @ r234692
sys/amd64/include/cpufunc.h
sys/amd64/include/fpu.h
sys/amd64/amd64/fpu.c
sys/amd64/vmm/vmm.c

 - Add API to allow vmm FPU state init/save/restore.

FP stuff discussed with: kib
2012-04-26 07:52:28 +00:00
Oleksandr Tymoshenko
07d39325d6 Build libproc and librtld_db for MIPS 2012-03-24 05:18:27 +00:00
Stanislav Sedov
0e46933c08 - Do not build libcom_err and compile_et when kerberos is disabled. They
depends on several heimdal libraries and not used by anything but kerberos
  tools.
2012-03-23 03:16:35 +00:00
Sean Bruno
80dbff4e99 IFC to head to catch up the bhyve branch
Approved by:	grehan@
2012-01-04 02:01:27 +00:00
Robert Watson
719728bf11 Fix typo in Makefile comment.
MFC after:	3 days
2011-12-30 10:45:00 +00:00
Ed Schouten
fc6f0665ba Add libstdthreads.
This library implements the C11 threads interface on top of the pthreads
library.  As discussed on the lists, the preferred way to implement
this, is as a separate library.

It is unlikely that these functions will be used a lot in the future. It
would have been easier if the C11 working group standardized (a subset
of) pthreads and clock_nanosleep(). Having it as a separate library
allows the embedded people to omit it from their system.

Discussed on:	arch@, threads@
2011-12-26 21:51:53 +00:00
Dimitry Andric
49c8e5e77e Fix breakage after r227983; lib/libcxxrt still got built, because it was
not disabled in the usual way (by adding it to __DEFAULT_NO_OPTIONS in
share/mk/bsd.own.mk), and because the test for MK_LIBCPLUSPLUS in
Makefile.inc1 was incorrect.

Pointy hat to:	dim
2011-11-26 03:26:06 +00:00
David Chisnall
7a98470824 Import libc++ / libcxxrt into base. Not build by default yet (use
MK_LIBCPLUSPLUS=yes to enable).  This is a work-in-progress.  It works for
me, but is not guaranteed to work for anyone else and may eat your dog.

To build C++ using libc++, add -stdlib=libc++ to your CXX and LD flags.

Bug reports welcome, bug fixes even more welcome...

Approved by:	dim (mentor)
2011-11-25 20:59:04 +00:00
Peter Grehan
70d8f36aa4 IFC @ r226824 2011-10-27 04:56:53 +00:00
Nathan Whitehorn
b2e855ac7a Now that its only consumer is gone (sysinstall), remove libftpio as well. 2011-10-03 20:49:02 +00:00
Jung-uk Kim
987db71f3a Remove a redundant check for libncp.
Submitted by:	Alexander Sack (asack at niksun dot com)
2011-10-03 18:05:51 +00:00
Peter Grehan
87c3644c64 IFC @ r222256 2011-05-24 15:39:34 +00:00
Florent Thoumie
2eb4b00cbb Backout libinstall.a -> libpkg commit.
Discussed with:	erwin, brooks, bapt
2011-05-17 19:11:47 +00:00
John Baldwin
b67e81db43 First cut to port bhyve, vmmctl, and libvmmapi to HEAD. 2011-05-15 04:03:11 +00:00
Peter Grehan
366f60834f Import of bhyve hypervisor and utilities, part 1.
vmm.ko - kernel module for VT-x, VT-d and hypervisor control
  bhyve  - user-space sequencer and i/o emulation
  vmmctl - dump of hypervisor register state
  libvmm - front-end to vmm.ko chardev interface

bhyve was designed and implemented by Neel Natu.

Thanks to the following folk from NetApp who helped to make this available:
	Joe CaraDonna
	Peter Snyder
	Jeff Heller
	Sandeep Mann
	Steve Miller
	Brian Pawlowski
2011-05-13 04:54:01 +00:00
Stanislav Sedov
0daf62d9f5 - Commit work from libprocstat project. These patches add support for runtime
file and processes information retrieval from the running kernel via sysctl
  in the form of new library, libprocstat.  The library also supports KVM backend
  for analyzing memory crash dumps.  Both procstat(1) and fstat(1) utilities have
  been modified to take advantage of the library (as the bonus point the fstat(1)
  utility no longer need superuser privileges to operate), and the procstat(1)
  utility is now able to display information from memory dumps as well.

  The newly introduced fuser(1) utility also uses this library and able to operate
  via sysctl and kvm backends.

  The library is by no means complete (e.g. KVM backend is missing vnode name
  resolution routines, and there're no manpages for the library itself) so I
  plan to improve it further.  I'm commiting it so it will get wider exposure
  and review.

  We won't be able to MFC this work as it relies on changes in HEAD, which
  was introduced some time ago, that break kernel ABI.  OTOH we may be able
  to merge the library with KVM backend if we really need it there.

Discussed with:	rwatson
2011-05-12 10:11:39 +00:00
Gabor Kovesdan
ad30f8e79b Add the BSD-licensed Citrus iconv to the base system with default off
setting. It can be built by setting the WITH_ICONV knob. While this
knob is unset, the library part, the binaries, the header file and
the metadata files will not be built or installed so it makes no impact
on the system if left turned off.

This work is based on the iconv implementation in NetBSD but a great
number of improvements and feature additions have been included:

- Some utilities have been added. There is a conversion table generator,
  which can compare conversion tables to reference data generated by
  GNU libiconv. This helps ensuring conversion compatibility.
- UTF-16 surrogate support and some endianness issues have been fixed.
- The rather chaotic Makefiles to build metadata have been refactored
  and cleaned up, now it is easy to read and it is also easier to add
  support for new encodings.
- A bunch of new encodings and encoding aliases have been added.
- Support for 1->2, 1->3 and 1->4 mappings, which is needed for
  transliterating with flying accents as GNU does, like "u.
- Lots of warnings have been fixed, the major part of the code is
  now WARNS=6 clean.
- New section 1 and section 5 manual pages have been added.
- Some GNU-specific calls have been implemented:
  iconvlist(), iconvctl(), iconv_canonicalize(), iconv_open_into()
- Support for GNU's //IGNORE suffix has been added.
- The "-" argument for stdin is now recognized in iconv(1) as per POSIX.
- The Big5 conversion module has been fixed.
- The iconv.h header files is supposed to be compatible with the
  GNU version, i.e. sources should build with base iconv.h and
  GNU libiconv. It also includes a macro magic to deal with the
  char ** and const char ** incompatibility.
- GNU compatibility: "" or "char" means the current local
  encoding in use
- Various cleanups and style(9) fixes.

Approved by:	delphij (mentor)
Obtained from:	The NetBSD Project
Sponsored by:	Google Summer of Code 2009
2011-02-25 00:04:39 +00:00
Ed Schouten
39cd938c39 Replace libgcc.a by libcompiler_rt.a.
libcompiler_rt.a is a BSD licensed C language runtime, which implements
many routines which are linked into binaries on architectures where
certain functionality is missing (e.g. 64 bits mul/div on i386).

Unfortunately, libcompiler_rt cannot replace libgcc entirely. Certain
features, such as an unwinder for exception handling, are missing.
That's why only libgcc.a is replaced for now, because this one does seem
to be complete.

Tested by:	rene (amd64), nwhitehorn (powerpc), droso (i386 exprun)
		and many others. Thanks!
Obtained from:	user/ed/compiler-rt
2010-11-11 15:48:27 +00:00
Nathan Whitehorn
b12277d1d4 Repair some build breakage introduced in r211725 and garbage collect some
code made obsolete in the same commit.
2010-08-28 15:03:11 +00:00
Warner Losh
2bef81cf3a Change the logic here to match Makefile.inc1. Having it in two places
suggests an opportunity for refactoring :)

Submitted by:	nathanw@
2010-08-24 16:35:26 +00:00
Warner Losh
25faff346c MFtbemd:
Prefer MACHNE_CPUARCH to MACHINE_ARCH in most contexts where you want
to test of all the CPUs of a given family conform.
2010-08-23 22:24:11 +00:00
Rui Paulo
fb05b66676 Build librtld_db.
Sponsored by:	The FreeBSD Foundation
2010-07-31 16:12:47 +00:00
Rui Paulo
a2d3d1e267 Simplify the Makefile. The i386 and amd64 sections are equal.
Sponsored by:	The FreeBSD Foundation
2010-07-31 14:53:43 +00:00
Rui Paulo
54bb94d764 libproc is going to be i386/amd64 only with the next update.
Sponsored by:	The FreeBSD Foundation
2010-07-31 14:52:29 +00:00
Nathan Whitehorn
7f503b5731 Build libsmb should be on powerpc64 as well. 2010-07-12 00:56:35 +00:00
Ed Schouten
bfc72ed568 Don't build Clang libs during lib32 build.
This should massively reduce the buildworld time on amd64.

Pointy hat to:	me
2010-06-21 19:44:29 +00:00
Roman Divacky
6513cfc82f Hook clang into the build on i386/amd64/powerpc.
Approved by:	ed (mentor)
2010-06-09 19:57:20 +00:00
Martin Matuska
3829a73468 MFC r207842, r207844, r208099:
MFC r207842:
Import of liblzma, xz, xzdec, lzmainfo from vendor branch
Add support for xz and lzma to lesspipe.sh (xzless, lzless)

MFC r207844:
Add two public headers missing in r207842
Adjust CFLAGS for lzmainfo, xz, xzdec

MFC r208099:
Add versioned symbols to liblzma
Use default SHLIB_MAJOR.

Approved by:	delphij (mentor)
2010-05-18 09:59:09 +00:00
Martin Matuska
379e47715a MFC r204738, r205113 (imp):
MFC r204738:
Remove stale references to libkrb5.
Rejigger the SUBDIR setting a smidge: we now set all the libraries that depend
on something else, and then SUBDIR+= the rest.

MFC r205113:
Make this conform to the other top-level Makefile subdir listings with
one file per line.

Approved by:	delphij (mentor)
2010-05-18 00:46:15 +00:00
Martin Matuska
81ad83880d Import of liblzma, xz, xzdec, lzmainfo from vendor branch
Add support for xz and lzma to lesspipe.sh (xzless, lzless)
Bump __FreeBSD_version

Approved by:	delphij (mentor)
MFC after:	2 weeks
2010-05-10 06:59:50 +00:00
Florent Thoumie
762c7db2e8 - Take libinstall.a out of pkg_install and make it a proper shared library.
- Rework the wrapper support to check libpkg version as well as pkg_install
version.
- Add libfetch to _prebuild_libs.
- There are no new features introduced.

Notes: the API is not stable, so basically, do not use libpkg in your
projects for now. Also there's no manpage for libpkg yet, because the API
will change drastically. I repeat, do not use libpkg for now.
2010-04-23 11:07:43 +00:00
Warner Losh
9b3e440b20 Make this conform to the other top-level Makefile subdir listings with
one file per line.

Suggested by: bde
2010-03-13 03:06:48 +00:00
Warner Losh
eae951c920 Remove stale references to libkrb5.
Rejigger the SUBDIR setting a smidge: we now set all the libraries that depend
on something else, and then SUBDIR+= the rest.

A separate commit will fix the SUBDIR style to be the same as the rest
of the tree.
2010-03-04 22:01:11 +00:00
Xin LI
aa3d547d09 MFC x86emu/x86bios emulator and make previously i386 only dpms and vesa
framebuffer driver, etc. work on FreeBSD/amd64.

A significant amount of improvements were done by jkim@ during the recent
months to make vesa(4) work better, over the initial code import.  This
work is based on OpenBSD's x86emu implementation and contributed by
paradox <ddkprog yahoo com> and swell.k at gmail com.

Hopefully I have stolen all their work to 8-STABLE :)

All bugs in this commit are mine, as usual.
2010-03-02 01:56:55 +00:00
Marcel Moolenaar
eb0a7e4130 Introduce libefi -- a library around EFI runtime services and protocols.
This first commit brings 3 functions for enumerating, retrieving,
adding, removing and modifying EFI variables. The immediate use of these
include the insertion of a new boot option as part of the installation
process.

This library uses ioctl(2) requests implemented by io(4) to pass the
requests down through the kernel to EFI. These ioctl requests are only
implemented on ia64, so libefi is currently only enabled on ia64. The
interface is generic and io(4) on mad64/i386 can easily be taught to
handle these once EFI support has been added to the kernel there.
2010-01-30 04:24:03 +00:00
Pyun YongHyeon
69618fcf1f Connect smbfs related libraries and tool on sparc64.
Reviewed by:	marius
2010-01-25 18:52:47 +00:00
Ed Schouten
84bee0d7fb Remove libulog from the bootstrap again.
libulog now only provides functions that are used by various packages
from the ports tree, namely the libutempter ones. There is no reason to
link it into the crunch/fixit binaries anymore.
2010-01-21 16:56:27 +00:00
Ed Schouten
17c79ad08c Convert pam_lastlog(8) to libulog.
The information used by the "Last login:"-line is obtained by using
ulog_setutxfile(3) to switch to the lastlog database. Login and logout
are performed using the utility functions ulog_login(3) and
ulog_logout(3).

This also means we must build libulog during bootstrap.

Approved by:	des
2009-12-11 14:15:55 +00:00
Ed Schouten
2208eadf43 Add a new library: libulog.
One of the things I really want to do, is to get rid of the limitations
of our current utmp(5) mechanism:

- It only allows 8 byte TTY device names.
- The hostname only allows 16 bytes of storage.

I'm not a big fan of <utmpx.h>, but I think we should at least try to
add parts of it. Unfortunately we cannot implement <utmpx.h>, because we
miss various fields, such as ut_id, ut_pid, etc. The API provided by
libulog shares some similarities with <utmpx.h>, so it shouldn't be too
hard to port these applications eventually. In most simple cases, it
should just be a matter of removing the ulog_ prefix everywhere.

As a bonus, it also implements a function called ulog_login_pseudo(),
which allows unprivileged applications to write log entries, provided
they have a valid file descriptor to a pseudo-terminal master device.

libulog will allow a smoother transition to a new file format by adding
a library interface to deal with utmp/wtmp/lastlog files. I initially
thought about adding the functionality to libutil, but because I'm not
planning on keeping this library around forever, we'd better keep it
separated.

Next items on the todo list:

1. Port applications in the base system (and ports) to libulog, instead
   of letting them use <utmp.h>.
2. Remove <utmp.h>, implement <utmpx.h> and reimplement this library on
   top.
3. Port as many applications as possible back to <utmpx.h>.
2009-12-03 15:48:24 +00:00
Xin LI
ee5e90dab2 - Teach vesa(4) and dpms(4) about x86emu. [1]
- Add vesa kernel options for amd64.
 - Connect libvgl library and splash kernel modules to amd64 build.
 - Connect manual page dpms(4) to amd64 build.
 - Remove old vesa/dpms files.

Submitted by:	paradox <ddkprog yahoo com> [1], swell k at gmail.com
		(with some minor tweaks)
2009-09-09 09:50:31 +00:00
Jamie Gritton
de6f37045c Add libjail, a (somewhat) simpler interface to the jail_set and jail_get
system calls and the security.jail.param sysctls.

Approved by:	bz (mentor)
2009-06-24 18:18:35 +00:00
Andrew Thompson
6df5593410 Commit missed file in r189587, update directory name for libusb.
Spotted by:	rdivacky
2009-03-09 17:38:14 +00:00
Robert Watson
7a0a89d2cb Merge OpenBSM alpha 4 from OpenBSM vendor branch to head, both
contrib/openbsm (svn merge) and src/sys/{bsm,security/audit} (manual
merge).  Add libauditd build parts and add to auditd's linkage;
force libbsm to build before libauditd.

OpenBSM history for imported revisions below for reference.

MFC after:      1 month
Sponsored by:   Apple Inc.
Obtained from:  TrustedBSD Project

OpenBSM 1.1 alpha 4

- With the addition of BSM error number mapping, we also need to map the
  local error number passed to audit_submit(3) to a BSM error number,
  rather than have the caller perform that conversion.
- Reallocate user audit events to avoid collisions with Solaris; adopt a
  more formal allocation scheme, and add some events allocated in Solaris
  that will be of immediate use on other platforms.
- Add an event for Calife.
- Add au_strerror(3), which allows generating strings for BSM errors
  directly, rather than requiring applications to map to the local error
  space, which might not be able to entirely represent the BSM error
  number space.
- Major auditd rewrite for launchd(8) support.  Add libauditd library
  that is shared between launchd and auditd.
- Add AUDIT_TRIGGER_INITIALIZE trigger (sent via 'audit -i') for
  (re)starting auditing under launchd(8) on Mac OS X.
- Add 'current' symlink to active audit trail.
- Add crash recovery of previous audit trail file when detected on audit
  startup that it has not been properly terminated.
- Add the event AUE_audit_recovery to indicated when an audit trail file
  has been recovered from not being properly terminated.  This event is
  stored in the new audit trail file and includes the path of recovered
  audit trail file.
- Mac OS X and FreeBSD dependent code in auditd.c is separated into
  auditd_darwin.c and auditd_fbsd.c files.
- Add an event for the posix_spawn(2) and fsgetpath(2) Mac OS X system
  calls.
- For Mac OS X, we use ASL(3) instead of syslog(3) for logging.
- Add support for NOTICE level logging.

OpenBSM 1.1 alpha 3

- Add two new functions, au_bsm_to_errno() and au_errno_to_bsm(), to map
  between BSM error numbers (largely the Solaris definitions) and local
  errno(2) values for 32-bit and 64-bit return tokens.  This is required
  as operating systems don't agree on some of the values of more recent
  error numbers.
- Fix a bug how au_to_exec_args(3) and au_to_exec_env(3) calculates the
  total size for the token.  This buge.
- Deprecated Darwin constants, such as TRAILER_PAD_MAGIC, removed.
2008-12-31 11:12:24 +00:00
Alfred Perlstein
6f0e1ffd07 src/sys/dev/usb2/controller/uss820dci_pccard.c
src/sys/dev/usb2/core/usbdevs
src/sys/dev/usb2/include/urio2_ioctl.h
src/sys/dev/usb2/storage/ustorage2_fs.h

These files are not used any more.

src/usr.sbin/Makefile
src/etc/mtree/BSD.include.dist
src/include/Makefile
src/lib/Makefile
src/share/man/man7/hier.7
src/share/mk/bsd.libnames.mk
src/etc/mtree/BSD.include.dist

Make "usbconfig" and "libusb20" a part of the default build.

src/sys/dev/usb/rio500_usb.h
src/sys/dev/usb2/storage/urio2.c

Use common include file.

src/sys/dev/usb2/bluetooth/ng_ubt2.c

Make USB bluetooth depend on "ng_hci" module.

src/sys/dev/usb2/controller/ehci2.c
src/sys/dev/usb2/controller/ehci2.h

Patches for Marvell EHCI.

src/sys/dev/usb2/core/usb2_busdma.c

Bugfix for 64-bit platforms. Need to unload the previously loaded DMA
map and some cleanup regarding some corner cases.

src/sys/dev/usb2/core/usb2_core.h
src/sys/dev/usb2/core/usb2_dev.c
src/sys/dev/usb2/core/usb2_dev.h

Bugfix for libusb filesystem interface.

New feature: Add support for filtering device data at the expense of the
userland process.

Add some more comments.

Some minor code styling.

Remove unused function, usb2_fifo_get_data_next().

Fix an issue about "fifo_index" being used instead of "ep_index".

src/sys/dev/usb2/core/usb2_device.c
src/sys/dev/usb2/core/usb2_generic.c

Bugfix for Linux USB compat layer. Do not free non-generic FIFOs when
doing an alternate setting.

Cleanup USB IOCTL and USB reference handling.
Fix a corner case where USB-FS was left initialised after
setting a new configuration or alternate setting.

src/sys/dev/usb2/core/usb2_hub.c

Improvement: Check all USB HUB ports by default at least one time.

src/sys/dev/usb2/core/usb2_request.c

Bugfix: Make sure destination ASCII string is properly zero terminated
in all cases.

Improvement: Skip invalid characters instead of replacing with a dot.

src/sys/dev/usb2/core/usb2_util.c
src/sys/dev/usb2/image/uscanner2.c

Spelling.

src/sys/dev/usb2/include/Makefile

Share "usbdevs" with the old USB stack.

src/sys/dev/usb2/include/usb2_devid.h
src/sys/dev/usb2/include/usb2_devtable.h

Regenerate files.

Alfred: Please fix the RCS tag at the top.

src/sys/dev/usb2/include/usb2_ioctl.h

Fix compilation of "kdump".

src/sys/dev/usb2/serial/ubsa2.c
src/sys/dev/usb2/serial/ugensa2.c

Remove device ID's which will end up in a new 3G driver.

src/sys/dev/usb2/sound/uaudio2.c

Correct a debug printout.

src/sys/dev/usb2/storage/umass2.c

Sync with old USB stack.

src/lib/libusb20/libusb20.3

Add more documentation.

src/lib/libusb20/libusb20.c

Various bugfixes and improvements.

src/usr.sbin/usbconfig/dump.c
src/usr.sbin/usbconfig/usbconfig.c

New commands for dumping strings and doing custom USB requests from
the command line.

Remove keyword requirements from generated files:
 "head/sys/dev/usb2/include/usb2_devid.h"
 "head/sys/dev/usb2/include/usb2_devtable.h"
2008-11-19 08:56:35 +00:00
Sam Leffler
690f477d75 add new build knobs and jigger some existing controls to improve
control over the result of buildworld and installworld; this especially
helps packaging systems such as nanobsd

Reviewed by:	various (posted to arch)
MFC after:	1 month
2008-09-21 22:02:26 +00:00
Doug Rabson
8f55a568f6 Add an implementation of the RPCSEC_GSS authentication protocol for RPC. This
is based on an old implementation from the University of Michigan with lots of
changes and fixes by me and the addition of a Solaris-compatible API.

Sponsored by:	Isilon Systems
Reviewed by:	alfred
2008-08-06 14:02:05 +00:00
Robert Watson
e4372ceba0 Remove netatm from HEAD as it is not MPSAFE and relies on the now removed
NET_NEEDS_GIANT.  netatm has been disconnected from the build for ten
months in HEAD/RELENG_7.  Specifics:

- netatm include files
- netatm command line management tools
- libatm
- ATM parts in rescue and sysinstall
- sample configuration files and documents
- kernel support as a module or in NOTES
- netgraph wrapper nodes for netatm
- ctags data for netatm.
- netatm-specific device drivers.

MFC after:	3 weeks
Reviewed by:	bz
Discussed with:	bms, bz, harti
2008-05-25 22:11:40 +00:00
John Birrell
0cb540ce61 Hook libdwarf and libproc into the build. 2008-05-22 04:22:43 +00:00
Jeff Roberson
34147e4308 - Remove libkse and related support code in libpthread from the build.
Don't remove the files yet.  Kernel support will be removed shortly.
2008-03-12 09:49:39 +00:00
Ruslan Ermilov
6dc51eca81 - Fix setting of MK_GSSAPI option by bsd.own.mk; its value should
default to the value of MK_KERBEROS unless set explicitly by
  WITH_GSSAPI/WITHOUT_GSSAPI.  (This introduces another type of
  MK_* variables which itself is questionable.)

- Teach tools/build/options/makeman script that generates the
  src.conf(5) manpage about the new type of MK_* variables.

- Fix broken logic in lib/Makefile.
2007-12-12 16:39:32 +00:00
Doug Barton
3fe21f77bc Hide the building and installation of libgssapi behind the
WITHOUT_KERBEROS knob. While GSS can be used for other things
some third party software (most notably ports/x11/kdelibs3)
takes the presence of libgssapi as an indication that kerberos
is available, and attempts to link with the kerberos libs. If
they are not available, the build will fail.

Because you might want to use GSS but not kerberos, add a knob
to re-enable it if WITHOUT_KERBEROS is present.

Document the new knob, and the new behavior of WITHOUT_KERBEROS.

Not objected and/or generally agreed to by:	freebsd-arch

Problem discussed/analyzed in:
PR:	ports/116484
2007-12-10 19:09:24 +00:00
Olivier Houchard
f0aa484471 Build libthread_db for arm as well.
MFC after: 1 week
2007-11-17 21:29:02 +00:00
Ruslan Ermilov
4064334ff6 Add a period for yar@. 2007-10-26 11:07:25 +00:00
David E. O'Brien
946367b8e2 Tweak the handling of "WITHOUT_LIBPTHREAD". Also remove the accidental
treatment of 'LIBKSE' as an "old style" knob.

Submitted by:	ru
Approved by:	re(kensmith)
2007-10-09 23:31:11 +00:00
David E. O'Brien
65c045e964 Repo copy libpthreads to libkse.
This introduces the WITHOUT_LIBKSE nob,
and changes WITHOUT_LIBPTHREADS to mean with neither threading libs.
Approved by:	re(kensmith)
2007-10-09 13:42:34 +00:00
Robert Watson
2b851aeb63 Disconnect netatm from the build as it is not MPSAFE and relies on
NET_NEEDS_GIANT, which will shortly be removed.  This is done in a
away that it may be easily reattached to the build before 7.1 if
appropriate locking is added.  Specifics:

- Don't install netatm include files
- Disconnect netatm command line management tools
- Don't build libatm
- Don't include ATM parts in rescue or sysinstall
- Don't install sample configuration files and documents
- Don't build kernel support as a module or in NOTES
- Don't build netgraph wrapper nodes for netatm

This removes the last remaining consumer of NET_NEEDS_GIANT.

Reviewed by:	harti
Discussed with:	bz, bms
Approved by:	re (kensmith)
2007-07-14 21:49:24 +00:00
Alexander Kabaev
d5a857fbbb Make sure libc is installed before all other shared libraries. Other
libraries might depend on versioned symbols from libc.
2007-05-19 04:55:14 +00:00
Rong-En Fan
af5b5a0f15 Switch to new ncurses build glue
Approved by:	delphij
2007-01-20 07:48:10 +00:00
Joseph Koshy
3eb1a62e69 MFP4: Add an implementation of the ELF(3) and GELF(3) API set.
Bump __FreeBSD_version.

Reviewed by:	jb
2006-11-11 17:16:35 +00:00
Ruslan Ermilov
2e97500669 Removed libc_r build support. 2006-09-30 11:32:46 +00:00