Commit Graph

1977 Commits

Author SHA1 Message Date
Dimitry Andric
b40d827331 Merging ^/head r278298 through r278350. 2015-02-07 12:57:40 +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
Dimitry Andric
a403ab7f64 Merge ^/head r278110 through r278223. 2015-02-04 21:08:28 +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
11981695fc Add the following options to enable/disable several features in the base system
WITHOUT_BOOTPARAMD - bootparamd
WITHOUT_BOOTPD - bootpd
WITHOUT_FINGER - finger, fingerd
WITHOUT_FTP - ftp, ftpd
WITHOUT_INETD - inetd
WITHOUT_RBOOTD - rbootd
WITHOUT_TCP_WRAPPERS - tcpd, et al
WITHOUT_TFTP - tftp, tftp-server
WITHOUT_TIMED - timed

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division
2015-02-04 10:19:32 +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
Dimitry Andric
accc510ac3 Since clang 3.6.0 now implements the archetype 'freebsd_kprintf' for
__attribute__((format(...))), and the -fformat-extensions flag was
removed, introduce a new macro in bsd.sys.mk to choose the right variant
of compile flag for the used compiler, and use it.

Also add something similar to kern.mk, since including bsd.sys.mk from
that file will anger Warner. :-)

Note that bsd.sys.mk does not support the MK_FORMAT_EXTENSIONS knob used
in kern.mk, since that knob is only available in kern.opts.mk, not in
src.opts.mk.  We might want to add it later, to more easily support
external compilers for building world (in particular, sys/boot).
2015-01-28 18:36:33 +00:00
Dimitry Andric
e004ed0266 Disable the new -Wunused-local-typedef warning for WARNS <= 3, since it
triggers way too many times for the version of libc++ we have in base at
this point.  While here, fix the compiler version check for
-Wno-unused-const-variable.
2015-01-28 07:29:38 +00:00
Enji Cooper
b359042310 Add MK_AUTOFS knob for building and installing autofs(4), et al
MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division
2015-01-26 07:15:49 +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
4e39505449 Add MK_HAST knob for building and installing hastd(8), et al
MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division
2015-01-26 06:27:07 +00:00
Enji Cooper
18cc317233 Add MK_CCD knob for building and installing ccd(4), ccdconfig, etc
MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division
2015-01-25 04:52:48 +00:00
Enji Cooper
e45b569c95 Add MK_BSDINSTALL knob for building and installing bsdinstall
MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division
2015-01-25 04:43:13 +00:00
Enji Cooper
3f802165ba Add MK_TALK knob for building the talk and talkd
MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division
2015-01-25 04:37:44 +00:00
Enji Cooper
b29d6977f3 Add MK_ISCSI knob for building the iscsi initiator, iscsi daemon, kernel
modules, etc

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division
2015-01-25 04:20:11 +00:00
Enji Cooper
79a86dafb7 Add MK_EE knob to control installing edit, ee, etc
MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division
2015-01-25 00:03:44 +00:00
Ian Lepore
1d2c1366bf For armv6 builds, add -mfloat-abi=softfp. This tells the compiler it can
use floating point hardware instructions (because all armv6/7 systems we
support have fp hardware), but it passes args using a soft-float compatible
ABI.  This should give noticible performance improvement (but not as much
as using the armv6hf arch).
2015-01-19 04:56:17 +00:00
Will Andrews
7a37b5fc17 Add a ${CP} alias for copying files in the build.
Some users build FreeBSD as non-root in Perforce workspaces.  By default,
Perforce sets files read-only unless they're explicitly being edited.
As a result, the -f argument must be used to cp in order to override the
read-only flag when copying source files to object directories.  Bare use of
'cp' should be avoided in the future.

Update all current users of 'cp' in the src tree.

Reviewed by:	emaste
MFC after:	1 week
Sponsored by:	Spectra Logic
2015-01-16 21:39:08 +00:00
Warner Losh
c4765af73f Add infrastructure to build dtb files from dts files. 2015-01-08 18:28:06 +00:00
Ed Maste
968d62e1a1 Use a set of ELF Tool Chain tools by default
These tools are now from the ELF Tool Chain project:

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

The binutils versions are available by setting in src.conf:
WITHOUT_ELFTOOLCHAIN_TOOLS=yes

Thanks to antoine@ for multiple exp-runs and diagnosing many of the
failures.

PR:		195561 (ports exp-run)
Sponsored by:	The FreeBSD Foundation
2015-01-07 22:02:37 +00:00
Enji Cooper
082d009909 Remove MK_INFO guards in bsd.info.mk per r276556
As a side-effect now info pages will always be built/installed if
MK_INFO == yes, whereas before their presence was conditional based on the
value of MK_INFO

This .mk file might be removed in the future, pending discussion on -arch. For
now unbreak its use outside of src (with the only use in ports according to
bapt being devel/cvs*)

X-MFC with: r276551, r276556
Reviewed by: bapt
Differential Revision: D1413
2015-01-02 22:55:30 +00:00
Baptiste Daroussin
bec133a78d Remove leftovers from r276551 2015-01-02 18:54:55 +00:00
Baptiste Daroussin
0df7827e83 Use mandoc to generate cat pages 2015-01-02 14:05:30 +00:00
Baptiste Daroussin
2f335df9c2 Use mandoc -Tlint instead of groff for manlint target 2015-01-02 13:54:03 +00:00
Warner Losh
8f610c093a Put the conditional back. For the default case it isn't really needed,
but for the gcc case it still is on i386 and amd64's build of
sys/boot.

Submited by: dim@
2015-01-01 08:30:32 +00:00
Warner Losh
6d42086e33 Eliminate bsd.sys.mk on purpose. Do not put it back. 2015-01-01 04:26:45 +00:00
Enji Cooper
bc5c3aad41 Unbreak the build for some modules that depend on -std flags to be passed
through via CFLAGS, as noted by Jenkins when building sparc64 by re-adding
bsd.sys.mk to bsd.kmod.mk:
https://jenkins.freebsd.org/job/FreeBSD_HEAD_sparc64/225/changes

Tested with:
    % cd /sys/modules/bce; make obj; make depend; make all
2015-01-01 04:10:56 +00:00
Warner Losh
7ed11c5e5a Fix module builds on arm (and maybe others) by turning off a whole
raft of new warnings that appear to be on by default in clang 3.5.0.
Fix RPI-B build issues with new clang not liking the ability to pass
arbitrary flags to as, since some flags are more arbitrary (and thus
verboten) than others.

These warnings should be actually fixed in the code, but this is a
band-aide to get things (almost) building again.
2015-01-01 02:00:04 +00:00
Dimitry Andric
eca4d50aaa Merge ^/head r274961 through r276342. 2014-12-28 20:02:06 +00:00
Antoine Brodin
0d4423677a Add ncurses to _LIBRARIES so that libmenu is correctly linked
PR:		ports/195782
2014-12-28 15:38:50 +00:00
Enji Cooper
0f1f7f67b8 Add LIBADD to PROG_VARS, similar to DPADD/LDADD 2014-12-27 20:33:04 +00:00
Dimitry Andric
8007ee2b0c Merge ^/head r274961 through r276301. 2014-12-27 14:58:52 +00:00
Poul-Henning Kamp
c05bafc566 Deorbit the IEEE-488/GPIB support. 2014-12-25 20:15:13 +00:00
Baptiste Daroussin
70d099afe0 Fix build with recent binutils
Recent binutils considered the .gnu.warning.symbol section as a fatal error when
run with --fatal-warnings which makes any users of "insecure" functions from
libc failing to build with recent binutils.

Introduce a new macro: LD_FATAL_WARNINGS=no to run ld(1) with
--no-fatal-warnings for the users of "insecure" functions

Differential Revision:	https://reviews.freebsd.org/D1320
2014-12-23 10:43:35 +00:00
Dimitry Andric
be281d7007 Merge ^/head r275715 through r275748. 2014-12-13 19:45:18 +00:00
Warner Losh
1fc864601c Fix typo in comments.
Noticed by: brooks@
2014-12-12 18:54:31 +00:00
Dimitry Andric
0104753b7d Since clang 3.5.0 and later must be built by a compiler with C++11
support, make this explicit in src.opts.mk, by updating the default
settings.

The defaults become as follows:
* If the host compiler is not C++11 capable, use gcc and disable clang.
* On x86, enable clang, make it the default cc, and disable gcc.
* On little-endian ARM, enable clang, but not the full build, make it
  the default cc, and disable gcc.
* On PowerPC, enable clang, but enable gcc and make that the default cc.
* On everything else, use gcc, and disable clang.

This can be amended later, if we get e.g. sparc64 or big-endian ARM
working with clang.

Reviewed by:	imp, brooks
Differential Revision: https://reviews.freebsd.org/D1294
2014-12-10 22:33:57 +00:00
Dimitry Andric
d7e0694a59 Merge ^/head r275478 through r275622. 2014-12-08 19:56:34 +00:00
Enji Cooper
65051f5755 The previous commit should have been a logical or not a logical "and"
Pointyhat to: me
2014-12-08 03:32:26 +00:00
Enji Cooper
7d5bd3ab9a ${CC} --version doesn't need to be queried if both COMPILER_TYPE and
COMPILER_VERSION are known
2014-12-08 03:30:42 +00:00
Enji Cooper
a8374a76b1 ${CC} --version doesn't need to be queried if both COMPILER_TYPE and
COMPILER_VERSION are known
2014-12-06 04:02:56 +00:00
Enji Cooper
3e37e37681 Fix typos in comments and wrap to <80 columns
MFC after: 3 days
2014-12-06 03:15:46 +00:00
Enji Cooper
9f1bd9c146 Fix typos in comments and wrap to <80 columns
MFC after: 3 days
2014-12-06 03:12:57 +00:00
Enji Cooper
da976f9d68 MFhead @ r275496 2014-12-05 07:48:25 +00:00
Dimitry Andric
24ce0a02e5 Merge ^/head r275387 through r275477. 2014-12-04 17:38:32 +00:00
Rui Paulo
2a1136620d Switch gpioctl(8) to LIBADD. 2014-12-03 03:05:15 +00:00
Enji Cooper
210607205f Make ccd(4), et al conditional based on MK_CCD 2014-12-02 19:53:55 +00:00
Enji Cooper
c8c7f0b0e0 Add knob, MK_MAC_SUPPORT for building items with mac(9) support, like
libugidfw, ugidfw, etc
2014-12-02 17:08:24 +00:00
Dimitry Andric
2383695dc3 Merge ^/head r274961 through r275386. 2014-12-02 01:45:04 +00:00
Andrew Turner
a103277891 Set the correct architecture when targeting ARMv7
MFC after:	1 Week
Sponsored by:	ABT Systems Ltd
2014-12-01 21:07:36 +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
Enji Cooper
e7d836f78d Make nfs server components conditional according to MK_NFS_SERVER 2014-11-30 02:31:37 +00:00
Enji Cooper
65ea08621f Add MK_FILE and MK_SQLITE3
- MK_FILE will conditionalize building lib/libmagic and usr.bin/file
- MK_SQLITE3 will conditionalize building lib/libsqlite3, and will disable
  MK_SVN/MK_SVNLITE by proxy
2014-11-30 00:45:33 +00:00
Dimitry Andric
980e47cff3 Merge ^/head r274961 through r275261. 2014-11-29 18:44:52 +00:00
Enji Cooper
840e70929b MFHead @ r275232 2014-11-29 05:28:40 +00:00
Enji Cooper
e0cbf36b20 Make ee(1) optional via MK_EE 2014-11-29 01:58:52 +00:00
Baptiste Daroussin
4bf5485791 Update libucl to latest version
While here correctly link libucl to libm and register the dependency on libm
for static building
2014-11-29 00:45:09 +00:00
Enji Cooper
a8b303ad4d Add WITHOUT_AUTOFS and WITHOUT_BSDCONFIG 2014-11-27 09:42:40 +00:00
Enji Cooper
f541dd9b51 Implement MK_RADIUS_SUPPORT to make libradius and assorted support optional 2014-11-27 04:16:47 +00:00
Enji Cooper
9f325b1e41 Implement knobs for MK_NETGRAPH_SUPPORT 2014-11-27 03:59:57 +00:00
Dimitry Andric
1181e9f8a2 After some horrible wrestling with Subversion's worthless merge
implementation, merge ^/head r275078 through r275117.

Note that all the extraneous mergeinfo is there because Subversion
created it.  I'll hopefully be able to remove it again when merging back
to head.
2014-11-26 14:36:04 +00:00
Enji Cooper
a3f5edf093 Add MK_TIMED option for optionally building usr.sbin/timed, et al 2014-11-26 13:25:09 +00:00
Enji Cooper
466046ec0d Conditionalize a number of components in the tree
- bootparamd
- bootpd
- finger/fingerd
- ftp/ftpd
- hastctl/hastd
- iscsid, et al
- rbootd
- talk/talkd
- tcpd, et al
- tftp/tftpd

Add src.conf entries for the various components and do a best effort
at adding components to tools/build/mk/OptionalObsoleteFiles.inc
2014-11-26 08:44:05 +00:00
Baptiste Daroussin
1ac18f08c6 Remove MINUSLPAM the LIBADD framework handles static dependencies just fine 2014-11-26 08:14:30 +00:00
Baptiste Daroussin
b9270546cf Remove all remnant ugly LD<lbname> but atf one until the aft framework knows
about LIBADD
2014-11-25 22:39:59 +00:00
Baptiste Daroussin
4c5e7118db Register the explicit (pthread) and implicit (for static) dependencies for
kerberos
2014-11-25 22:17:31 +00:00
Baptiste Daroussin
eafea10bae Defines the libssh dependencies 2014-11-25 22:10:31 +00:00
Dimitry Andric
2c97f721e7 r274961 through r275075 2014-11-25 21:43:01 +00:00
Baptiste Daroussin
8794b8a783 Define missing libraries to be able to convert gnu, cddl and secure to LIBADD 2014-11-25 21:16:44 +00:00
Enji Cooper
4be1ca354c Make building/installing bhyve optional via MK_BHYVE on amd64
Disable building/installing bhyve from src.opts.mk on unsupported
architectures (!amd64)
2014-11-25 19:20:25 +00:00
Baptiste Daroussin
92fc4f553a Sort libraries definitions
Reported by:	bjk
2014-11-25 19:13:03 +00:00
Baptiste Daroussin
9876880a9b Remove duplicated krb5
Reported by:	markj
2014-11-25 19:07:31 +00:00
Enji Cooper
1bdede93d8 Make src.opts.mk the source of truth for whether or not to build hyperv
In particular, according to several Makefiles it can only be built/run on
amd64 and i386/i386. It isn't supported on i386/pc98
2014-11-25 19:01:49 +00:00
Baptiste Daroussin
29a8bda7f0 Defined the needed library to convert usr.sbin to LIBADD 2014-11-25 16:51:06 +00:00
Baptiste Daroussin
30fca3b0cc Defines all the libraries needed for usr.bin 2014-11-25 14:28:15 +00:00
Baptiste Daroussin
cc0d90a799 Define libipf internal library 2014-11-25 11:22:28 +00:00
Baptiste Daroussin
e859a32cd6 Fix recursive problem with libedit dependency, if you depends on ncursesw and
not on itself
2014-11-25 11:14:42 +00:00
Baptiste Daroussin
ca88232b48 Add a definition for libxo 2014-11-25 11:13:21 +00:00
Baptiste Daroussin
d98c8ac029 Define compiler_rt and ssp_nonshared libraries 2014-11-25 11:07:03 +00:00
Baptiste Daroussin
85abe78406 libvers and libsl are internal libraries 2014-11-25 09:54:05 +00:00
Enji Cooper
05bc3dd6c0 Make inetd optional via MK_INETD 2014-11-25 08:39:46 +00:00
Baptiste Daroussin
4ab8910605 Fix make depends with libnetbsd 2014-11-25 07:47:44 +00:00
Enji Cooper
41e0727670 Make bsdinstall(8) and sade(8) optional components via MK_BSDINSTALL=yes 2014-11-25 07:30:26 +00:00
Baptiste Daroussin
882e68f65b Add definitions of kerberos libraries 2014-11-25 07:13:31 +00:00
Baptiste Daroussin
a320ad37fe libevent is an internallib 2014-11-25 00:51:49 +00:00
Baptiste Daroussin
52a78c6703 libatf-c++ exposes libatf-c abi hence we need to explicit link to atf-c if
atf-c++ is requested
2014-11-25 00:28:27 +00:00
Baptiste Daroussin
22e6921db8 Do not overwrite any LIBNETBSD or LIBNETBSDDIR if they are already defined 2014-11-25 00:12:25 +00:00
Baptiste Daroussin
14d4f1c238 Define special case for atf which libraries names are different from their
declaration
2014-11-25 00:01:53 +00:00
Baptiste Daroussin
5716a77a38 s/cft/ctf 2014-11-24 23:58:04 +00:00
Baptiste Daroussin
405c01a1bc Fix typo 2014-11-24 22:35:32 +00:00
Baptiste Daroussin
440888c959 Fix dependencies in case of building statically 2014-11-24 22:32:18 +00:00
Baptiste Daroussin
873ad7fbf4 Avoid code duplication by directly adding _INSTALLLIBS and _PRIVATELIBS into
_LIBRARIES

Reported by:	emaste
2014-11-24 22:29:16 +00:00
Baptiste Daroussin
91bac0a94b Each time something links to sqlite3 it should link to pthread 2014-11-24 22:17:35 +00:00
Baptiste Daroussin
2df4d9628a Convert makefs to LIBADD
Add definition of libnetbsd in src.libnames.mk
2014-11-24 22:15:30 +00:00
Baptiste Daroussin
ebadd13c08 Convert mandoc to LIBADD
While here remove the ugly LDMANDOC
2014-11-24 22:12:27 +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
768987b5d0 Correctly specify -L for internal and private libs 2014-11-24 21:39:28 +00:00
Baptiste Daroussin
85e4c389d1 Implement LIBADD
LIBADD will automatically set DPADD and LDADD when needed including their
dependencies, LIBADD automatically handles private and internal libs so that
the end user Makefile does not have to care about it.

This allows to reduce overlinking on the base system leaving the framework get
the dependencies properly.

It also allows to built components binaries statically.

To use it:

Replace:
DPADD=	${LIBARCHIVE} ${LIBSSL}
LDADD=	-larchive -lssl

by:
LIBADD=	archive ssl

Differential Revision:	https://reviews.freebsd.org/D1209
Reviewed by:	brooks imp
2014-11-24 21:31:08 +00:00
Dimitry Andric
a58b298927 Ensure boot2 stays below the limit, by applying a patch from Roman
Divacky which shrinks the code, and by using the custom llvm option to
disable the Global Value Numbering optimization pass.
2014-11-24 20:01:05 +00:00
Baptiste Daroussin
beb7fbfc0d Define LIBSQLITE3 and LIBMANDOC 2014-11-22 21:03:05 +00:00