LLVM_TARGET_* will auto be set based on LLVM_TARGET_ALL and MK_CLANG.
If LLVM_TARGET_ALL is disabled, during a cross-build, then SYSTEM_COMPILER
and SYSTEM_LINKER are auto disabled.
This option should be used by users rather than the per-arch LLVM_TARGET
options as it is simpler to maintain for them should the supported
target list change.
MFC after: 2 weeks
Reviewed by: sbruno, dim
Sponsored by: Dell EMC
Differential Revision: https://reviews.freebsd.org/D16020
This makes it possible, through src.conf(5) settings, to select which
LLVM targets you want to build during buildworld. The current list is:
* (WITH|WITHOUT)_LLVM_TARGET_AARCH64
* (WITH|WITHOUT)_LLVM_TARGET_ARM
* (WITH|WITHOUT)_LLVM_TARGET_MIPS
* (WITH|WITHOUT)_LLVM_TARGET_POWERPC
* (WITH|WITHOUT)_LLVM_TARGET_SPARC
* (WITH|WITHOUT)_LLVM_TARGET_X86
To not influence anything right now, all of these are on by default, in
situations where clang is enabled.
Selectively turning a few targets off manually should work. Turning on
only one target should work too, even if that target does not correspond
to the build architecture. (In that case, LLVM_NATIVE_ARCH will not be
defined, and you can only use the resulting clang executable for
cross-compiling.)
I performed a few measurements on one of the FreeBSD.org reference
machines, building clang from scratch, with all targets enabled, and
with only the x86 target enabled. The latter was ~12% faster in real
time (on a 32-core box), and ~14% faster in user time. For a full
buildworld the difference will probably be less pronounced, though.
Reviewed by: bdrewery
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D11077
The new stand/ structure installs loader.conf(5) and defaults/loader.conf
regardless of interpreter. The only thing gating installation now is
MK_BOOT.
Reported by: eadler
This works similar to WITH_SYSTEM_COMPILER added in r300354. It only
supports lld via WITH_LLD_BOOTSTRAP.
When both SYSTEM_COMPILER and SYSTEM_LINKER logic passes then libclang
will not build in cross-tools. If either check fails though then
libclang is built.
The .info is reworked to notify when libclang will be built since if
either clang or lld needs to be rebuilt, but not the other, the
notification can lead to confusion on why "clang is building".
-fuse-ld= is not used with this method so some combinations of compiler
and linker are expected to fail.
A new 'make test-system-linker' target is added to see the logic results.
Makefile.inc1:
CROSS_BINUTILS_PREFIX support had to be moved higher up so that XLD
could be set and MK_LLD_BOOTSTRAP disabled before checking SYSTEM_LINKER
logic as done with SYSTEM_COMPILER. This also required moving where
bsd.linker.mk was read since XLD needs to be set before parsing it. This
creates a situation where src.opts.mk can not test LINKER_FEATURES or
add LLD_BOOTSTAP to BROKEN_OPTIONS.
Reviewed by: emaste (earlier version)
Sponsored by: Dell EMC
Differential Revision: https://reviews.freebsd.org/D15894
try to build them if MK_OPENSSL is unset.
Reviewed by: emaste imp kevans
Sponsored by: Limelight Networks
Differential Revision: https://reviews.freebsd.org/D15211
changes for different branches. It's a bit rough right now,
but should be good enough for most people to try to use. It's
definitely 'tools' tree quality.
Cope for the fact that laoder.efi, not being boot1, doesn't read
/boot.config by setting boot_serial and force the serial console.
Also add sysctl so we can display the boot method.
Provide a variable, do_boot1_efi, if you want to use boot1 for
testing. But since it's transient, it's just a variable and not
available on the command line.
This extends the test suite to generate images for every combination of:
amd64: mbr/gpt geli/nogeli ufs/zfs legacy/uefi/both
Except for mbr+geli, which is not currently possible.
Reviewed by: imp (previous version)
Sponsored by: Klara Systems
Differential Revision: https://reviews.freebsd.org/D15846
128MiB still works for Legacy booting, however. Go ahead and do 256MiB
for all amd64 boxes, since the number of such boxes < 256MiB is
vanishingly small.
We want to use the versions of the bootcode we just built, rather than
ones from whatever happens to be in /boot on the test machine
These were incorrectly added by me in r334888
As of r306649 objcopy is always ELF Tool Chain's elfcopy; binutils
objcopy is never used.
PR: 229046
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
GNU grep as in actually in base does not have any translations support
compiled in, so no functionnality loss.
We do support 193 locales in base, we will never catch up on that number of
translation with bsd grep.
Removing NLS support make bsd grep consistent with the other binaries in base
which are not translated, and also reduce a little bit the code.
Reviewed by: kevans
Approved by: kevans
Discussed with: kevans @BSDCan
Differential Revision: https://reviews.freebsd.org/D15682
makefs disallows duplicate entries unless the -D option is specified.
Previously makeroot.sh enabled -D unless a filelist was provided via
the -f options. The filelist logic creates an mtree manifest from the
METALOG and the provided filelist by passing them through `sort -u`,
so duplicates were not expected. However, duplicates can still occur
when a directory appears in multiple packages -- for example,
./etc/pam.d type=dir uname=root gname=wheel mode=0755
./etc/pam.d type=dir mode=0755 tags=package=runtime
./etc/pam.d type=dir mode=0755 tags=package=at
./etc/pam.d type=dir mode=0755 tags=package=ftp
./etc/pam.d type=dir mode=0755 tags=package=telnet
For the purposes of makefs these directory entries are identical, but
are of course not identical for sort -u.
For now just leave the allow duplicates -D flag enabled.
PR: 228606
Sponsored by: The FreeBSD Foundation
When large SPDs are used, we face two problems:
- too many CPU cycles are spent during the linear searches in the SPD
for each packet
- too much contention on multi socket systems, since we use a single
shared lock.
Main changes:
- added the sysctl tree 'net.key.spdcache' to control the SPD cache
(disabled by default).
- cache the sp indexes that are used to perform SP lookups.
- use a range of dedicated mutexes to protect the cache lines.
Submitted by: Emeric Poupon <emeric.poupon@stormshield.eu>
Reviewed by: ae
Sponsored by: Stormshield
Differential Revision: https://reviews.freebsd.org/D15050
This driver was merged to HEAD one week prior to Exar publicly announcing they
had left the Ethernet market. It is not known to be used and has various code
quality issues spotted by Brooks and Hiren. Retire it in preparation for
FreeBSD 12.0.
Submitted by: kbowling
Reviewed by: brooks imp
Relnotes: yes
Sponsored by: Limelight Networks
Differential Revision: https://reviews.freebsd.org/D15442
The Intel CPU "Platform Id" is a 3-bit integer reported by a given MSR.
Intel microcode updates have an 8-bit field to indicate Platform Id
compatibility - one bit in the mask for each of the possible Platform Id
values. To simplify interpretation, report the Platform Id mask also as
a list.
Intel now releases microcode updates in files named after
<family>-<model>-<stepping>. In some cases a single file may include
microcode for multiple Platform Ids for the same family, model, and
stepping. Our current microcode update tooling (/usr/sbin/cpucontrol)
only processes the first microcode update in the file.
This tool splits combined files into individual files with one microcode
update each, named as
<family>-<model>-<stepping>.<platform_id_mask>.
Adding this to tools/ for experimentation and testing. In the future
we'll want to have cpucontrol or other tooling work directly with the
Intel-provided microcode files.
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D15433
It was an old TRE that had plenty of bugs and no performance gain over
regex(3). I disabled it by default in r323615, and there was some confusion
about what the knob does- likely due to poor naming on my part- to the tune
of "well, it sounds like it should speed things up" (mentioned by multiple
people).
To compound this, I have no intention of maintaining a second regex
implementation. If someone would like to step up and volunteer to maintain a
lean-and-mean implementation for grep, this is OK, but we have very few
volunteers to maintain even our primary regex implementation.
This driver was for an early and uncommon legacy PCI 10GbE for a single
ASIC, Intel 82597EX. Intel quickly shifted to the long lived ixgbe family.
Submitted by: kbowling
Reviewed by: brooks imp jeffrey.e.pieper@intel.com
Relnotes: yes
Sponsored by: Limelight Networks
Differential Revision: https://reviews.freebsd.org/D15234
This driver supports legacy, 32-bit PCI devices, and had an ambiguous
license. Supported devices were already reported to be rare in 2003
(when an earlier version of the driver was removed in r123201).
Reviewed by: rgrimes
Relnotes: Yes
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D15245
Import the wrapper script from zstdgrep (written by wiz@netbsd.org)
Modify it to support more than just zstd (adding support for gzip,
lzma, xz and bzip2)
Write a simple manpage dedicated for it.
Only use that new wrapper both for gnu grep and bsd grep
Next step will be removing code related to compression format from bsdgrep
Reviewed by: kevans
Approved by: kevans
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D15193
block followed by a discontiguous fragment.
Add checks for unallocated inodes and inodes with unknown mode
types.
Cleanup variable declarations by changing from type `int' to types
like ufs_lbn_t, ufs2_daddr_t, etc.
Reported by: bde
This is a set of benchmarks of qsort, mergesort, heapsort, and
optionally wikisort and a script to run them.
Submitted by: Miles Fertel <milesfertel@college.harvard.edu>
Sponsored by: Google Summer of Code 2017
Differential Revision: https://reviews.freebsd.org/D12677
prtblknos filesystem_device inode ...
add an additional argument format:
prtblknos file
which is more convenient than figuring out the filesystem
and inode number for "file".
When given a list of multiple inodes, rather than exiting
the program on an error with one of them, skip over it and
continue with the next one.
Submitted by: bde
regular files, directories, and symbolic links that require
external storage.
Correct the handling of files with holes and files that have
one or more large blocks and end with a fragment.
Reported by: bde
main.c - opens disk and processes the argument list
of inodes to be printed
prtblknos.c - prints out the list of blocks used by an inode
This change allows the fsdb program to import prtblknos() to use when
printing out the set of blocks used by an inode.
This program was switched to using the libufs library to ease its
integration with fsdb and any other filesystem utility that might
want to use it in the future.
It can be used to validate basic algorithm correctness on a variety of inputs,
by comarison to openssl.
While here, add some sanity to the crypto/Makefile.
The tool may not be perfect, but getting it in tree where collaboration can
happen is a nice first step. The pace of development outside of svn seems
to have slowed down mid-2017.
Obtained from: github bsdjhb/freebsd:cryptocheck
Sponsored by: Dell EMC Isilon
ConnectX-4/5 devices in mlx5core.
The dump is obtained by reading a predefined register map from the
non-destructive crspace, accessible by the vendor-specific PCIe
capability (VSC). The dump is stored in preallocated kernel memory and
managed by the mlx5tool(8), which communicates with the driver using a
character device node.
The utility allows to store the dump in format
<address> <value>
into a file, to reset the dump content, and to manually initiate the
dump.
A call to mlx5_fwdump() should be added at the places where a dump
must be fetched automatically. The most likely place is right before a
firmware reset request.
Submitted by: kib@
MFC after: 1 week
Sponsored by: Mellanox Technologies
Retpoline is a compiler-based mitigation for CVE-2017-5715, also known
as Spectre V2, that protects against speculative execution branch target
injection attacks.
In this commit it is disabled by default, but will be changed in a
followup commit.
Reviewed by: bdrewery (previous version)
MFC after: 3 days
Security: CVE-2017-5715
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D14242
We require some --globals due to custom loader extensions in our
environment. Add everything required for this to tools/boot so that other
interested parties can get up and go with linting our scripts and not get a
bunch of false-positives.
liblua glues the lua run time into the boot loader. It implements all
the runtime routines that lua expects. In addition, it has a few
standard 'C' headers that nueter various aspects of the LUA build that
are too specific to lua to be in libsa. Many refinements from the
original code to improve implementation and the number of included lua
libraries. Use int64_t for lua_Number. Have "/boot/lua" be the default
module path. Numerous cleanups from the original GSoC project,
including hacking libsa to allow lua to be built with only one change
outside luaconf.h.
Add the final bit of lua glue to bring in liblua and plug into the
multiple interpreter framework, previously committed.
Add LOADER_LUA option, currently off by default.
Presently, this is an experimental option. One must opt-in to using
this by defining WITH_LOADER_LUA and WITHOUT_FORTH. It's been
lightly tested, so keep a backup copy of your old loader handy.
The menu code, coming in the next commit, hasn't been exhaustively
tested. A LUA boot loader is 60k larger than a FORTH one, which is
80k larger than a no-interpreter one. Subtle changes in size
may tip things past some subtle limit (the binary is ~430k now
when built with LUA). A future version may offer coexistance.
Bump FreeBSD version to 1200058 to mark the milestone.
Pedro Souza's 2014 Summer of Code project. Rui Paulo, Pedro Arthur,
Zakary Nafziger and Wojciech A. Koszek also contributed. Warner Losh
reworked it extensively into its current form.
Obtained from: https://wiki.freebsd.org/SummerOfCode2014/LuaLoader
Sponsored by: Google Summer of Code
Relnotes: Yes
MFC After: 1 month
Differential Review: https://reviews.freebsd.org/D14295
Introduce WITH_/WITHOUT_LLVM_COV to match GCC's WITH_/WITHOUT_GCOV.
It is intended to provide a superset of the interface and functionality
of gcov.
It is enabled by default when building Clang, similarly to gcov and GCC.
This change moves one file in libllvm to be compiled unconditionally.
Previously it was included only when WITH_CLANG_EXTRAS was set, but the
complexity of a new special case for (CLANG_EXTRAS | LLVM_COV) is not
worth avoiding a tiny increase in build time.
Reviewed by: dim, imp
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D142645
of blocks used by a requested list of inodes.
For example, to list the blocks referenced by your kernel:
guest_12 % df /
Filesystem 1K-blocks Used Avail Capacity Mounted on
/dev/gpt/rootfs 20307196 10707336 7975288 57% /
guest_12 % ls -i /boot/kernel/kernel
160603 /boot/kernel/kernel
guest_12 % ./prtblknos /dev/gpt/rootfs 160603
160603: lbn 0-7 blkno 3217584-3217647
lbn 8-11 blkno 3217864-3217895 distance 216
First-level indirect, blkno 3217896-3217903 distance 0
lbn 12-19 blkno 3217904-3217967 distance 8
lbn 20-75 blkno 3251816-3252263 distance 33848
lbn 76-83 blkno 3252368-3252431 distance 104
lbn 84-91 blkno 3252464-3252527 distance 32
lbn 92-852 blkno 3252896-3258983 distance 368
Each contiguous range of blocks is printed on a line.
The distance metric is the size of the gap from the end of the
previous set of blocks to the beginning of the next set of blocks.
Short distances are desirable.
qemu defaults to 128 MiB of RAM, which has been found to not necessarily be
enough for booting the system, at least on amd64 and armv7
Add a sensible -m 512 to the examples so that they'll work out of the box
in the general case.
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D14234
only installed on arm and sparc64.
It is the only bits that keeps us having libreadline in base
The rest of gdb can be switched to libedit and will be in another
commit