"Explicitly clear 1000baseT control register for F1 PHY used in
AR8132 FastEthernet controller. The PHY has no ability to
establish a gigabit link. Previously only link parters which
support down-shifting was able to establish link.
This change should fix a long standing link establishment issue
of AR8132."

The r_debug_state function is a hook required for gdb. Clang will inline
the function, but because it is empty, it won't generate any calls to it.
This results in gdb backtraces being corrupted. Fixed with the following
hack obtained from FreeBSD SVN 225366.

Fix it by marking the function __noinline, and inserting an empty asm
statement that pretends to clobber memory. This forces the compiler to
emit calls to the r_debug_state() function throughout rtld.c

If anyone had tried to build an executable version of the dynamic linker
using the source makefiles, it would have failed. The i386 version had
bad CFLAGS and the x86_64 was missing the ldscript. Moreever, as the
gold linker doesn't use ldscripts, it was GNU linker (ld.bfd) specific.

If somebody decides this functionality is still desired, the ldscript
files from FreeBSD (elf_rtld.x) can be imported from FreeBSD likely
without modification. The now-dummy makefiles were alterated with
similar comments.

Using only mprotect over .bss prevented it from writing .bss to the core
files as the whole region for the dso is mmapped with MAP_NOCORE flag.
Revert to previous mmap implementation.
Comes from FreeBSD SVN 225699

* When the WANT_NETGRAPH7 make variable is set, libnetgraph7 and the
netgraph7 kernel parts instead of their legacy couterparts.
Previously, only the libnetgraph7 build was controled by this variable.
This commit puts the kernel build part under the same variable as well
so that the legacy kernel modules are not overwriten by the new ones.

* xz --force now (de)compresses files that have setuid, setgid,
or sticky bit set and files that have multiple hard links.
The man page had it documented this way already, but the code
had a bug.

* LZMA2 decompressor now correctly accepts LZMA2 streams with no
uncompressed data. Previously it considered them corrupt. The
bug can affect applications that use raw LZMA2 streams. It is
very unlikely to affect .xz files because no compressor creates
.xz files with empty LZMA2 streams. (Empty .xz files are a
different thing than empty LZMA2 streams.)

* "xz --suffix=.foo filename.foo" now refuses to compress the
file due to it already having the suffix .foo. It was already
documented on the man page, but the code lacked the test.

* liblzma fixes:

- A memory leak was fixed.

- lzma_stream_buffer_encode() no longer creates an empty .xz
Block if encoding an empty buffer. Such an empty Block with
LZMA2 data would trigger a bug.

- Validate function arguments better in a few functions. Most
importantly, specifying an unsupported integrity check to
lzma_stream_buffer_encode() no longer creates a corrupt .xz
file. Probably no application tries to do that, so this
shouldn't be a big problem in practice.

This change (taken from LSI in 175660922b2422bdda81a5967c5dadd176fe1c3c)
caused the mfi_config_data structure to change size which ultimately
ended up in the MFI_DCMD_CFG_ADD command failing. Stuff seems to work fine
without it.