Commit Graph

2209 Commits

Author SHA1 Message Date
Dimitry Andric
26e065d02e Merge ^/head r288035 through r288099. 2015-09-22 09:50:11 +00:00
Bryan Drewery
491b296065 bsd.lib.mk: Simplify CLEANFILES handling.
This limits CLEANFILES removal to just bsd.obj.mk now and removes the need
for NOPATH_FILES.

This reverts r96529 which was done due to the command line being too long
for libc.  Since then all architectures now use 256k for ARG_MAX (r170102).
Regardless of that, the libc CLEANFILES is only 72k now.  Others
may be larger but not likely to hit the limit.  If needed, we can improve
the bsd.obj.mk clean: target to split up the list via bmake features.

This also removes some workarounds that are no longer needed.
- a.out removal
- OBJS.tmp, which has not been needed since r117080.
- *.so, which has not been needed since a .so->.So rename in r42450.

This also fixes STATICOBJS and SHLIB_LINK not being in the .NOPATH list.

Sponsored by:	EMC / Isilon Storage Division
2015-09-22 05:05:53 +00:00
Dimitry Andric
ae2d96ab3a Merge ^/head r287878 through r288034. 2015-09-20 20:34:17 +00:00
Bryan Drewery
740e5b178f Fix LIBRARIES_ONLY
It was erroring: make: don't know how to make _manpages. Stop

Sponsored by:	EMC / Isilon Storage Division
MFC after:	1 week
2015-09-18 23:25:43 +00:00
Bryan Drewery
db31773f3e Garbage collect _SHLIBDIRPREFIX leftovers from r284898.
Sponsored by:	EMC / Isilon Storage Division
2015-09-18 22:28:13 +00:00
Bryan Drewery
621ce7a5a6 Avoid /usr/obj// from r287899 2015-09-18 18:57:09 +00:00
Bryan Drewery
7356a03090 Trim space 2015-09-17 21:51:48 +00:00
Bryan Drewery
cc92227428 Add a check to ensure that the env-only mkopts are not set via src.conf.
Sponsored by:	EMC / Isilon Storage Division
2015-09-17 21:49:29 +00:00
Bryan Drewery
da6e996de3 src.conf.5: Make it self-documenting that the mkopts are environment-only.
Sponsored by:	EMC / Isilon Storage Division
2015-09-17 20:33:52 +00:00
Bryan Drewery
232af7950c Include bsd.mkopt.mk after local.sys.env.mk (which includes /etc/src-env.conf).
This will allow setting WITH_META_MODE in that file rather that requiring
it to be set in the environment.

Sponsored by:	EMC / Isilon Storage Division
2015-09-17 17:35:06 +00:00
Bryan Drewery
66e5857b42 Fix makeman creating obj directories due to turning on WITH_AUTO_OBJ.
r284708 addressed this slightly but seems to have put the make(showconfig)
guard in the wrong place.  Rather than guard setting the default obj directory,
guard inclusion of auto.obj.mk.  This avoids creating SRCTOP/obj and
SRCTOP/release/obj when running makeman.

Sponsored by:	EMC / Isilon Storage Division
2015-09-17 16:38:32 +00:00
Bryan Drewery
7a46bc8129 META_MODE: Default OBJROOT to the traditional /usr/src/SRCTOP/.
This avoids easily colliding multiple src trees with the same objects.  Having
multiple checkouts in dir/ dir2/ dir3/ would all use obj/ without any unique
identifier inside of obj/.  This pattern is more likely to be used due
to the non-META_MODE behavior working with it fine.

In environments where ../obj/ is wanted as the obj directory the value of
OBJROOT can be set to ${SRCTOP:H}/obj/ instead via src-env.conf (set by
SRC_ENV_CONF) or environment.  For environment it must be single quoted or
escaped.  This will be more likely for vendors who are building images or using
NFS for builds.  In those cases MAKEOBJDIRPREFIX may already be utilized and
is supported.

Discussed with:	imp
Sponsored by:	EMC / Isilon Storage Division
2015-09-17 04:22:00 +00:00
Bryan Drewery
3c35812126 META_MODE: Allow MAKEOBJDIRPREFIX to work more closely to its traditional behavior.
The preferred way to modify the object directory root is to use OBJROOT.
However, setting OBJROOT to ${MAKEOBJDIRPREFIX}/${SRCTOP}/ effectively behaves
as expected.

The problem with this before was that setting OBJROOT to contain SRCTOP
resulted in a recursive replacement (/usr/obj/usr/obj/usr/src/). Anchoring to
the start of the path for replacing SRCCTOP in CURDIR resolves this by
avoiding replacing SRCTOP when CURDIR is within the OBJDIR.

Sponsored by:	EMC / Isilon Storage Division
2015-09-17 04:01:05 +00:00
Bryan Drewery
63c304b083 META_MODE: Don't define the default MAKEOBJDIR twice. Just expand the default.
Sponsored by:	EMC / Isilon Storage Division
2015-09-17 00:17:32 +00:00
Bryan Drewery
5ac0efdba9 Update META_MODE architectures for universe 2015-09-16 23:59:53 +00:00
Bryan Drewery
8d4b8102d5 META_MODE: Don't create obj directories automatically when running make -V.
Sponsored by:	EMC / Isilon Storage Division
2015-09-16 23:01:16 +00:00
Dimitry Andric
a1cb6af119 Merge ^/head r287680 through r287877. 2015-09-16 22:35:59 +00:00
Bryan Drewery
cf25886e34 META_MODE: Fix OBJROOT ending in two // when it does not yet exist.
This would lead to the 2nd build (after the first with a missing OBJROOT) to
always rebuild everything as the 'command' would have changed due to the path
changing from having // to only /.

Sponsored by:	EMC / Isilon Storage Division
2015-09-16 20:58:43 +00:00
Bryan Drewery
bf7ff1d2bf Fix check from r287867 for valid MAKEOBJDIR from top-level builds.
MAKEOBJDIR is based on OBJTOP so cannot be expanded until OBJTOP is set.

Reported by:	Nikolai Lifanov <lifanov@mail.lifanov.com>
Sponsored by:	EMC / Isilon Storage Division
2015-09-16 19:58:04 +00:00
Bryan Drewery
7aeb371515 Error and give better feedback for invalid MAKEOBJDIR settings.
Submitted by:	sjg
2015-09-16 18:02:04 +00:00
Bryan Drewery
0b5150a36e Ignore CCACHE_DIR for meta mode decisions.
Sponsored by:	EMC / Isilon Storage Division
2015-09-16 17:44:45 +00:00
Dimitry Andric
0e1e5c22c2 Merge ^/head r287527 through r287679. 2015-09-11 17:20:03 +00:00
Simon J. Gerraty
5ab53989f4 Handle default MAKEOBJDIR for META_MODE.
If MAKEOBJDIRPREFIX is set, use it for default OBJROOT.
If MAKEOBJDIR is empty or not a suitable value (no '/')
set a default that works.

Reviewed by: bdrewery
2015-09-11 00:19:49 +00:00
Dimitry Andric
cfab224f31 Merge ^/head r287502 through r287526. 2015-09-06 22:05:55 +00:00
Baptiste Daroussin
6bfeda9890 Remove last traces of USEPRIVATELIB 2015-09-06 20:17:14 +00:00
Dimitry Andric
d9442b10a2 Merge ^/head r286858 through r287489. 2015-09-05 18:36:23 +00:00
Bryan Drewery
880c41ba36 Avoid sub-shell for realpath(1) for bmake by using its built-in :tA.
MFC after:	2 weeks
Approved by:	portmgr (implicit)
2015-09-03 17:01:58 +00:00
Warner Losh
9d2edd63d4 Use CFLAGS_NO_SIMD in preference to varying lists of -mno-xxxx flags.
Go ahead and defined -D_STANDALONE for all targets (only strictly
needed for some architecture, but harmless on those it isn't required
for). Also add -msoft-float to all architectures uniformly rather
that higgley piggley like it is today.

Differential Revision: https://reviews.freebsd.org/D3496
2015-08-27 23:46:42 +00:00
Warner Losh
01da73abdc Document bsd.endian.mk. 2015-08-27 22:42:02 +00:00
Warner Losh
b9d0791f06 Make sys.mk more compatible with fmake by refraining from using :U
modifiers.

Differential Revision: https://reviews.freebsd.org/D3228
2015-08-27 02:59:48 +00:00
Warner Losh
e0be2e9bc8 Automatically append SUBDIR.yes to the SUBDIR variable, and
remove duplicates. We cannot sort SUBDIR because many Makefiles
have .WAIT in the list which is strongly ordering. Rather than
try to second guess when to sort and when to not sort depending
on .WAIT being in the list, just remove duplicates.
2015-08-27 01:55:00 +00:00
Warner Losh
66d0a2d500 For each FOO in FILESLISTS, append the value of FOO.yes, sort, and
remove duplicates.
2015-08-27 01:52:45 +00:00
Warner Losh
e0874a7ea6 After consultations with the arm community, don't define softfp for
armv6. It's too ambiguous. We do use the softfp ABI for the moment on
armv6, but we allow floating point register use (and the compilers
will generate it). This is too ambiguous to use it as a decider for
which algorithms to use on the platform. Err on the side of caution
and not define it.

Submitted by: ian@
Reviewed by: andrew@
2015-08-26 17:10:43 +00:00
Warner Losh
1cdb618269 Add softfp to MACHINE_CPU more often when we're compiling for soft
float targets. It is added for booke on powerpc and all arm with hf in
the string. Also add arm to all arm builds and armv6 to armv6 and
newer builds.

PR: 202641
2015-08-25 17:11:49 +00:00
Baptiste Daroussin
0f3c3059be Remove now unused LIBPRIVATEDIR
Sponsored by:	Gandi.net
2015-08-24 13:46:12 +00:00
Warner Losh
d1f6fa8f71 We need to add the soft float to the CFLAGS always, not just when
NO_CPUCFLAGS is not defined since it is part of the ABI as we've
defined it, not just a nice optimization.
2015-08-24 00:03:51 +00:00
Warner Losh
10df57f9cf Document bsd.compiler.mk and the variables it defines. 2015-08-21 19:51:27 +00:00
Warner Losh
67ad267bf2 Document CFLAGS_NO_SIMD. 2015-08-21 19:51:19 +00:00
Enji Cooper
40fd4efd1a Fix typos (depreciated -> deprecated) 2015-08-21 17:45:18 +00:00
Warner Losh
8243a00c04 Document bsd.arch.inc.mk. 2015-08-21 16:05:56 +00:00
Baptiste Daroussin
b005264e84 Mark bsd.info.mk as depreciated 2015-08-21 15:30:50 +00:00
Warner Losh
009572a6f9 Document bsd.progs.mk, including its status as being strongly
discouraged and that it will be going away as soon as is practicable.
2015-08-21 15:15:22 +00:00
Dimitry Andric
6fdf637e23 Merge ^/head r286697 through r286857. 2015-08-17 19:02:23 +00:00
Ed Maste
084748985d Separate ELFTOOLCHAIN_BOOTSTRAP from BINUTILS_BOOTSTRAP
For most cases they are equivalent, but BINUTILS_BOOTSTRAP is a
BROKEN_OPTION on arm64 as the in-tree GNU binutils do not support it,
so we need a separate internal flag for ELF Tool Chain.

Reviewed by:	andrew, brooks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D3381
2015-08-17 10:48:55 +00:00
Enji Cooper
edefff7ed6 Reap MK_SYSINSTALL
It's no longer in use in the tree (most likely missed when sade/sysinstall
were removed)

MFC after: 1 week
2015-08-16 09:51:24 +00:00
Rui Paulo
60c07d1ce3 bsd.lib.mk: pass NMFLAGS to the lorder script. 2015-08-14 22:55:23 +00:00
Rui Paulo
25ec8c921c Introduce a new make variable: NMFLAGS.
As the name indicates, these are flags to pass to nm(1).  The newer
binutils have a plugin mechanism so, to build something with LLVM's
LTO, we need to pass flags to nm(1).  This commit also extends
lorder(1) to pass NMFLAGS to nm(1).
2015-08-14 22:54:52 +00:00
Ed Maste
9ff63d2432 Remove remnant of WITHOUT_ELFTOOLCHAIN_TOOLS missed in r286730 2015-08-13 18:01:50 +00:00
Dimitry Andric
1347814ced Merge ^/head r285924 through r286421. 2015-08-07 20:18:55 +00:00
Eric van Gyzen
ddab052725 Disable SSE in libthr
Clang emits SSE instructions on amd64 in the common path of
pthread_mutex_unlock.  If the thread does not otherwise use SSE,
this usage incurs a context-switch of the FPU/SSE state, which
reduces the performance of multiple real-world applications by a
non-trivial amount (3-5% in one application).

Instead of this change, I experimented with eagerly switching the
FPU state at context-switch time.  This did not help.  Most of the
cost seems to be in the read/write of memory--as kib@ stated--and
not in the #NM handling.  I tested on machines with and without
XSAVEOPT.

One counter-argument to this change is that most applications already
use SIMD, and the number of applications and amount of SIMD usage
are only increasing.  This is absolutely true.  I agree that--in
general and in principle--this change is in the wrong direction.
However, there are applications that do not use enough SSE to offset
the extra context-switch cost.  SSE does not provide a clear benefit
in the current libthr code with the current compiler, but it does
provide a clear loss in some cases.  Therefore, disabling SSE in
libthr is a non-loss for most, and a gain for some.

I refrained from disabling SSE in libc--as was suggested--because
I can't make the above argument for libc.  It provides a wide variety
of code; each case should be analyzed separately.

https://lists.freebsd.org/pipermail/freebsd-current/2015-March/055193.html

Suggestions from:	dim, jmg, rpaulo
Approved by:	kib (mentor)
MFC after:	2 weeks
Sponsored by:	Dell Inc.
2015-08-05 12:53:55 +00:00