When using an external gcc 4.8+ and not building libstdc++ then create in the objectdir a
fake libstdc++.so and libstdc++.a which is a symlink on libc++ that allow g++ to satisfy
its links dependencies in the least hackish way.
Please note that this hacky libstds++ never get installed on the final system

Reviewed by:	imp
Make the external toolchain support grows to the knowleged of XXFLAGS for C++ dedicated flags
and DEPFLAGS for mkdep flags
Pass the path to the libc++ headers in both, enforce the gnu++11 standard in the XXFLAGS
to satisfy libc++ requirements pass the libc++ objectdir as a location where to find
libraries so it can find libstdc++.so and libstdc++.A

Reviewed by:	imp
Do not make ld(1) warnings fatal anymore, binutils behaviour has changed over the
time and gnu.warnings.symbol are now being fatal preventing building world.

in the futur we want to investigate only making the gnu.warning.symbol non fatal

Reviewed by:	imp
Add sys/socket.h #include for bind(2), et al

Sponsored by: EMC / Isilon Storage Division
You aren't allowed to test WITH_xxx or WITHOUT_xxx here, so remove it.
Even if you were allowed to test for it, the test makes no sense as it
always results in adding -DWITH_ATF unless WITH_ATF was already
defined. But if MK_ATF != no, then we know it was defined. This, in
turn, caused tools/build/options/makemake always think WITH_ATF is the
default, which removed control of that from sys.conf.mk.

To get the intent of the deleted comment, another mechanism is
required, assuming that the intent of that comment is desirable.
Generate both userland and kernel option settings for showconfig.

PR: 191920
For the kernel, we have USB_GADGET_EXAMPLES as defaults to yes. For
userland defaults to no. This caused issues for the automated option
documenation script. Turns out, this isn't used in userland at all, so
just remove it from here.
Regenerate after r273418
Fix typo in src option description
Use the UAUTO SYSCTL type for exporting the bounce zone alignment,
because the variable size depends on the build type.

Reported by:	kib @
MFC after:	3 days
Mark some more sysctl stuff shared-locked and MPSAFE.
older binutils does not know about --no-fatal-warnings
Revert r273426 r273409

A solution that work with both new and old binutils should be investigated
tmpfs: allow shared file lookups

Tested by: pho
Take the lock shared in linker_search_symbol_name.

This helps sysctl kern.proc.stack.
Bump __FreeBSD_version to track SA-14:20, SA-14:21, SA-14:22,
SA-14:23

Approved by:	re (implicit)
Sponsored by:	The FreeBSD Foundation
Do not define bad_array_new_length::bad_array_new_length in libc++ anymore
when used in combinaison with libcxxrt since it is now defined there already.
This fixes building world
Eliminate unnecessary memory allocation in sys_getgroups and its ibcs2 counterpart.
filedesc: cleanup setugidsafety a little

Rename it to fdsetugidsafety for consistency with other functions.

There is no need to take filedesc lock if not closing any files.

The loop has to verify each file and we are guaranteed fdtable has space
for at least 20 fds. As such there is no need to check fd_lastfile.

While here tidy up is_unsafe.
GCC for PowerPC does not align  .note sections to 4 bytes.  When
running ctfmerge on its objects, libelf asserts as it expects
.note sections to be 4-byte aligned.  Change that expectation.

Approved by:	jkoshy@
Obtained from:	Juniper Networks, Inc.