Commit Graph

1828 Commits

Author SHA1 Message Date
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
Ed Maste
4dae514dfb Sort default option lists 2012-12-21 02:18:11 +00:00
Ed Maste
facaa6ee9f No reason to install debug data with the schg flag 2012-12-18 21:13:03 +00:00
Ed Maste
44383aa35e Hide OBJCOPY and others in POSIX mode
Submitted by: Garrett Cooper
2012-12-17 21:09:44 +00:00
Ed Maste
e97696b5ec Put shared library debug info into separate .symbols file
Sponsored by: ADARA Networks
2012-12-15 00:03:35 +00:00
Ed Maste
0d947ed19a Minor refactoring prior to .symbols file changes
- Combine .if x and .if !x using .else
- Separate out beforelinking dependency
- Add comments to clarify .if nesting

Sponsored by: ADARA Networks
2012-12-14 18:30:01 +00:00
Eitan Adler
bffa448842 Change the default to 'cru' for speed reasons.
Submitted by:	Erik Cederstrand <erik@cederstrand.dk>
Reviewed by:	imp, toolchain@
Approved by:	cperciva
MFC after:	2 weeks
2012-12-06 01:31:34 +00:00
Eitan Adler
37a6031461 Clean up hardcoded ar(1) flags in the tree to use the global ARFLAGS in
share/mk/sys.mk instead.

This is part of a medium term project to permit deterministic builds of
FreeBSD.

Submitted by:	Erik Cederstrand <erik@cederstrand.dk>
Reviewed by:	imp, toolchain@
Approved by:	cperciva
MFC after:	2 weeks
2012-12-06 01:31:25 +00:00
Neel Natu
32531ccb84 IFC @r243836 2012-12-04 04:37:42 +00:00
Jung-uk Kim
cea10e1d3b Fix typos in the previous commit. 2012-12-04 00:44:31 +00:00
Jung-uk Kim
08e90c1491 Tidy up bsd.cpu.mk for X86 CPUs:
- Do not limit recent processors to "prescott" class for i386 target.  There
is no reason for this hack because clang is default now.  On top of that, it
will only grow indefinitely over time.
- Add more CPUTYPEs, i.e., "athlon-fx", "core-avx2", "atom", "penryn", and
"yonah".  Note "penryn" and "yonah" are intentionally undocumented because
they are not supported by gcc and marked deprecated by clang.
- Add more CPUTYPE aliases, i.e., "barcelona" (-> amdfam10), "westmere" and
"nehalem" (-> corei7).  Note these are intentionally undocumented because
they are not supported by (base) gcc and/or clang.  However, LLVM (backend)
seems to "know" the differences.  Most likely, they were deprecated with
other vendor code names and clang did not bother implementing them at all.
- Add i686 to MACHINE_CPU for "c3-2" (VIA Nehemiah).  Both gcc & clang treat
it like an i686-class processor.
- Add IDT "winchip2" and "winchip-c6" for completeness (undocumented).
- Order processors per make.conf example, i.e., CPU vendors and models.
- Tidy up make.conf example, i.e., remove "by gcc" (because we have aliases)
and remove "prescott" from AMD64 architecture (because it is not correct).
2012-12-04 00:37:17 +00:00
Jung-uk Kim
04704c638e Remove fictitious support for 80386-class CPUs from bsd.cpu.mk and make(1).
It was removed from head more than 8 years ago (see r137784 and r137785).

Reviewed by:	imp, delphij, dim
2012-12-03 19:27:31 +00:00
Simon J. Gerraty
3b0cfc13df If .PARSEDIR is defined we have bmake, and CTFCONVERT_CMD can be empty.
PR:		172440
Approved by:	marcel (mentor)
2012-11-22 04:53:09 +00:00
Simon J. Gerraty
a58de88b0c INSTALL_AS_USER: output of id -un will never match 0 so use id -u
and USER for BINOWN etc.

Approved by:	marcel (mentor)
2012-11-22 04:50:42 +00:00
Dimitry Andric
d7649ea3a3 Do not expose LIBCXXRT and LIBCPLUSPLUS in bsd.libnames.mk, if
WITHOUT_LIBCPLUSPLUS is specified.

Submitted by:	Garrett Cooper <yanegomi@gmail.com>
MFC after:	3 days
2012-11-20 21:26:13 +00:00
Jung-uk Kim
49f4a268d5 Add x86 CPUs supported by clang on head.
Reviewed by:	arch (silence)
X-MFC:		r242624
2012-11-19 21:58:14 +00:00
Marcel Moolenaar
a83e187992 Install bsd.progs.mk, needed by bsd.test.mk and thus by atf.test.mk. 2012-11-17 00:07:28 +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
Simon J. Gerraty
c5faff658d Add ATF and reformat to ease reviews
Approved by:	marcel (mentor)
2012-11-07 22:02:53 +00:00
Simon J. Gerraty
50c5d27b26 Enable ATF testing.
Submitted by:	Garrett Cooper
Approved by:	marcel (mentor)
2012-11-07 22:02:02 +00:00
Simon J. Gerraty
81e6864102 Latest progs.mk from crufty.net for ATF
Approved by:	marcel (mentor)
2012-11-07 21:44:04 +00:00
Dimitry Andric
8d7f35458a Fix typo in bsd.compiler.mk. 2012-11-06 07:51:20 +00:00
Brooks Davis
909c4d7ec0 Allow CC to be gcc46 or similar by matching gcc*.
Don't test the value of the :M matches, either the string matches or does
not.
2012-11-05 23:05:14 +00:00
Brooks Davis
5b6478b077 After years of hard work by many FreeBSD and LLVM developers, make
clang the default compiler on i386 and amd64 systems.

Special thanks to:	dim, ed, rdivacky
2012-11-05 19:08:18 +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
Marcel Moolenaar
9e0a344174 Revert r241752. The claim that it's more correct while at the same time
causing a build breakage is interesting to say the least.
2012-10-20 22:44:22 +00:00
Marcel Moolenaar
9120686391 Improve upon the previous commit to fix the yacc rule.
1.  Have the resulting C file depend on the resulting H
    file as it should be. Touch the C file to make sure
    the C file is newer than the H file to keep make
    happy.
2.  Apply the same fix to the other instance of .ORDER,
    missed in the previous commit.
2012-10-19 20:13:08 +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
Gabor Kovesdan
2e650f3f9c - Remove WITH_GNU_SORT support 2012-10-13 19:29:07 +00:00
Marcel Moolenaar
0815243c39 Add support for bmake. This includes:
1.  Don't do upgrade_checks when using bmake. As long as we have WITH_BMAKE,
    there's a bootstrap complication in ths respect. Avoid it. Make the
    necessary changes to have upgrade_checks work wth bmake anyway.
2.  Remove the use of -E. It's not needed in our build because we use ?= for
    the respective variables, which means that we'll take the environment
    value (if any) anyway.
3.  Properly declare phony targets as phony as bmake is a lot smarter (and
    thus agressive) about build avoidance.
4.  Make sure CLEANFILES is complete and use it on .NOPATH. bmake is a lot
    smarter about build avoidance and should not find files we generate in
    the source tree. We should not have files in the repository we want to
    generate, but this is an easier way to cross this hurdle.
5.  Have behavior under bmake the same as it is under make with respect to
    halting when sub-commands fail. Add "set -e" to compound commands so
    that bmake is informed when sub-commands fail.
6.  Make sure crunchgen uses the same make as the rest of the build. This
    is important when the make utility isn't called make (but bmake for
    example).
7.  While here, add support for using MAKEOBJDIR to set the object tree
    location. It's the second alternative bmake looks for when determining
    the actual object directory (= .OBJDIR).

Submitted by:	Simon Gerraty <sjg@juniper.net>
Submitted by:	John Van Horne <jvanhorne@juniper.net>
2012-10-06 20:01:05 +00:00
Marcel Moolenaar
d4d90f10bc Add bmake to the build and allow it to be installed as make(1) instead
of FreeBSD's make by setting WITH_BMAKE.  The WITH_BMAKE build makes it
easy for people to switch while working out the kinks -- think ports
tree here.  The option will be removed in due time.

Submitted by:	Simon Gerraty (sjg@juniper.net)
2012-10-06 19:19:21 +00:00
Brooks Davis
815e67dd3b Add a COMPILER_FEATURES variable that is set in bsd.compiler.mk.
When the compiler is clang add c++11 to COMPILER_FEATURES.

When the compiler supports c++11, default to building libc++.  This will
not impact the compliation of programs, but will make it easier for
users with clang compiled systems to test libc++ by passing -stdlib=libc++
to their c++ compliations.
2012-09-26 17:25:15 +00:00
Brooks Davis
9215d178a4 Introduce a new make variable COMPILER_TYPE that specifies what
type of compiler is being used (currently clang or gcc).  COMPILER_TYPE
is set in the new bsd.compiler.mk file based on the value of the CC
variable or, should it prove informative, by running ${CC} --version
and examining the output.

To avoid negative performance impacts in the default case and correct
value for COMPILER_TYPE type is determined and passed in the environment
of submake instances while building world.

Replace adhoc attempts at determining the compiler type by examining
CC or MK_CLANG_IS_CC with checks of COMPILER_TYPE.  This eliminates
bootstrapping complications when first setting WITH_CLANG_IS_CC.

Sponsored by:	DARPA, AFRL
Reviewed by:	Yamaya Takashi <yamayan@kbh.biglobe.ne.jp>, imp, linimon
		(with some modifications post review)
MFC after:	2 weeks
2012-09-13 16:00:46 +00:00
David E. O'Brien
e5deeefec6 Add MK_KDUMP. 2012-09-12 14:58:07 +00:00
Dimitry Andric
d515c63db9 When using -stdlib=libc++, add the correct dependency to .depend in
bsd.prog.mk.

Submitted by:	Yamaya Takashi <yamayan@kbh.biglobe.ne.jp>
MFC after:	2 weeks
2012-08-25 19:30:15 +00:00
Dimitry Andric
2d12214697 Make sure bsd.dep.mk does not filter out -stdlib=xxx from CXXFLAGS,
since this determines parts of the C++ include path.

MFC after:	1 week
2012-08-23 17:03:33 +00:00
Oleksandr Tymoshenko
4da573d910 Merging of projects/armv6, part 3
r238211:
Support TARGET_ARCH=armv6 and TARGET_ARCH=armv6eb

This adds a new TARGET_ARCH for building on ARM
processors that support the ARMv6K multiprocessor
extensions.  In particular, these processors have
better support for TLS and mutex operations.

This mostly touches a lot of Makefiles to extend
existing patterns for inferring CPUARCH from ARCH.
It also configures:
 * GCC to default to arm1176jz-s
 * GCC to predefine __FreeBSD_ARCH_armv6__
 * gas to default to ARM_ARCH_V6K
 * uname -p to return 'armv6'
 * make so that MACHINE_ARCH defaults to 'armv6'
It also changes a number of headers to use
the compiler __ARM_ARCH_XXX__ macros to configure
processor-specific support routines.

Submitted by:	Tim Kientzle <kientzle@freebsd.org>
2012-08-15 03:21:56 +00:00
Devin Teske
641a6cfb86 Import bsdconfig(8) as a replacement for the post-install abilities of
deprecated sysinstall(8). NOTE: WITH_BSDCONFIG is currently required.

Submitted by:	Devin Teske (dteske), Ron McDowell <rcm@fuzzwad.org>
Reviewed by:	Ron McDowell <rcm@fuzzwad.org>
Approved by:	Ed Maste (emaste)
2012-07-14 03:16:57 +00:00
Peter Grehan
b652778e42 IFC @ r238370 2012-07-11 19:54:21 +00:00
Gleb Smirnoff
f2ed28480d Fix build after r237997. 2012-07-02 18:04:31 +00:00
Gabor Kovesdan
7d26b3ee33 - Switch to BSD sort as default sort. GNU sort will still be installed as
"gnusort".  Most of the BSD sort development work was done by
  Oleg Moskalenko <oleg.moskalenko@citrix.com>.
- GNU grep can be set to default by setting WITH_GNU_GREP.  It will cause
  BSD sort to be installed as "bsdsort".

Portbuild tested by:    linimon
2012-06-27 05:59:01 +00:00
David E. O'Brien
a8f682ad55 Add -DWITH_INSTALL_AS_USER to the source build (naming matches the
same functionality of The Ports Collection).
This sets BINOWN, BINGRP, etc... to match current user.  This this
allows 'install', as used in 'make install', to succeed (assuming
user has write permissions).

Submitted by:	Simon J Gerraty <sjg@juniper.net>
Discussed on:	freebsd-arch
2012-06-26 23:15:55 +00:00
David E. O'Brien
70840a510a Ensure crunchen uses the same make binary as the rest of the build.
Submitted by:	Simon Gerraty <sjg@juniper.net>
2012-06-25 21:56:36 +00:00
Robert Millan
bc5116ba42 In CTFCONVERT_CMD initialization, check that ${MAKE_VERSION} is defined
before using it. Bootstrap make (as built by usr.bin/make/Makefile.dist)
does not define this variable, but it needs to parse bsd.own.mk in order
to build a complete make.
2012-06-16 16:51:42 +00:00
Dimitry Andric
85d4004625 Amend r227797 by also passing ${STATIC_CXXFLAGS} for the other supported
C++ file extensions.

MFC after:	3 days
2012-06-09 11:41:29 +00:00
Dimitry Andric
883e0f87a4 During buildworld and buildkernel, define EARLY_BUILD in the earlier
stages (build-tools, cross-tools, etc) of the build, so we can detect in
bsd.*.mk whether to pass compiler-specific flags to ${CC}.

In particular, this commit will allow using WITH_CLANG_IS_CC when the
base compiler is still gcc, and when ${CC}, ${CXX} and ${CPP} are left
at their defaults.  The early stages will then be built using gcc, and
no clang-specific flags will be passed to it.  The later stages will be
built as usual.

The EARLY_BUILD define can also serve other uses, such as building the
world stage C++ executables with libc++ instead of libstdc++: during the
early build stages, we cannot assume libc++ is already available, so we
must still build with libstdc++ at that time.

MFC after:	1 week
2012-06-03 20:35:41 +00:00
Marcel Moolenaar
71aaa237f3 Fix an inconsistency I just ran into for LDADD and DPADD. The description
for both of them use different, and presumably wrong, variables in the
example. They set LDFILES and SRCLIB respectively. I guess that's what
DPADD and LDADD were called first ...
2012-05-24 20:00:58 +00:00
Marcel Moolenaar
6663ff446e Add build opton MK_LS_COLORS to control whether ls(1) supports colors
(and thus needs to depend on libtermcap). Embedded systems may not
want or need colors.

Obtained from:	Juniper Networks, Inc.
2012-05-19 18:05:00 +00:00
Marcel Moolenaar
aa39c44746 Add build option MK_ED_CRYPTO to control whether ed(1) is to have the
ability to encrypt/decrypt files. Embedded systems can typically have
OpenSSL, but not for ed(1) to use it.

Obtained from:	Juniper Networks, Inc.
2012-05-19 17:55:49 +00:00
Marcel Moolenaar
6639d35ccf Add missing LIBPROCSTAT. 2012-05-19 04:57:37 +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
Gabor Kovesdan
85d7de106c - Hook up BSD sort to the build. By default, it will be installed as
"bsdsort" and GNU sort will be the default "sort".  When WITH_BSD_SORT
  is set, BSD sort will be the default "sort" and GNU sort will be installed
  as "gnusort".
2012-05-11 12:47:21 +00:00
Dimitry Andric
400b97c789 Revert r234656, and apply a proper fix for binutils PR 10474, which
caused linking clang on 32-bit PowerPC to fail with "relocation
truncated to fit: R_PPC_REL24" errors.

Original diffs (relicensed under GPLv2 with permission from author):
http://sourceware.org/git/?p=binutils.git;a=commit;h=1fd262ff7d7ea5adf4894c6b960e092e7e43e3cd
http://sourceware.org/git/?p=binutils.git;a=commit;h=053c49fbff58bd33bd0d12200ea61302f92caceb

Tested by:	andreast
MFC after:	1 week
2012-05-07 17:13:36 +00:00
Jeremie Le Hen
51a65f35df Introduce the ${SHLIB_LDSCRIPT} variable to have an ld(1) script
instead of a symlink for .so files.

Reviewed by:    kib, kan (previous version), dim
Approved by:    kib (mentor)
Silence from:   -hackers@
MFC after:	1 week
2012-05-07 09:00:30 +00:00
Konstantin Belousov
4f20e4f263 Add src.conf option WITH_SHARED_TOOLCHAIN to enable building the
toolchain binaries as dynamically linked.  Option is disabled by
default.

Reviewed by:	ru (previous version)
MFC after:	2 weeks
2012-04-29 09:32:44 +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
Dimitry Andric
bf270f7c46 After r234596, temporarily disable building clang on 32-bit PowerPC,
until we are able to fix the binutils bug that makes linking clang fail
with "relocation truncated to fit: R_PPC_REL24" errors.  This should fix
the tinderboxes for now.
2012-04-24 17:00:30 +00:00
Warner Losh
6f1d6967f2 Sort nm in order.
Submitted by:	bde
2012-04-22 17:14:11 +00:00
Warner Losh
edfe67eab7 Fix partially merged patch from my external compiler tree in r234546.
Define NM except when we're in strict POSIX mode.
2012-04-21 17:45:40 +00:00
Dimitry Andric
dff0c46c97 Upgrade our copy of llvm/clang to trunk r154661, in preparation of the
upcoming 3.1 release (expected in a few weeks).  Preliminary release
notes can be found at: <http://llvm.org/docs/ReleaseNotes.html>

MFC after:	2 weeks
2012-04-16 21:23:25 +00:00
Juli Mallett
84db023ec1 Assume a big-endian default on MIPS and drop the "eb" suffix from MACHINE_ARCH.
This makes our naming scheme more closely match other systems and the
expectations of much third-party software.  MIPS builds which are little-endian
should require and exhibit no changes.  Big-endian TARGET_ARCHes must be
changed:
	From:		To:
	mipseb		mips
	mipsn32eb	mipsn32
	mips64eb	mips64

An entry has been added to UPDATING and some foot-shooting protection (complete
with warnings which should become errors in the near future) to the top-level
base system Makefile.
2012-03-29 02:54:35 +00:00
Stanislav Sedov
ae77177087 - Update FreeBSD Heimdal distribution to version 1.5.1. This also brings
several new kerberos related libraries and applications to FreeBSD:
  o kgetcred(1) allows one to manually get a ticket for a particular service.
  o kf(1) securily forwards ticket to another host through an authenticated
    and encrypted stream.
  o kcc(1) is an umbrella program around klist(1), kswitch(1), kgetcred(1)
    and other user kerberos operations. klist and kswitch are just symlinks
    to kcc(1) now.
  o kswitch(1) allows you to easily switch between kerberos credentials if
    you're running KCM.
  o hxtool(1) is a certificate management tool to use with PKINIT.
  o string2key(1) maps a password into key.
  o kdigest(8) is a userland tool to access the KDC's digest interface.
  o kimpersonate(8) creates a "fake" ticket for a service.

  We also now install manpages for some lirbaries that were not installed
  before, libheimntlm and libhx509.

- The new HEIMDAL version no longer supports Kerberos 4.  All users are
  recommended to switch to Kerberos 5.

- Weak ciphers are now disabled by default.  To enable DES support (used
  by telnet(8)), use "allow_weak_crypto" option in krb5.conf.

- libtelnet, pam_ksu and pam_krb5 are now compiled with error on warnings
  disabled due to the function they use (krb5_get_err_text(3)) being
  deprecated.  I plan to work on this next.

- Heimdal's KDC now require sqlite to operate.  We use the bundled version
  and install it as libheimsqlite.  If some other FreeBSD components will
  require it in the future we can rename it to libbsdsqlite and use for these
  components as well.

- This is not a latest Heimdal version, the new one was released while I was
  working on the update.  I will update it to 1.5.2 soon, as it fixes some
  important bugs and security issues.
2012-03-22 08:48:42 +00:00
Dimitry Andric
3b05e58b40 Change the style of share/mk/bsd.sys.mk to that of the other bsd.*.mk
files, and style.Makefile(5), where applicable.  While here, update the
link to the gcc warning documentation.

No functional change.

MFC after:	1 week
2012-03-16 23:19:45 +00:00
Jung-uk Kim
de9dec16dd Make boot2 build with Clang again.
Submitted by:	dim (bsd.sys.mk)
Reviewed by:	dim, jhb
2012-03-09 23:30:30 +00:00
Dimitry Andric
2651e350d3 Revert r232473. I have been convinced by Doug Barton and Bjoern Zeeb
that it is better to error out when people attempt to build using the
wrong bsd.*.mk files, than to silently ignore the problem.

This means, that after this commit, if you want to build kernel modules
by hand (or via a port) from a head source tree, you *must* make sure
the files in /usr/share/mk are in sync with that tree.  If that isn't
possible, for example when you are running on an older FreeBSD branch,
you can:

- Run "make buildenv" from your head source tree, to have the correct
  environment setup.  (It's advisable to have run "make buildworld", or
  at a minimum "make toolchain" first.)
- Alternatively, set MAKESYSPATH to the share/mk directory under your
  head source tree.  If your build tools are too old, other problems may
  still occur.
- Alternatively, use "make -m" and specify the share/mk directory under
  your head source tree.  Again, build tools that are too old may still
  result in trouble.

MFC after:	2 weeks
2012-03-03 23:49:53 +00:00
Dimitry Andric
2677e7fea5 After r232322, it turned out many people (and some ports) are building
kernel modules using their old installed /usr/share/mk/bsd.*.mk files,
instead of the updated ones in their source tree.  This leads to errors
like:

  "sys/conf/kmod.mk", line 111: Malformed conditional (${MK_CLANG_IS_CC} == "no" && ${CC:T:Mclang} != "clang")

Obviously, these errors will go away after a "make installworld", or
alternatively, by using "make buildenv" before attempting to manually
build modules.

However, since it is apparently an expected use case to build using old
.mk files, change the way we test for clang, so it also works when the
MK_CLANG_IS_CC macro doesn't exist.

Note the conditional expressions are becoming rather unreadable now, but
I will attempt to fix that on a followup commit.

MFC after:	2 weeks
2012-03-03 18:58:15 +00:00
Dimitry Andric
dfbaea8347 Add a WITH_CLANG_IS_CC option for src.conf(5), disabled by default, that
installs clang as /usr/bin/cc, /usr/bin/c++ and /usr/bin/cpp.

Note this does *not* disable building and installing gcc, which will
still be available as /usr/bin/gcc, /usr/bin/g++ and /usr/bin/gcpp.  If
you want to disable gcc completely, you must use WITHOUT_GCC.

MFC after:	2 weeks
2012-02-29 22:58:51 +00:00
Dimitry Andric
07b202a847 Define several extra macros in bsd.sys.mk and sys/conf/kern.pre.mk, to
get rid of testing explicitly for clang (using ${CC:T:Mclang}) in
individual Makefiles.

Instead, use the following extra macros, for use with clang:
- NO_WERROR.clang       (disables -Werror)
- NO_WCAST_ALIGN.clang  (disables -Wcast-align)
- NO_WFORMAT.clang	(disables -Wformat and friends)
- CLANG_NO_IAS		(disables integrated assembler)
- CLANG_OPT_SMALL	(adds flags for extra small size optimizations)

As a side effect, this enables setting CC/CXX/CPP in src.conf instead of
make.conf!  For clang, use the following:

CC=clang
CXX=clang++
CPP=clang-cpp

MFC after:	2 weeks
2012-02-28 18:30:18 +00:00
Warner Losh
e517a11c27 Fix comma splice, can't ambiguity and quoting.
Submitted by:	bde@
MFC after:	2 weeks
2012-02-16 21:04:47 +00:00
Warner Losh
c693bd2ff6 Wordsmith the can't find kernel error message, and suggest which
variable to set to override.
2012-02-15 21:20:58 +00:00
Dimitry Andric
6bb1cadd56 Add a WITH_CLANG_EXTRAS option for src.conf(5), disabled by default,
that builds the following additional llvm/clang tools:

- bugpoint
- llc
- lli
- llvm-ar
- llvm-as
- llvm-bcanalyzer
- llvm-diff
- llvm-dis
- llvm-extract
- llvm-ld
- llvm-link
- llvm-mc
- llvm-nm
- llvm-objdump
- llvm-prof
- llvm-ranlib
- llvm-rtdyld
- llvm-stub
- macho-dump
- opt

These tools are mainly useful for people that want to manipulate llvm
bitcode (.bc) and llvm assembly language (.ll) files, or want to tinker
with llvm and clang themselves.

MFC after:	2 weeks
2012-02-05 23:56:22 +00:00
Robert Millan
4a47892c81 Add MK_SOURCELESS build option. Setting MK_SOURCELESS to "no" will disable
kernel modules that include binary-only code.

More fine-grained control is provided via MK_SOURCELESS_HOST (for native code
that runs on host CPU) and MK_SOURCELESS_UCODE (for microcode).

Reviewed by:	julian, delphij, freebsd-arch
Approved by:	kib (mentor)
MFC after:	2 weeks
2012-02-04 00:54:43 +00:00
Adrian Chadd
030b95d479 Allow crunchgen binary link generation to be disabled.
If CRUNCH_GENERATE_LINKS is set to "no", then no links will be
generated.

This defaults to "yes" so things like release crunch building
still works.
2012-01-05 21:49:43 +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
6508f34eb6 Add WITHOUT_CAPSICUM src.conf(5) define, which can be used to compile out
use of Capsicum by userspace applications.

MFC after:	3 weeks
Sponsored by:	Google, Inc.
2012-01-02 21:57:58 +00:00
Dimitry Andric
c09186a2bb Disable another clang warning (-Wempty-body) when WARNS <= 2.
MFC after:	1 week
2011-12-18 00:34:42 +00:00
Dimitry Andric
ac7472adb6 Disable yet another clang warning (-Wconversion) when WARNS <= 3.
MFC after:	1 week
2011-12-18 00:24:11 +00:00
Dimitry Andric
9b9c36a3b5 Disable yet another clang warning when WARNS <= 3.
MFC after:	1 week
2011-12-17 01:51:12 +00:00
Dimitry Andric
c9009f9f3d Add a NO_WARRAY_BOUNDS setting to bsd.sys.mk, only applicable to clang,
to selectively work around warnings in programs that don't use flexible
array members, but instead define arrays of length 1 at the end of the
struct, and then access those beyond their declared bounds.

MFC after:	1 week
2011-12-16 23:42:25 +00:00
Dimitry Andric
c792b7e865 Disable one more clang warning when WARNS <= 3.
MFC after:	1 week
2011-12-15 23:13:57 +00:00
Dimitry Andric
e2325c4ac9 Clang has more warnings enabled by default, and when using -Wall, so if WARNS
is set to low values, some of them have to be disabled explicitly.

MFC after:	1 week
2011-12-15 22:08:08 +00:00
Konstantin Belousov
bd4632e6ca Force linker error when created shared library contains a relocation
against text. Provide the override switch to turn off the strict
behaviour. Apparently, openssl libcrypto needs it due to assembler
code not being PIC.

Discussed with:	bf
MFC after:	2 weeks
2011-12-06 11:28:17 +00:00
Max Khon
5f73185f0f Revert to conservative defaults. WITH_PROFILE is a default now.
NO_PROFILE overrides in Makefile.inc1 and bsd.own.m are left intact
so that the reversal to the WITHOUT_PROFILE will be easier in future.
2011-12-02 09:09:54 +00:00
Max Khon
83cb5bae96 - CTF knob is now implemented using common scheme: MK_CTF=yes/no is
defined based on WITH/WITHOUT_CTF settings, default is WITHOUT_CTF,
NO_CTF overrides WITH_CTF (used by Makefile.inc1)
- CTFCONVERT_CMD/NORMAL_CTFCONVERT are now defined to empty string
if make(1) can handle empty commands
2011-11-30 18:11:49 +00:00
Max Khon
1a5d0ec1d0 CTFCONVERT_CMD=... hack does not work sufficiently well in parallel builds.
Put a bandaid until make(1) is taught to ignore empty commands.
2011-11-29 20:06:27 +00:00
Max Khon
d0ed1ea4b7 Turn off profiled libs build by default.
Can be enabled back using WITH_PROFILE=yes in /etc/src.conf
2011-11-29 19:46:17 +00:00
Max Khon
78e7e3ecb5 - fix WITH_CTF when specified in /etc/src.conf [1]
- CTFCONVERT_CMD=... is a hack (should be defined to empty string instead):
make(1) should be taught to ignore empty commands silently in compat mode
(as it does in !compat mode, GNU make also silently ignores empty commands)
and to skip printing empty commands in !compat mode
- config(8) should generate ${NORMAL_CTFCONVERT} invocation without '@':
this will allow to simplify kern.pre.mk even more and lessen the number
of shell invocations during kernel build when CTF is turned off
- WITH_CTF can now be converted to usual MK_CTF=yes/no infrastructure

Pointy hat to:	fjoe [1]
2011-11-29 16:34:44 +00:00
Max Khon
cd49c2e840 Conditionalize ctfconvert/ctfmerge runs on make level (.if/.endif) instead
of executing a shell on every object or executable/library file.

This shaves off more than 30,000 shell invocations during buildworld.
2011-11-29 08:38:47 +00:00
Max Khon
1ade594798 Allow NO_FOO to override WITH_FOO that could be specified in /etc/src.conf.
This is required to override knobs (e.g. WITH_PROFILE) during buildworld
stages in Makefile.inc1 (otherwise the build is stopped due to both WITH_FOO
and WITHOUT_FOO defined).
2011-11-29 08:20:23 +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
Max Khon
24d1b19ec4 libodialog: disconnect from the build and obsolete. 2011-11-24 20:31:06 +00:00
Dag-Erling Smørgrav
66f96aa5d4 Add CTF magic to the new .c.o rule.
MFC after:	3 weeks
2011-11-24 13:13:50 +00:00
Peter Grehan
3ee1a36e2e IFC @ r227804
Pull in the virtio drivers from head.
2011-11-22 02:27:59 +00:00
Dag-Erling Smørgrav
2ba2959320 As threatened on -arch, add {SHARED,STATIC}_{C,CXX}FLAGS, which allow a
Makefile to specify different CFLAGS for shared and static libraries.

MFC after:	3 weeks
2011-11-21 16:35:57 +00:00
Nathan Whitehorn
ebcc5e9a0d Connect LLVM/clang to the build on powerpc64. After the binutils 2.17.50
import, it works without issue.
2011-11-21 00:49:46 +00:00
Peter Grehan
70d8f36aa4 IFC @ r226824 2011-10-27 04:56:53 +00:00
Jayachandran C.
96f4c1e385 Build 'dtc' by default for MIPS.
The device tree compiler is needed during the kernel build to compile
DTS files to DTB.

Reviewed by:	stas
2011-10-20 13:41:37 +00:00
David Schultz
f4b36cb777 Also pass the -ansi flag through to mkdep (requested by bde), and fix
a cut-and-paste-o (noticed by rdivacky).
2011-10-11 05:17:26 +00:00
David Schultz
085f20ec39 Pass -std= flags in CFLAGS to mkdep. Without this, preprocessor tests
for particular compiler features might be evaluated differently by
mkdep than they would be by cc.
2011-10-10 15:39:29 +00:00
Chris Rees
04a382563d Revert unapproved commit to bsd.port.mk.
This would have had more discussion, but it was explicitly rejected at submission by portmgr:

http://lists.freebsd.org/pipermail/freebsd-ports/2011-September/070591.html
2011-10-08 18:25:01 +00:00
Stanislav Sedov
2872f05432 - Add a couple of more sed subsitutions needed to get the correct
libtool.m4.  With these fixes libtool will correctly indentify the
  system as ELF (and not a.out).
- While here, change the substitutions so they're still correctly
  match freebsd1.x, freebsd2.x etc.
2011-10-08 00:01:17 +00:00
Stanislav Sedov
dd50bdfab6 - ${WRKSRC} might be missing when the autotools fixup is running.
Account for this.

Reported by:	Mykola Dzham <i@levsha.me>
2011-10-07 23:43:51 +00:00
Jilles Tjoelker
df8d253fb4 Work around the autotools problem with the 10.0 version.
With this, I can build various ports on a 10.0-CURRENT system without
hacking or hiding the version number.

This commit should be reverted when there is a cleaner fix in autotools
and/or ports/Mk/bsd.port.mk.

The original patch is from Ed Schouten but needed some additions.
2011-10-04 22:23:00 +00:00
Peter Grehan
23300944db IFC @ r223696 to pick up dfr's userboot 2011-06-30 17:37:42 +00:00
Peter Grehan
a5615c9044 IFC @ r222830 2011-06-28 06:26:03 +00:00
Stefan Eßer
cf78df8a0e Add macros to specify owner, group and mode of config files for installation.
Submitted by:	Chris Rees (crees)
2011-06-27 13:23:51 +00:00
Ed Schouten
9f0c9022c2 Add WITHOUT_UTMPX switch to the build system.
This knob removes the tools that are exclusively used to view and
maintain the databases maintained by utmpx, namely last, users, who,
wtmpcvt, ac, lastlogin and utxrm.

The tool w is not in this list, because it has some other functionality
which is unrelated to utmpx; it is hardlinked to the uptime tool.
2011-06-17 21:30:21 +00:00
Ruslan Ermilov
f1a52c7ed6 Don't pass -o1- to groff(1) by default. If ms(7) formatted document
uses the .RP macro, a separate cover page is created as page 0 which
is not otherwise output.  The bug was hiding by a hack in troffrc
that disables SGR support in grotty(1), which I'm going to remove now.
For POLA reasons, still disable SGR support in grotty(1), by passing
-P-c to groff(1).  If we want SGR sequences in these documents, this
can be removed.

MFC after:	1 week
2011-06-03 11:58:17 +00:00
Peter Grehan
87c3644c64 IFC @ r222256 2011-05-24 15:39:34 +00:00
Warner Losh
d380e0d209 Start to usher INSTALL_NODEBUG hack out the door. Add new
WITH{OUT,}_KERNEL_SYMBOLS (defaulting to WITH).  In the fullness of
time, likely around 2020, INSTALL_NODEBUG will be removed.  For now,
don't print a warning when using INSTALL_NODEBUG, but that will be
coming soon.
2011-05-22 18:01:52 +00:00
Warner Losh
0163af2360 Implement WITH{,OUT}_{GCC,BINUTILS} to provide finer-grained control
over building gcc and binutils.  They default to true, unless
MK_TOOLCHAIN is no.

Reviewed by:	ru@
2011-05-19 05:13:25 +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
Ruslan Ermilov
56c14fc8c5 Removed unsupported options MK_BINUTILS and MK_GCC that were
silently added in r218936.
2011-05-10 11:00:40 +00:00
Ruslan Ermilov
4b89ae574c Another fallout from r220359: MK_GNU_CPIO was mistakenly re-added
after being removed in r205702.  Remove it again.
2011-05-10 10:48:43 +00:00
Bjoern A. Zeeb
970a765389 Introduce two new options MK_INET and MK_INET_SUPPORT analogically
with INET6 equivalents. Patch reather than re-genenerating src.conf
(given the current problem with the script that does the re-gen).

Reviewed by:	gnn
Sponsored by:	The FreeBSD Foundation
Sponsored by:	iXsystems
MFC after:	2 weeks
2011-04-30 17:58:28 +00:00
Dimitry Andric
58ff0f42ba Remove support for the Intel C Compiler from the build infrastructure.
This support has not worked for several years, and is not likely to work
again, unless Intel decides to release a native FreeBSD version of their
compiler. ;)
2011-04-19 18:09:21 +00:00
Dimitry Andric
6d67f69487 Remove libobjc and other Objective-C related components, as these are
extremely outdated, and not used by anything in the base system.

Silence from:	current@
2011-04-17 21:03:23 +00:00
Ulrich Spörlein
b3eb927f6e Complete WITHOUT_CXX support. It implies WITHOUT_GROFF and
WITHOUT_CLANG.

Don't build clang bootstrap/build-tools depending on this flag. We also
keep gperf, devd and libstdc++ around to prevent foot-shooting and to
make this a two-way street.
2011-04-06 20:08:23 +00:00
Warner Losh
1b59591956 Make clang default on x86 and powerpc, but not on other architectures.
Make fdt default on arm and powerpc.

This now includes cross compiled targets, where before we tried to
make it host-based.

Also, move the lists of default yes and no options to a variable.

In general, only build tools should get this treatment in bsd.own.mk.
Also, the use of TARGET* in the bsd.*mk files is discouraged, but
necessary here due to the ordering of things in buildworld.  We make
the native case work by testing MACHINE_ARCH after TARGET_ARCH.
2011-04-05 08:49:47 +00:00
Jeff Roberson
aa0a1e58f0 - Merge in OFED 1.5.3 from projects/ofed/head 2011-03-21 09:58:24 +00:00
Martin Matuska
432edffe38 Add ssse3 capability for CPUTYPE=core2 to MACHINE_CPU in bsd.cpu.mk
MFC after:	2 weeks
2011-03-14 13:36:51 +00:00
Martin Matuska
d93806e2f1 Add AMD Geode CPU type to bsd.cpu.mk and examples/etc/make.conf
For CPUTYPE=core2 use -march=core2

PR:		gnu/155308
MFC after:	2 weeks
2011-03-07 14:58:23 +00:00
Pawel Jakub Dawidek
a6c0f1f242 To be able to use printf extensions we need to turn off gcc format checking.
Following the convention of NO_WERROR and NO_WCAST_ALIGN add NO_WFORMAT,
which, when defined in Makefile, turns off compile-time format checking
(by adding -Wno-format), but still allows to use high WARNS level.

MFC after:	2 weeks
2011-03-07 09:28:21 +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
Warner Losh
d51726b0b3 Back out 218933 and 281934. The easy cases still worked, but some
hard cases broke in worse ways than the status quo.  Back them out
until that can be resolved.
2011-02-22 04:49:57 +00:00
Warner Losh
016b099e47 Testing based on MACHINE_ARCH is problematic. Default to yes to build
clang.  A separate change will fix buildworld to default to yes or no
based on the target.
2011-02-22 04:03:33 +00:00
Martin Matuska
c42ed003e9 Add opteron-sse3, athlon64-sse3 and k8-sse3 cpu types to bsd.cpu.mk.
- add "sse3" to MACHINE_CPU for the new cpu types
- for i386, default to CPUTYPE=prescott for the new cpu types

PR:		gnu/154906
Discussed with:	kib, kan, dim
MFC after:	2 weeks
2011-02-20 22:32:21 +00:00
Giorgos Keramidas
61e05fce5e Add LIBEXECDIR to the bsd.own.mk vars, pointing to /usr/libexec by default
Some of the patches we are preparing for porting ATF from NetBSD
refer to '/usr/libexec' several times.  Instead of repeating the
path all over the place, add ${LIBEXECDIR} to match ${LIBDATADIR}
and reduce the redundancy of the relevant makefiles.

Submitted by:	Garrett Cooper <yanegomi@gmail.com>
Approved by:	ru
MFC after:	1 month
2011-02-10 19:13:54 +00:00
Nathan Whitehorn
4c8945a06b Update dialog to version 20100428. This changes the license under which
dialog is distributed from GPLv2 to LGPLv2 and introduces a number of new
features and a new and better libdialog API. The existing libdialog will
be kept temporarily as libodialog for compatibility purposes until sade,
sysinstall and tzsetup have been either updated or replaced.

__FreeBSD_version is now 900030.

Discussed on:	-current
Approved by:	core
Obtained from:	http://invisible-island.net/dialog
2011-01-12 14:55:02 +00:00
Warner Losh
cd2ae2532f Retire TARGET_ABI.
Implement MACHINE_ARCH=mips64e[lb] to build N64 images.  This replaces
MACHINE_ARCH=mipse[lb] TARGET_ABI=n64.

MACHINE_ARCH=mipsn32e[lb] has been added, but currently requires
WITHOUT_CDDL due to atomic issues in libzfs.  I've not investigated
this much, but implemented this to preserve as much of the TARGET_ABI
functionality that I could.  Since its presence doesn't affect the
working cases, I've kept it in for now.

Added mips64e[lb] to make universe, so more kernels build.

And I think this (finally) closes the curtain on the tbemd tree.
2011-01-07 20:26:33 +00:00
Konstantin Belousov
5ada7d99af Introduce make variable ACFLAGS used to supply additional flags to
cc driver when compiling assembler source file that is preprocessed.
2011-01-07 14:32:29 +00:00
Marius Strobl
aab88d9da4 - Add CPUTYPE support for sparc64. The net result is that it's now possible
to let the compiler optimize for the famility of UltraSPARC-III CPUs as the
  default already was to optimize for UltraSPARC-I/II and generating generic
  64-bit V9 is mainly for reference purposes. At least for SPARC64-V CPUs
  code optimized for UltraSPARC-I/II still is the most performant one.
  Thanks go to Michael Moll for testing SPARC64-V.
- Move a booke MACHINE_CPU bit into the right section.
2010-12-30 15:58:23 +00:00
Nathan Whitehorn
47033eb24d Enable build of FDT components by default. dtc is a required build tool
for all FDT-enabled kernels, and having it off by default means that
building these kernels fails by default. This fixes FDT-related build
failures in make universe on ARM and PowerPC.

Reviewed by:	imp
2010-12-22 14:59:22 +00:00
Adrian Chadd
7d31a76295 Re-enable generating links. 2010-11-16 22:23:20 +00:00
Adrian Chadd
84103d748f .. and then notice that the list of mk files is ordered, and update to suit. 2010-11-16 22:22:16 +00:00
Adrian Chadd
e04bbe2020 Add in forgotten install rule. 2010-11-16 22:21:14 +00:00
Warner Losh
f7ff90d7d2 This case is actually powerpc specific, and doesn't apply to powerpc64.
Submitted by:	nathanw@
2010-11-14 01:37:08 +00:00
Adrian Chadd
169733f46d Break out the rules which generate crunchgen'ed binaries into a separate
.mk file so they can be reused.

Introduce a new option, CRUNCH_BUILDTOOLS, which lists the binaries that
require tools built in the local architecture. sh and csh both require this.
It was previously hardcoded in rescue/rescue/Makefile .

Introduce a new option, CRUNCH_SHLIBS, which lists the shared libraries
to link against. These override the static libraries listed in CRUNCH_LIBS.
Some build environments may wish to use a handful of shared libraries
(eg libc.so) so other small, dynamic binaries can be run in the environment.

Remove the now-shared code from rescue/rescue/Makefile and introduce the
CRUNCH_BUILDTOOLS option for the above shells.
2010-11-13 03:11:27 +00:00
Dimitry Andric
bd4473b822 Fix typo, and re-wrap paragraph. 2010-11-11 23:00:37 +00:00
Warner Losh
e8dce5b9b3 Complete the integration of tbemd branch into head.
TARGET_BIG_ENDIAN is now completely dead, except where it was
originally supposed to be used (internally in the toolchain building).

TARGET_ARCH has changed in three cases:
(1) Little endian mips has changed to mipsel.
(2) Big endian mips has changed to mipseb.
(3) Big endian arm has changed to armeb.

Some additional changes are needed to make 'make universe' work on arm
and mips after this change, so those are commented out for now.

UPDATING information will be forthcoming.  Any remaining rough edges
will be hammered out in -current.
2010-11-10 06:39:49 +00:00
Oleksandr Tymoshenko
eef93d2fae - Introduce WITH_GPIO knob and disable building gpioctl
by default. Most systems do not need it.
2010-10-05 21:19:20 +00:00
Warner Losh
3c7f49dcf2 Prefer MACHINE_CPUARCH to MACHINE_ARCH unless there's a good reason... 2010-09-13 07:22:14 +00:00
Rui Paulo
004699f14f Add a comment describing where to include bsd.dtrace.mk.
Sponsored by:	The FreeBSD Foundation
2010-09-11 10:11:59 +00:00
Rui Paulo
51ccb83a39 Fix bugs introduced in the previous rev:
* add a phatom target for the DTRACEOBJS
* when invoking DTrace, don't add DTRACEOBJS to the command line.

Sponsored by:	The FreeBSD Foundation
2010-09-10 17:44:11 +00:00
Rui Paulo
9feea9c1f4 Fix typo in previous commit. 2010-09-10 17:00:48 +00:00
Rui Paulo
6a4e245b76 Add bsd.dtrace.mk. This allows userland programs and libraries to
define USDT probes on a provider.d file and then use this new make
infrastructure to build the corresponding header file and object file.

This will only take effect when the user defines WITH_DTRACE when building.

Sponsored by:	The FreeBSD Foundation
2010-09-10 16:27:09 +00:00
Rui Paulo
c2c48445ba Check the existence of a 'beforelinking' target and make the resulting
program or library depend on that before doing the final linking. This
will be needed by DTrace.

Sponsored by:	The FreeBSD Foundation
2010-09-10 16:21:09 +00:00
Rui Paulo
9a1d115000 Add the DTRACE variable that points to the executable.
Sponsored by:	The FreeBSD Foundation
2010-09-10 16:19:58 +00:00
Warner Losh
9bc38a3ba2 Now that we default to the proper endian, we don't need these for mips 2010-08-28 21:06:13 +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
Gabor Kovesdan
6608cc579e - Change default grep back to GNU version. BSD grep can be built with the
WITH_BSD_GREP knob.
- Bump __FreeBSD_version

Requested by:   dougb
Approved by:    delphij (mentor)
2010-08-23 10:04:26 +00:00
Rui Paulo
21022fe7e9 Remove LIBELF_PIC.
Sponsored by:	The FreeBSD Foundation
2010-08-21 17:53:16 +00:00
Rui Paulo
60b77a1e4b Add the definition of LIBELF_PIC.
Sponsored by:	The FreeBSD Foundation
2010-08-21 14:08:04 +00:00
Rui Paulo
187278cadc For every instance of '.if ${CC} == "foo"' or '.if ${CC} != "foo"' in
Makefiles or *.mk files, use ${CC:T:Mfoo} instead, so only the basename
of the compiler command (excluding any arguments) is considered.

This allows you to use, for example, CC="/nondefault/path/clang -xxx",
and still have the various tests in bsd.*.mk identify your compiler as
clang correctly.

ICC if cases were also changed.

Submitted by:	Dimitry Andric <dimitry at andric.com>
2010-08-17 20:39:28 +00:00
Rui Paulo
efdcc3d8d8 Make sure any -U CFLAGS are not filtered out when calling mkdep, as
gnu/usr.bin/cc/libiberty first defines the PREFIX macro, and then
undefines it again, so mkdep with clang complains.

Submitted by:	Dimitry Andric <dimitry at andric.com>
Reviewed by:	ru
2010-08-17 13:02:08 +00:00
Will Andrews
4be3feb212 Fix buildworld -DNO_CLEAN when using with Perforce, which marks files as
read-only by default, meaning files copied can't be overwritten next time.

Reviewed by:	imp
Approved by:	ken (mentor)
2010-08-12 20:46:49 +00:00
Rui Paulo
8589ca8418 Add LIBRTLD_DB.
Sponsored by:	The FreeBSD Foundation
2010-07-31 14:32:54 +00:00
Rui Paulo
b4d22b2cb9 Add missing escape characthers.
Pointed out by:	b.f.
2010-07-30 15:25:57 +00:00
Rui Paulo
3a1134997b Fix previous commit: I forgot to include parenthesis.
Submitted by:	anonymous
2010-07-30 08:52:19 +00:00
Rui Paulo
8a5216d5d8 When building WITH_CTF=1, print the ctf executable that's going to be
run. This makes the 'ctfconvert' and 'ctfmerge' programs show up during
a build when compiling a kernel, a library or a program.

Sponsored by:	The FreeBSD Foundation
2010-07-29 16:30:27 +00:00
Gabor Kovesdan
4dc88ebedf Add BSD grep to the base system and make it our default grep.
Deliverables: Small and clean code (1,4 KSLOC vs GNU's 8,5 KSLOC),
              lower memory usage than GNU grep, GNU compatibility,
              BSD license.

TODO:         Performance is somewhat behind GNU grep but it is only
              significant for bigger searches.  The reason is complex, the
              most important factor is that GNU grep uses lots of
              optimizations to improve the speed of the regex library.
              First, we need a modern regex library (practically by adopting
              TRE), add support for GNU-style non-standard regexes and then
              reevalute the performance issues and look for bottlenecks.  In
              the meantime, for those, who need better performance, it is
              possible to build GNU grep by setting WITH_GNU_GREP.

Approved by:            delphij (mentor)
Obtained from:          OpenBSD (http://www.openbsd.org/cgi-bin/cvsweb/src/usr.bin/grep/),
                        freegrep (http://github.com/howardjp/freegrep)
Sponsored by:           Google SoC 2008
Portbuild tests run by: kris, pav, erwin
Acknowledgements to:    fjoe (as SoC 2008 mentor),
                        everyone who helped in reviewing and testing
2010-07-22 19:11:57 +00:00
Nathan Whitehorn
13109bdf8d Minor modifications to know what to do with powerpc64. 2010-07-10 02:32:50 +00:00
Bjoern A. Zeeb
88aca62490 Also install the new bsd.arch.inc.mk filed. Missed in r204020.
Reviewed by:	imp
2010-07-06 18:07:56 +00:00
Rafal Jaworowski
d7af5349ec Do not set WITH_FDT by default based on arch, as this does not work for
a bootstrap stage tool.

FDT-enabled platforms will have to specify WITH_FDT explicitly at buildworld
time for now until TBEMD is complete, which is going to provide means for such
arch based selection of build components.

Discussed with:	imp
2010-06-13 12:53:44 +00:00
Warner Losh
aef87548f3 Merge from tbemd
Enhance Makefile.inc processing, when asked for, to include the most
specific (MACHINE specific) to least specific (MACHINE_CPUARCH).

Reviewed by:	arch@ (mostly silence though)
2010-06-11 02:50:53 +00:00
Warner Losh
6fc3ead135 Merge from tbemd branch:
Introduce MACHINE_CPUARCH.  Many different MACHINE_ARCHs will be built
from one MACHINE_CPUARCH.  This will allow us to move to a more
standard MACHINE_ARCH for mips and arm which exist in many different
endian variants, and for powerpc where both 32 and 64 bit binaries are
generated from the same sources.

Reviewed by:	arch@ (mostly silence though)
2010-06-11 02:43:36 +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
Rafal Jaworowski
a328ce6ded Use MACHINE_ARCH instead of TARGET_ARCH.
Pointed out by:	imp
2010-05-26 09:23:51 +00:00
Jung-uk Kim
2ddf40c67d MFC: r208320
Add a new build option, MAN_UTILS.  This option lets you control building
utilities and related support files for manual pages, which were previously
controlled by MAN.  For POLA, the default depends on MAN, i.e., WITHOUT_MAN
implies WITHOUT_MAN_UTILS and WITH_MAN implies WITH_MAN_UTILS.
Note this patch implicitly fixes a documentation bug of src.conf(5), which
says WITHOUT_MAN may be used to not build manual pages while it was also
disabling some utilities for manual pages.

Approved by:	re (kib)
2010-05-25 20:16:36 +00:00
Rafal Jaworowski
4f1ca2a872 Introduce a new build knob for Flattened Device Tree support.
Reviewed by:	imp
Sponsored by:	The FreeBSD Foundation
2010-05-25 15:12:21 +00:00
Maxim Konovalov
a6f236363d o Remove EoL w/spaces introduced in the last commit.
Spotted by:	uqs
2010-05-22 20:19:12 +00:00
Maxim Konovalov
2a7f227fd5 o Grammar.
PR:		conf/146827
Submitted by:	chris petrik
2010-05-22 16:30:33 +00:00
Jung-uk Kim
07e547fe26 Add a new build option, MAN_UTILS. This option lets you control building
utilities and related support files for manual pages, which were previously
controlled by MAN.  For POLA, the default depends on MAN, i.e., WITHOUT_MAN
implies WITHOUT_MAN_UTILS and WITH_MAN implies WITH_MAN_UTILS.  This patch
is slightly improved by me from:

PR:		misc/145212
2010-05-19 23:56:26 +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
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
Xin LI
9120f4c885 MFC r206973:
When CPUTYPE is defined to any value, on amd64 platform "mmx" is
available through MACHINE_CPU, indicating the CPU supports that
feature, as done by revision 138685.

This changeset adds "mmx" into the default amd64 MACHINE_CPU list
when no CPUTYPE is specified to provide consistent behavior.

PR:		amd64/145593
Submitted by:	mm
2010-05-05 00:38:20 +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
Xin LI
611049ae75 When CPUTYPE is defined to any value, on amd64 platform "mmx" is
available through MACHINE_CPU, indicating the CPU supports that
feature, as done by revision 138685.

This changeset adds "mmx" into the default amd64 MACHINE_CPU list
when no CPUTYPE is specified to provide consistent behavior.

PR:		amd64/145593
Submitted by:	mm
MFC after:	2 weeks
2010-04-21 01:13:08 +00:00
Alexander Leidinger
21edb039c6 WITH_CTF can now be specified in src.conf (not recommended, there
are some problems with static executables), make.conf (would also
affect ports which do not use GNU make and do not override the
compile targets) or in the kernel config (via "makeoptions
WITH_CTF=yes").

Additional (related) changes:
 - propagate WITH_CTF to module builds
 - do not add -g to the linker flags, it's a noop there anyway
   (at least according to the man page of ld)
 - do not add -g to CFLAGS unconditionally
   we need to have a look if it is really needed (IMO not) or if there
   is a way to add it only when WITH_CTF is used

Note: ctfconvert / ctfmerge lines will not appear in the build output,
to protect the innocent (those which do not build with WITH_CTF would
see the shell-test and may think WITH_CTF is used).

Reviewed by:	imp, jhb, scottl (earlier version)
Discussed on:	arch@
2010-04-02 06:55:31 +00:00
Xin LI
92fc47574f MFC r205702:
Remove GNU cpio after fix of CVE-2010-0624.

Note that this is actually a no-op for most users, as this GNU
cpio was broken on -HEAD and 8-STABLE since last March until
the recent fix.

FreeBSD 8.0+ uses BSD cpio by default and the code is being
actively maintained.
2010-03-29 18:24:08 +00:00
Xin LI
36e60cda45 Remove GNU cpio after fix of CVE-2010-0624.
Note that this is actually a no-op for most users, as this GNU
cpio was broken on -HEAD and 8-STABLE since last March until
the recent fix.

FreeBSD 8.0+ uses BSD cpio by default and the code is being
actively maintained.

Blessed by:	kientzle
With hat:	secteam
MFC after:	3 days
2010-03-26 17:02:32 +00:00
Warner Losh
1e818404a3 -mabi-calls and -msoft-float aren't needed either
Submitted by:	jmallet@
2010-03-02 07:44:38 +00:00
Warner Losh
ab6b8778d7 -mno-dsp hasn't been required for a while now. 2010-03-02 07:24:47 +00:00
Ruslan Ermilov
9fd69f37d2 Fixed missing or broken library dependencies. 2010-02-25 14:42:26 +00:00
Neel Natu
6f3c632700 Kernel module support for mips.
Reviewed by: gonzo

Tested by: Alexandr Rybalko (ray@dlink.ua)
2010-02-18 05:49:52 +00:00
Marcel Moolenaar
8eba8cd863 Also add DEBUG_FLAGS to CXXFLAGS if defined. 2010-02-18 03:32:51 +00:00
Marcel Moolenaar
c9a900ed44 Allow suppression of -Wcast-align for WARNS>=4 by defining
NO_WCAST_ALIGN. The headers of the standard C++ library are
not 64-bit clean and trigger the warning. This prevents use
of WARNS>=4 on ia64 for example.
2010-02-18 02:06:57 +00:00
Marcel Moolenaar
96f2d85e89 Unbreak WARNS=6 builds for C++ code: -Wold-style-definition is not accepted
by the C++ compiler. Filter it out.
2010-02-18 01:44:48 +00:00
Antoine Brodin
2265536f11 Merge r201920 to stable/8:
libusb20 was renamed libusb several months ago.
2010-02-13 17:48:52 +00:00
Antoine Brodin
c9e0de0179 MFC r202440 to stable/8:
Unbreak world WITHOUT_NETGRAPH.

  PR:		137487
  Submitted by:	bf (previous version)
  No objections:	net@
2010-01-30 15:40:00 +00:00
Stephane E. Potvin
424b4e66a9 Introduce two new flags PO_CFLAGS and PO_CXXFLAGS to make it possible
to have different flags when building profiled objects.

MFC after:	1 month
2010-01-22 14:05:48 +00:00
Ruslan Ermilov
a5cc755e58 MFC r202578 and r202579:
If CTAGS is not set or set to something other than "ctags" or "gtags",
"cleandepend" was not removing the .depend file; fixed. [1]

Allow the CTAGS to be set to something other than "gtags" or "ctags",
but assume it supports a ctags(1)-compatible syntax. [2]

PR:		126747 [1], 46676 [2]
2010-01-21 13:15:14 +00:00
Edward Tomasz Napierala
e73a17cf23 Undo r169961, removing WITH_GCC3, added as a temporary workaround three
years ago.
2010-01-18 21:56:08 +00:00
Ruslan Ermilov
213a44479c Allow the CTAGS to be set to something other than "gtags" or "ctags",
but assume it supports a ctags(1)-compatible syntax.

PR:		46676
Submitted by:	Lyndon Nerenberg
MFC after:	3 days
2010-01-18 15:58:02 +00:00
Ruslan Ermilov
2f82e3b16d If CTAGS is not set or set to something other than "ctags" or "gtags",
"cleandepend" was not removing the .depend file; fixed.

PR:		126747
MFC after:	3 days
2010-01-18 15:41:55 +00:00
Antoine Brodin
622008b65d Unbreak world WITHOUT_NETGRAPH.
PR:		137487
Submitted by:	bf (previous version)
No objections:	net@
MFC after:	2 weeks
2010-01-16 12:20:26 +00:00
Antoine Brodin
3bbf60adbb libusb20 was renamed libusb several months ago.
MFC after:	1 month
2010-01-09 18:55:29 +00:00
Ed Schouten
03bc68ca09 Disable K&R style function definitions for WARNS=6.
Unfortunately there are two slight problems with that:

- Yacc and lex might generate code that generates warnings because of
  this. Require yacc and lex to be rebuilt during bootstrap. I'm not
  incrementing __FreeBSD_version here, because I assume someone else
  will do this eventually.

- When running `make buildkernel', it uses share/mk from the source
  treeo to build aicasm. Because aicasm also depends on lex, this would
  break. Lower WARNS to 5 for now. We should just increment it to 6
  again somewhere in the very far future.
2009-12-31 00:07:26 +00:00
Ed Schouten
4bc9493e7c Make `make cleanilinks' work in /sys/modules.
cleanilinks wasn't listed in <bsd.subdir.mk>. Instead of adding it to
/sys/modules/Makefile, we'd better just add it to <bsd.subdir.mk>
directly, so we don't need to change files like /sys/modules/sound/Makefile
as well. This means you can finally clean up all those dangling symlinks
created by individual module compilation at once.
2009-12-06 08:59:19 +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
Ruslan Ermilov
b48db8e12d Unbreak NO_WARNS, keeping CSTD effect on CFLAGS out of its control.
Unbreak compiles with icc.
2009-10-22 11:45:35 +00:00
Roman Divacky
9448b439ec Set CSTD in all cases except when CC=icc and NO_WARNS is set. This
way we can set desired C standard even for cross tools etc.

Tested by:	make universe
Approved by:	ed (maintainer)
OK by:		das
2009-10-21 17:07:46 +00:00
Alexander Kabaev
2286fe7635 Second attempt at eliminating .text relocations in shared libraries
compiled with stack protector.

Use libssp_nonshared library to pull __stack_chk_fail_local symbol into
each library that needs it instead of pulling it from libc. GCC
generates local calls to this function which result in absolute
relocations put into position-independent code segment, making dynamic
loader do extra work every time given shared library is being relocated
and making affected text pages non-shareable.

Reviewed by:        kib
Approved by:        re (kib)
2009-07-14 21:19:13 +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
Doug Barton
536613bc35 Add support for the build options that are currently in the port:
WITH_BIND_IDN
	WITH_BIND_LARGE_FILE
	WITH_BIND_SIGCHASE
	WITH_BIND_XML
2009-06-01 21:58:59 +00:00
Ed Schouten
d2a0bb0803 Remove if_ppp(4) and if_sl(4).
Not only did these two drivers depend on IFF_NEEDSGIANT, they were
broken 7 months ago during the MPSAFE TTY import. if_ppp(4) has been
replaced by ppp(8). There is no replacement for if_sl(4).

If we see regressions in for example the ports tree, we should just use
__FreeBSD_version 800045 to check whether if_ppp(4) and if_sl(4) are
present. Version 800045 is used to denote the import of MPSAFE TTY.

Discussed with: rwatson, but also rwatson's IFF_NEEDSGIANT emails on the
                lists.
2009-04-05 22:08:18 +00:00
Nathan Whitehorn
1c96bdd146 Add support for 64-bit PowerPC CPUs operating in the 64-bit bridge mode
provided, for example, on the PowerPC 970 (G5), as well as on related CPUs
like the POWER3 and POWER4.

This also adds support for various built-in hardware found on Apple G5
hardware (e.g. the IBM CPC925 northbridge).

Reviewed by:    grehan
2009-04-04 00:22:44 +00:00
Roman Divacky
300d03a832 Switch over to gnu99 compilation on default for userland.
Tested by:	make universe
Tested by:	ports exp build (done by pav)
Reviewed by:	ru
Reviewed by:	silence on arch
Approved by:	ed (mentor)
2009-03-14 17:55:16 +00:00
Nathan Whitehorn
5b4975b180 Explicitly disable generation of Altivec instructions in the kernel on PowerPC,
and add support to allow users to set their CPUTYPE in make.conf.
2009-02-22 18:45:30 +00:00
Bjoern A. Zeeb
67e7848003 Document that with r186854 we started using KMODOWN/KMODGRP
for the kernel as well and no longer only for modules.

Reviewed by:	kib, antoine
MFC after:	26 days
2009-01-08 12:22:37 +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
Warner Losh
258f85b951 ata module additions now nest ata modules one deeper than any prior module.
Increase heuristic used to find them by one.
2008-10-09 22:01:27 +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
Warner Losh
a678ba4ec8 Turn of SSP for mips for now until support is added to the base
architecture.
2008-07-23 06:14:21 +00:00
Olivier Houchard
ad8abd6c4d Disable SSP on arm for the time being.
The segfaults when using SSP seem to be a gcc bug, a patch is available
in the gcc bugzilla, and will be imported once it's committed
into the official gcc tree.
2008-07-19 00:19:16 +00:00
Ruslan Ermilov
042df2e2da Enable GCC stack protection (aka Propolice) for userland:
- It is opt-out for now so as to give it maximum testing, but it may be
  turned opt-in for stable branches depending on the consensus.  You
  can turn it off with WITHOUT_SSP.
- WITHOUT_SSP was previously used to disable the build of GNU libssp.
  It is harmless to steal the knob as SSP symbols have been provided
  by libc for a long time, GNU libssp should not have been much used.
- SSP is disabled in a few corners such as system bootstrap programs
  (sys/boot), process bootstrap code (rtld, csu) and SSP symbols themselves.
- It should be safe to use -fstack-protector-all to build world, however
  libc will be automatically downgraded to -fstack-protector because it
  breaks rtld otherwise.
- This option is unavailable on ia64.

Enable GCC stack protection (aka Propolice) for kernel:
- It is opt-out for now so as to give it maximum testing.
- Do not compile your kernel with -fstack-protector-all, it won't work.

Submitted by:	Jeremie Le Hen <jeremie@le-hen.org>
2008-06-25 21:33:28 +00:00
Alex Dupre
172b9da045 Fix links to online gcc docs.
Reported by:	Andre Guibert de Bruet <andy@siliconlandmark.com>
MFC after:	1 day
2008-06-25 06:07:03 +00:00
Doug Barton
d57e5bc480 Properly alphabetize the BSD_CPIO option 2008-06-16 07:23:12 +00:00
Doug Barton
6973701a00 1. Make the BSD version of cpio the default [1]
a. The BSD version will be built and installed unless
WITHOUT_BSD_CPIO is defined.
b. The GNU version will not be built or installed unless
WITH_GNU_CPIO is defined. If this is defined, the symlink
in /usr/bin will be to the GNU version whether the BSD
version is present or not.

When these changes are MFCed the defaults should be flipped.

2. Add a knob to disable the building of GNU grep. This will
make it easier for those that want to test the BSD version in
the ports.

Approved by:	kientzle [1]
2008-06-16 05:48:15 +00:00
Bjoern A. Zeeb
2e598474fa Remove ISDN4BSD (I4B) from HEAD as it is not MPSAFE and
parts relied on the now removed NET_NEEDS_GIANT.
Most of I4B has been disconnected from the build
since July 2007 in HEAD/RELENG_7.

This is what was removed:
- configuration in /etc/isdn
- examples
- man pages
- kernel configuration
- sys/i4b (drivers, layers, include files)
- user space tools
- i4b support from ppp
- further documentation

Discussed with: rwatson, re
2008-05-26 10:40:09 +00:00
John Birrell
770ac3b21f Add support for the Compact C Type (CTF) conversions throughout FreeBSD's
system makefiles.

Note that the CTF conversion defaults to off. We may choose to change this
default later if DTrace proves popular and people are prepared to wear
the compilation performance impact of compiling with debug symbols all the
time.

Setting NO_CTF in the make args or user environment turns off CTF conversion.
Even if we choose to default CTF generation to on later, we still need
NO_CTF so that the buildworld process can bootstrap the tools without
needlessly generating CTF data for temporary tools.

Setting WITH_CTF in the make args or user environment (and _NOT_ in
/etc/make.conf) is the only way to enable CTF data conversion. Nore that
this can't be implemented the same way that the WITH_ and WITHOUT_ stuff
is implemented throughout the buildworld because the CTF conversion needs
to work when building a simple object without a Makefile, using the
default rules in sys.mk.

Typing 'make test.o' with no makefile and just a source file test.c
should work. Also, typing 'make WITH_CTF=1 test.o without a makefile and
just a source file test.c should work and produce an object with a CTF
elf section. Typing 'make WITH_CTF=1 CFLAGS=-g test.o' without a makefile
and just a source file test.c should produce an object with both a CTF
elf section and the debug elf sections.

In the FreeBSD build where more .mk files are used than just sys.mk
which is included my make by default, the use of DEBUG_FLAGS is the
correct way to enable a debug build. The important thing to note here
is that it is the DEBUG_FLAGS setting that prevents libraries and
programs from being stripped on installation. So, for the addition of
CTF data conversion, setting DEBUG_FLAGS to contain -g, without NO_CTF,
will cause the ctfconvert and ctfmerge build programs to be executed
also with the -g arg so that debug symbols are retained rather than
being removed after the CTF data elf section has been added.

Add DTrace libraries to the list of libnames.
2008-05-22 01:14:43 +00:00
Doug Rabson
33f1219925 Fix conflicts after heimdal-1.1 import and add build infrastructure. Import
all non-style changes made by heimdal to our own libgssapi.
2008-05-07 13:53:12 +00:00
Oleksandr Tymoshenko
04e109f098 Handle endianness for mips
Approved by:	cognet (mentor)
2008-04-28 14:54:17 +00:00
Alexander Kabaev
046f4eba8c Fix spelling mistake in comment. 2008-04-09 20:27:53 +00:00
Warner Losh
fd08931dd5 MFp4 (mips2-jnpr):
o Default to -O on mips as well as arm.  -O2 has been strongly implicated
  in many problems in the past, so we're taking a conservative approach
  until the problems are well understood.
2008-04-04 21:12:40 +00:00
David E. O'Brien
20c46652dc PR ports/121363 (& ports/73797) has been committed, so we can now go back
to JB's revision 1.96 change to remove -fno-strict-aliasing from CFLAGS.

This makes the default CFLAGS to match the simple defaults that the
tinderboxes use.  By using -fno-strict-aliasing by default we are
choosing to ignore problems in code which had the potential to
shoot ourselves in the foot.
2008-04-02 17:24:22 +00:00
Ruslan Ermilov
dbdb679c6f Remove options MK_LIBKSE and DEFAULT_THREAD_LIB now that we no longer
build libkse.  This should fix WITHOUT_LIBTHR builds as a side effect.
2008-03-29 17:44:40 +00:00
Warner Losh
88f25023dc Add support for MACHINE_ARCH == mips, plus a few generic CPU types that
will be supported in the forth coming FreeBSD/mips port.
2008-03-19 12:20:44 +00:00
David E. O'Brien
92aa7717fa Temporarily back out revision 1.98 to give Portmgr some time to
address PR ports/121363 (current day re-opening of PR ports/73797)
to make ports CFLAGS more independent of src/'s CFLAGS WRT aliasing.

Discussed with: brooks
2008-03-04 20:26:03 +00:00
David E. O'Brien
b9b482710e Back out revision 1.97, which backed out part of revision 1.96.
Change the default CFLAGS to match the simple defaults that the
tinderboxes use.  By using -fno-strict-aliasing by default we are
choosing to ignore problems in code which had the potential to
shoot ourselves in the foot.
2008-03-04 19:00:11 +00:00
Rafal Jaworowski
321578e3d0 Connect MPC85XX to the PowerPC build.
The kernel config file is KERNCONF=MPC85XX, so the usual procedure applies:

1. make buildworld TARGET_ARCH=powerpc
2. make buildkernel TARGET_ARCH=powerpc TARGET_CPUTYPE=e500 KERNCONF=MPC85XX

This default config uses kernel-level FPU emulation. For the soft-float world
approach:

1. make buildworld TARGET_ARCH=powerpc TARGET_CPUTYPE=e500
2. disable FPU_EMU option in sys/powerpc/conf/MPC85XX
3. make buildkernel TARGET_ARCH=powerpc TARGET_CPUTYPE=e500 KERNCONF=MPC85XX

Approved by:	cognet (mentor)
MFp4:		e500
2008-03-03 20:40:20 +00:00
John Baldwin
10250ddd27 Add a 'c7' CPUTYPE for VIA C7 CPUs that is 'c3-2' with the addition of
i686, sse2, and sse3.

MFC after:	1 week
2008-02-29 19:20:05 +00:00
Ruslan Ermilov
e901b583be Add LIBELF. 2008-02-21 16:29:31 +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
Ruslan Ermilov
4ef19e9667 Cosmetique: sort the list. 2008-01-24 07:03:21 +00:00
Christian Brueffer
7500fac915 Remove remnants of old *_FORTRAN build flags.
Approved by:	rwatson (mentor)
MFC after:	3 days
2008-01-17 20:51:58 +00:00
Hartmut Brandt
02c3c75236 Add an additional make variable EXTRAMIBSYMS which allows to specify
definition files that are used only for extracting symbols. This is useful
for inter-module dependencies and files containing only enum-definitions.

MFC after:	4 weeks
2008-01-08 12:55:56 +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
Ruslan Ermilov
157deb6a4e Make "manlint" recursive.
Prodded by:	obrien
2007-12-07 15:02:06 +00:00
John Birrell
221a97c194 Although the entire src tree builds cleanly now without -fno-strict-aliasing
in the default CFLAGS, we're in the middle of a ports freeze, so we can't
really go making the corresponding change to the ports mk files.

I'll take -fno-strict-aliasing out again when the ports freeze ends.
2007-11-26 21:46:21 +00:00
John Birrell
cfb5b3256b Re-enable -Werror again.
This time, change the default CFLAGS to match the simple defaults that
the tinderboxes use. That is, don't use -fno-strict-aliasing by default.

My last attempt to re-anable -Werror gave me a lesson in what strict
aliasing is all about. There was code in libthr that wasn't 64-bit clean.
The default use of -fno-strict-aliasing hid that.

By using -fno-strict-aliasing by default we were choosing to ignore
problems in code which had the potential to shoot ourselves in the
foot. Sometimes it would be the 64-bit foot. I have both feet. The left
ones are 32 bits and the right ones are 64 bits. Don't ask about my
endian orientation. :-)

The -fno-strict-aliasing compiler arg can still be used if NO_STRING_ALIASING
is define in make.

We are early in the FreeBSD 8 development, so we have the opportunity to
wait and see if this works for us. I am sure that people will complain.
We can easily revert this. All I ask is that we take sides: clean code or
not. YMMV.

Note that by using -fno-strict-aliasing the build won't actually break.
Only where WARNS is set (and -Werror is used) will a compiler warning break
the build. The use of WARNS levels implies (to me at least) that the
developer has taken some care to make the code pass basic checks. This
commit makes those checks just a little bit more strict.
2007-11-22 23:21:12 +00:00
John Birrell
f9f50330f3 Unfortunately the tinderbox setup uses custom CFLAGS which are a big
obstacle to enabling -Werror. I'll continue to work on cleaning up the
code so that we can keep this enabled.

If the tinderboxes would just use the default CFLAGS set in this file,
all would be fine and we'd be able to make use of -Werror.
2007-11-19 22:39:39 +00:00
John Birrell
76f9e2ec8f Re-enable -Werror ins WARNS as it was roughly 6 months ago before
being disabled while gcc 4.2 was bedded in.

Tested with 'make release' (amd64 arm i386 ia64 pc98 powerpc sparc64 sun4v)
2007-11-19 09:09:02 +00:00
John Birrell
c117aee58e Weed out a warning argument that isn't applicable to C++ code. 2007-11-19 09:01:58 +00:00
Olivier Houchard
cdc162fe0e Switch arm to -O until the -O2 issues are resolved.
MFC After:	3 days
2007-11-05 23:08:34 +00:00
Yaroslav Tykhiy
a39cea66f4 Allow the shell used by make(1) to be changed early via the
__MAKE_SHELL variable.  This feature isn't supposed to be in wide
use, but it's needed now to make `installworld' independent of the
stock binaries and libs so that radical ABI changes can go in safely.

Reviewed by:	ru
2007-10-27 18:40:34 +00:00
Ruslan Ermilov
4f6d329f1e - Convert NO_INSTALLLIB option to a new syntax: makefiles should
test MK_INSTALLLIB, users can set WITHOUT_INSTALLLIB.  The old
  NO_INSTALLLIB is still supported as several makefiles set it.

- While here, fix an install when instructed not to install libs
  (usr.bin/lex/lib/Makefile).

PR:		bin/114200
Submitted by:	Henrik Brix Andersen
2007-10-20 19:01:50 +00:00
Ruslan Ermilov
2e0a54d6c0 Align the warning message with the one in bsd.own.mk. 2007-10-20 18:46:15 +00:00
Yaroslav Tykhiy
479f84ca4d Explicitly verify if we have found the VERSION_GEN script
instead of passing the possibly null argument to awk(1) and
getting an obscure error from it.
2007-10-18 15:21:35 +00:00
Yaroslav Tykhiy
91fb7b9b19 Distinguish the cases when a dup symbol is in different versions
(evil, needs a error) or in the same version (harmless, deserves
a mere warning).

Noticed by:     grehan@, tinderbox
2007-10-18 10:32:28 +00:00
Yaroslav Tykhiy
39d5a8ffea MFp4:
- Check for duplicated symbols and suggest moving them to ObsoleteVersions.
- Improve and unify error handling.
- Make the regular expressions more uniform, robust, and less sensitive
  to harmless variations in the input such as those to whitespace amount.

Reviewed by:	deischen
Tested with:	md5 (Version.map files in /usr/obj stay the same)
2007-10-17 20:09:56 +00:00
Olivier Houchard
4251babd0a Backout rev 1.62, and revert to use -march=armv5te -D__XSCALE__ instead
of -mcpu=xscale for XScale.
gcc still has issues with -mcpu=xscale, and now crashes while building
systat.

Reported by:	sam
MFC After:	3 days
2007-10-16 18:32:37 +00:00
Ruslan Ermilov
64965b5788 Though it was possible to configure our BIND to build even when
libpthread support isn't present, our maintainer felt it's an
overkill, so instead enforce the BIND dependency on libpthread.
2007-10-12 08:03:51 +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
Ruslan Ermilov
71ce49ae8d Fixed "make checkdpadd" (missing library dependencies).
Approved by:	re (kensmith)
2007-10-01 18:15:11 +00:00
Xin LI
179dc282b4 Restore -O2 optimization after gcc 4.2.1 import, which has
fixed the issue raised by gcc 4.2.0.

Tested with:	test case found in gcc bug 32500
Approved by:	re (kensmith), ache, kan
2007-08-14 13:44:08 +00:00
Alexander Kabaev
9f40824852 Put local symbol suppression rule into most recent (e.g. last) version
block.

Approved by:	re (kensmith)
2007-07-21 20:52:32 +00:00
Andrey A. Chernov
5f308feb93 Switch to "-O1 -pipe" as cross-build compatible gcc workaround.
"Looks like Alexander chimed in with "I'm comfortable with that until we
can import a fixed GCC"."

Approved by:	re (kensmith)
2007-07-01 11:51:06 +00:00
Andrey A. Chernov
cf7e2eb063 Back out gcc workaround per re@ request. Details:
"There seems to be some continuing discussion about how this is best fixed,
and we'd like to get Alexander (as our gcc guru) to opine on a final
solution before picking one.  In the mean time, could you back out the
original commit (sys.mk:1.89)?"

Approved by:	re (rwatson)
2007-06-28 09:25:47 +00:00
Remko Lodder
4907faa674 Make zoneinfo optional so that a filesystem upgrade/update does not overwrite
possibly installed thirdparte zoneinfo databases (from ports for example).

PR:		bin/104713
Submitted by:	Mark Andrews <Mark_Andrews at isc dot org> (original patch
		rewritten by me to be more consistent with the new practise).
Approved by: 	re (kensmith)
Approved by:	imp (mentor)
Reviewed by:	ru (some time ago already)
2007-06-26 19:40:03 +00:00
Andrey A. Chernov
3f5b2c267b This is temp workaround of nasty gcc 4.2.0 -O2 bug which may skip the rest
of the loop when arrays used inside.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32500

Approved by:    re (kensmith)
2007-06-26 19:10:20 +00:00
Stephane E. Potvin
04031e9ae2 Options spring cleanup:
- Add and document the KVM and KVM_SUPPORT options that
are needed for the ifmcstats(3) makefile
- Garbage collect unused variables
- Add missing inclusion of bsd.own.mk where needed

Approved by: kan (mentor)
Reviewed by: ru
2007-06-13 02:08:04 +00:00
Pav Lucistnik
ed88f73921 Break long line
Submitted by:	ru
2007-06-01 15:32:23 +00:00
Pav Lucistnik
e61e798b8c Add bsd.port.options.mk, a stub to include parts of bsd.port.mk that handle
OPTIONS resolving. This will allow us to load bsd.port.mk in port Makefiles in
three steps (options, pre, post), allowing us to manipulate USE_* flags
conditionally on OPTIONS values.

With hat:	portmgr
Reviewed by:	ru
MFC after:	1 week
2007-06-01 15:17:51 +00:00
David E. O'Brien
9eef6e338b Temporarily add 'WITH_GCC3' that removes -Wno-pointer-sign from the
compiler invocation.  This is just to help get over the hump of people
tracking down bugs that may cross the GCC 4.2 upgrade.
It is envisioned that this option goes away after a suitable amount
of time.
2007-05-24 21:53:42 +00:00
Ruslan Ermilov
dc9f26d3c3 Style: remove redundant parentheses. 2007-05-21 09:01:23 +00:00
Olivier Houchard
ecf7ac028b GCC doesn't segfault anymore while building world with -mcpu=xscale, so use it. 2007-05-21 08:39:44 +00:00
Alexander Kabaev
36aa6a9be5 Introduce WITHOUT_SSP option that allows users to exclude LGPLed
libssp from the build.
2007-05-19 04:42:59 +00:00
Alexander Kabaev
d9e2d1a3b5 Universally disable -Werror until src/ is in better shape for GCC 4.2.
There are new warnings that kill the build otherwise.

Disable pointer destination sign mismatch warning alltogether. Our tree
is in no shape to have that enabled yet.
2007-05-19 04:41:05 +00:00
Daniel Eischen
00fb440c1a Enable symbol versioning by default. Use WITHOUT_SYMVER to disable it.
Warning, after symbol versioning is enabled, going back is not easy
(use WITHOUT_SYMVER at your own risk).

Change the default thread library to libthr.

There most likely still needs to be a version bump for at least the
thread libraries.  If necessary, this will happen later.
2007-05-13 14:12:40 +00:00
Daniel Eischen
06097b1060 Use CPP to preprocess version map files so we can conditionalize symbols. 2007-04-29 14:00:58 +00:00
Daniel Eischen
6f91e7a3af When generating the version map file, order versions oldest
first to make it easier for rtld to choose the oldest version
of a symbol.

Sumbitted by:	kan
2007-04-23 03:24:33 +00:00
Pawel Jakub Dawidek
834236916f Oops, keep things sorted.
Found by:	ru
2007-04-06 10:33:06 +00:00
Pawel Jakub Dawidek
ceef0c312c Connect ZFS to the build. 2007-04-06 02:13:30 +00:00
Pawel Jakub Dawidek
f13a826083 Add new libraries. We may want to rename libumem to not colide with
ports/devel/umem.
2007-04-06 01:45:23 +00:00
Alexander Kabaev
844b016555 Add entry for bsd.symver.mk.
Pointed out by: ru
2007-04-03 20:15:59 +00:00
Alexander Kabaev
2da4e4706d Break out Version.map generation code from bsd.lib.mk into a
separate bsd.symver.mk file. Include bsd.symver.mk in bsd.lib.mk
to maintain the status quo.
2007-04-03 18:56:05 +00:00
Ruslan Ermilov
5b83a06c72 Stop clobberring the application namespace with local
variables such as "sect", "page", and "target"; use
underscored versions instead.

Discussed with:	kan
MFC after:	3 days
2007-03-12 13:54:52 +00:00
Rong-En Fan
31b4134f7b Enable ncurses wide character support
Approved by:	delphij (mentor)
Tested by:	kris on pointyhat (early version), current@
2007-03-09 12:11:58 +00:00
Rong-En Fan
438e97c073 Remove old libmytinfo link.
Approved by:	delphij (mentor)
Requested by:	ache
2007-02-01 08:45:27 +00:00
Xin LI
9a9ea25f4a Replace the GNU gzip with a slightly modified NetBSD gzip. The
NetBSD version is a feature-to-feature re-implementation of GNU
gzip using the freely-redistributable zlib and this version is
expected to be mostly bug-to-bug compatible with the GNU
implementation.

 - Because this is a piece of mature code and we want to make
   changes so it is added directly rather than importing to
   src/contrib.
 - Connect newly added code to src/usr.bin/ and rescue/rescue
   build.
 - Disconnect the GNU gzip code from build for now, they will
   be eventually removed completely.
 - Provide two new src.conf(5) knobs, WITHOUT_BZIP2_SUPPORT and
   WITHOUT_BZIP2.

Tested by:	kris (full exp-7 pointyhat build)
Approved by:	core (importing a 4-clause BSD licensed file)
Approved by:	re (adding new utility during -HEAD code slush)
2007-01-26 10:19:08 +00:00
Dag-Erling Smørgrav
ba518d666a "If I only had a brain..."
MFC after:	 3 weeks
2007-01-17 14:54:53 +00:00
Dag-Erling Smørgrav
5e0d38b538 Correct errors in previous commit. I didn't realize that ${CPUTYPE} is
passed unmodified to gcc.  Therefore, "prescott" should be used for Prescott,
Nocona, Core and Core 2 CPUs when building 32-bit code, and "nocona" should
be used for Prescott, Nocona and Core 2 CPUs when building 64-bit code.

MFC after:	3 weeks
2007-01-17 14:49:13 +00:00
Dag-Erling Smørgrav
3f15422a91 On i386, make "prescott" an alias for "nocona" (instead of the other way
around), and introduce "core", along with the alias "core2".  All of these
enable SSE3.

On amd64, add "core2" (enables SSE3).

MFC after:	3 weeks
2007-01-17 12:43:06 +00:00
Ruslan Ermilov
8ef03c79e1 Try harder to not leak src/ build stuff into ports/ environment
by not exposing the MK_* variables that were designed for src/.

Requested by:	many
2006-11-19 16:28:52 +00:00
Olivier Houchard
507a594e15 Change one more ARM_BIG_ENDIAN to TARGET_BIG_ENDIAN. 2006-11-05 15:33:26 +00:00
John Birrell
f4c93e2c4a Allow a makefile to set IGNORE_PRAGMA so that OpenSolaris code can
be built with other gcc warnings enabled.

Every Solaris source file has a #pragma ident in it. We can just
ignore those definitions.
2006-11-04 04:39:05 +00:00
John Birrell
87d0f81ce7 Add a build option to support WITH_CDDL and WITHOUT_CDDL, defaulting
to WITH_CDDL.

This option enables building code that is licensed under Sun's CDDL.
The DTrace code is licensed that way, so by default it will get built
unless the WITHOUT_CDDL option is used.

There is another build toggle, NO_CTF, which turns off execution of
ctfconvert and ctfmerge in sys.mk, but this can't be implemented as
WITH_/WITHOUT because bsd.own.mk isn't included in all Makefiles and
sys.mk is included automatically by make.
2006-11-01 09:02:11 +00:00
Ruslan Ermilov
1340597def - Don't pass an empty ``NM='' to lorder(1) when NM is unset.
- Don't redundantly use "env".
- Protect NM value with quotes, just in case.
2006-10-25 09:43:38 +00:00
Olivier Houchard
9a082df5b8 Use TARGET_BIG_ENDIAN instead of ARM_BIG_ENDIAN 2006-10-19 22:51:26 +00:00
Dejan Lesjak
eb91fad699 Remove X11BASE from here so the one from bsd.port.mk has a chance to set
default. Grepping through src shows only gnu/usr.bin/groff which doesn't
use it in src build and OpenSSH for which this was a NOOP.

Discussed with:	des, ru
Approved by:	ru
2006-10-06 23:32:23 +00:00
Ruslan Ermilov
2e97500669 Removed libc_r build support. 2006-09-30 11:32:46 +00:00
Ruslan Ermilov
9af8612e8c Don't run install-info under lockf if not installing in parallel.
Requested by:	rwatson
2006-09-29 15:36:19 +00:00
David E. O'Brien
e2e1ab1c94 When building WITHOUT_ASSERT_DEBUG, we need to disable -Werror as its easy
to see "warning: unused variable `foo'".
2006-09-13 23:27:21 +00:00
Warner Losh
4df1f59e8f Add a knob for compiling the tree -DNDEBUG. This turns off all the
asserts and makes binaries smaller.  The binaries also become
repeatable again.  As it was, without this md5's of binaries built
with different paths differed.

# Where do I document this?
2006-09-11 05:35:57 +00:00
Warner Losh
b608b4520b Pass whatever the value of NM down to lorder. This allows one to
override NM in Makefiles when, for example, cross compiling and have
that value be used by lorder.  NM normally isn't defined, so we pass a
null value to lorder.  lorder says 'NM=${NM-nm}' which causes it to
pickup the default value.
2006-08-25 23:50:05 +00:00
David E. O'Brien
489ffb7126 Don't read in /etc/src.conf when building ports.
Reported by:	obrien
Submitted by:	ru
2006-08-24 18:04:49 +00:00
Ruslan Ermilov
2b46c64c9c Remove alpha left-overs. 2006-08-22 08:03:01 +00:00
Dag-Erling Smørgrav
26e03c2f92 Revert previous commit. Pre-Nehemiah C3 CPUs do have 3DNow!; it doesn't
show up in dmesg because identcpu.c only looks for it on Intel and AMD
processors.
2006-08-13 08:47:41 +00:00
Dag-Erling Smørgrav
75b7c4a871 I don't know where I got the idea that the VIA C3 has 3DNow!; it doesn't.
It does have MMX (though MMX support is reputed to be incomplete in early
generations), and later generations have SSE.

MFC after:	2 weeks
2006-08-12 09:46:43 +00:00
Dag-Erling Smørgrav
513f04ca55 Reintroduce CSTD, which allows a Makefile to specify the precise dialect
of C in which the program or library is written.

Note that this is *not* intended to be used across the whole tree.  It
is intended to be used for individual libraries or programs which use
specific language features which the compiler must know about in order
to produce correct warnings at high WARNS levels.

MFC after:	1 month
2006-08-11 17:28:59 +00:00
Olivier Houchard
838ab6b670 Grr we also need to set -mbig-endian to LDFLAGS. Now I can build a
big-endian arm world.
2006-07-21 14:07:48 +00:00
Warner Losh
35ef2e4849 Remove ALPHA optimization pointer for gcc flags.
Add ARM optimization pointer for gcc flags.
2006-07-20 22:42:48 +00:00
Olivier Houchard
220e6313cb Oops LDFLAGS can be used to invoke gcc, so directly add -EB to {LD}. 2006-07-20 22:13:59 +00:00
Olivier Houchard
b72f5c0f35 Honor ARM_BIG_ENDIAN by adding -mbig-endian to CFLAGS and -EB to LDFLAGS if
it is defined.
2006-07-20 21:28:07 +00:00
Dag-Erling Smørgrav
7fa5ba9e34 Add CPUTYPE support for Via C3 and C3-2 processors.
MFC after:	2 weeks
2006-07-19 11:27:19 +00:00
Yaroslav Tykhiy
a0a148de0f "clean" of <bsd.prog.mk> no longer removes a.out, Errs,
errs, mklog, and ${PROG}.core .

MFC after:	1 week
2006-06-18 11:26:17 +00:00
Poul-Henning Kamp
f6ce2a64f7 Send the pcvt(4) driver off to retirement. 2006-05-17 09:33:15 +00:00
Hajimu UMEMOTO
06a99fe36f - Extend the nsswitch to support Services, Protocols and Rpc
databases.
- Make nsswitch support caching.

Submitted by:	Michael Bushkov <bushman__at__rsu.ru>
Sponsored by:	Google Summer of Code 2005
2006-04-28 12:03:38 +00:00
Poul-Henning Kamp
c82053233c Have WITHOUT_BIND_MTREE imply WITHOUT_BIND_ETC 2006-04-01 18:11:42 +00:00
Ruslan Ermilov
0472dafab4 Revert last delta, it breaks cross-compiles. 2006-03-25 06:37:36 +00:00
Ruslan Ermilov
a6a3b057da Option MK_LIB32 only exists on amd64. 2006-03-24 06:14:31 +00:00
Dag-Erling Smørgrav
add47b9589 Add proper dependencies for the version map, and make sure 'make clean'
removes it if it was generated.

Reviewed by:	ru
2006-03-23 20:37:04 +00:00
Ruslan Ermilov
b81594171c Folded WITH_HESIOD_SUPPORT into WITH_HESIOD. 2006-03-21 09:00:51 +00:00
Ruslan Ermilov
d55557650a Desupport the *_COLLECT2 no-op. 2006-03-21 08:59:36 +00:00
Ruslan Ermilov
cea557add0 Extend coverage of the MK_IPX build option to the following:
- <netipx> headers [1]
- IPX library (libipx)
- IPX support in ifconfig(8)
- IPXrouted(8)
- new MK_NCP option

New MK_NCP build option controls:

- <netncp> and <fs/nwfs> headers
- NCP library (libncp)
- ncplist(1) and ncplogin(1)
- mount_nwfs(8)
- ncp and nwfs kernel modules

User knobs: WITHOUT_IPX, WITHOUT_IPX_SUPPORT, WITHOUT_NCP.

[1] <netsmb/netbios.h> unconditionally uses <netipx> headers
so they are still installed.  This needs to be dealt with.
2006-03-20 14:24:58 +00:00
Ruslan Ermilov
9615580318 Commit a forgotten part of NO_PROFILE/NO_LIB32 conversion. 2006-03-19 06:14:07 +00:00
Poul-Henning Kamp
930081e7d9 Add default for MK_PROFILE 2006-03-19 04:39:42 +00:00
Ruslan Ermilov
5740a2b62d Convert NO_PROFILE and NO_LIB32 to new style. 2006-03-18 21:37:05 +00:00
Ruslan Ermilov
73b06dcb66 Replace .sinclude by .if exists()/.include/.endif so that older make(1)'s can
handle it as well.
2006-03-18 10:54:09 +00:00
Ruslan Ermilov
e1fe3dba5c Reimplementation of world/kernel build options. For details, see:
http://lists.freebsd.org/pipermail/freebsd-current/2006-March/061725.html

The src.conf(5) manpage is to follow in a few days.

Brought to you by:	imp, jhb, kris, phk, ru (all bugs are mine)
2006-03-17 18:54:44 +00:00
Daniel Eischen
235d4a91a8 Add version_gen.awk to the installed files. 2006-03-16 15:20:27 +00:00
Daniel Eischen
ab52e99198 Teach bsd.lib.mk to auto generate a version map file based on
a set of symbol definitions (VERSION_DEF) and symbol mappings
(SYMBOL_MAPS).

Add an awk script to generate the version map.

Suggested by:	ru
Helped by:	ru
Reviewed by:	ru
2006-03-16 15:12:26 +00:00
Ruslan Ermilov
eef6f6efc2 Fix the spelling of MAN to a modern syntax. 2006-03-15 15:49:38 +00:00
Warner Losh
7c25496e63 Revert last change, per ru@'s objection. I misunderstood consensus 2006-03-09 16:24:58 +00:00
Warner Losh
c53e537a13 Now that we now spell NO_MAN=xxx MAN=, update the docs.
Submitted by: John Hein
2006-03-09 01:33:38 +00:00
Ruslan Ermilov
b8435aa88d Handle NO_INCS solely inside bsd.incs.mk. 2006-02-03 16:50:32 +00:00
Robert Watson
18d73856d4 Define $LIBBSM.
Obtained from:	TrustedBSD Project
2006-02-02 10:04:32 +00:00
Ruslan Ermilov
7b2d0a3eee Add a MACHINE_CPU entry for "ev67". 2005-12-06 13:47:23 +00:00
Ruslan Ermilov
be174d0cbd Add the NO_INCS knob to bsd.prog.mk and bsd.lib.mk to not include
bsd.incs.mk, and use it when installing 32-bit compat libraries
on amd64.  This causes it to *not* overwrite native headers with
i386 versions, which was the case with <fenv.h> and <vgl.h>.

PR:		amd64/83806
Prodded by:	bde
MFC after:	1 week
2005-11-19 06:45:44 +00:00
Hartmut Brandt
af1fee9b7c Don't include bsd.init.mk so early - it's just not needed here.
Use . instead of ${.OBJDIR}.
Move DEFSDIR and BMIBSDIR under the resp. .if clauses so that they
get defined only if DEFS and BMIBS are defined.

Submitted by:	ru
2005-11-10 12:07:12 +00:00
Hartmut Brandt
3c2659d809 Add a .mk file for building modules for the SNMP daemon. This may be
use in-tree as well as for 3rd party modules. This file is more or less
what was in usr.sbin/bsnmpd/modules/Makefile.inc with some modifications
and omissions. Usage examples can be found under usr.sbin/bsnmpd/modules/*.

Idea by:	phk
2005-11-10 10:03:22 +00:00
Ruslan Ermilov
6660f1d7c1 Serialize access to the info/dir file; needed for parallel installs.
Reported by:	scottl

I'm not very fond of using the non-standard lockf(1) here, but I
have no better idea at the moment.  NetBSD uses ln(1) to create a
lock file, but this approach can result in a deadlock if make is
interrupted, leaving an orphaned lock file.
2005-11-03 08:56:39 +00:00
Ruslan Ermilov
d9423c1bc1 We bootstrap make(1) if necessary during an upgrade, so checking
if MACHINE_ARCH is defined is no longer needed.
2005-09-28 08:17:30 +00:00
Poul-Henning Kamp
9c662f355f Don't install ${LIB}_pic.a if NO_TOOLCHAIN 2005-08-05 09:55:04 +00:00
Poul-Henning Kamp
f9c16f9cb6 Don't install includes if NO_TOOLCHAIN 2005-08-03 09:26:01 +00:00
Robert Watson
b9d4511f4e Add LIBMEMSTAT tp bsd.libnames.mk.
MFC after:	1 week
2005-07-17 18:38:40 +00:00
Ruslan Ermilov
3d7f65df6e For ${SUBDIR} targets, change the type of dependency operator from `::'
to `:', so that it stays compatible with a stale dependency recorded in
.depend when the type of "foo" changes from file to directory or back.
Compensate for the loss of the "If no sources are specified, the target
is always re-created" feature by marking these targets with the .PHONY
attribute.  While here, fix a bug in the target's script (nobody uses
these targets apparently).
2005-05-31 07:14:51 +00:00
Olivier Houchard
7b2b007e8c Use -march=armv5te for Xscale. 2005-05-24 21:24:40 +00:00
Hartmut Brandt
dea3d8703e Toggle on warnings. This resolves the problem with building old releases
(getting zillions of warnings). Building an old release uses that release's
sys.mk which does not switch on these warnings, so make will be silent.
They can be switch on on the command line with the -x option to make.
This has been tested by building RELENG_5_4 on CURRENT.
2005-04-29 14:44:10 +00:00
Darren Reed
a63b0146dc IPFIlter problems that prevented building should all now be resolved so
remove this temporary measure.
2005-04-28 23:29:00 +00:00