Commit Graph

226906 Commits

Author SHA1 Message Date
Enji Cooper
19aa52065a Diff reduce with ^/head
This doesn't seem to be necessary after the changes to only apply --coverage
to shared objects.

We'll see if it works with make tinderbox.
2017-10-23 04:42:57 +00:00
Enji Cooper
206d51ae71 Get rid of now unnecessary intermediate variable, _coverage_libs
Use _prereq_libs instead.
2017-10-23 04:23:25 +00:00
Enji Cooper
c547fc0ffc Support compiling lib/libclang_rt/profile with gcc
Several of the flags were being treated as CFLAGS, when they were actually
technically CXXFLAGS. Move them there.

Also, only apply -fno-sanitize=safe-stack with clang.

This is a draft diff.

PR:		223179
2017-10-23 04:22:17 +00:00
Enji Cooper
88d87eb638 Handle host builds
If TARGET_ARCH isn't defined, fallback to MACHINE_ARCH.

This is a followup to r324873.

PR:		222925
2017-10-23 04:20:11 +00:00
Enji Cooper
6b097b81c6 Delete MK_COVERAGE=no with gcc. Let's see if this fixes cross-compilation :/ 2017-10-23 03:41:07 +00:00
Enji Cooper
9f820b1218 Always compile libgcov and libprofile_rt
I'm not fully grasping the intertwined complexity of how our bootstrap compiler
is working, so just cut-to-the-chase and build/install both with `_prereq_libs`.
2017-10-23 01:42:48 +00:00
Enji Cooper
b28b665cbe Need to make all of the variables immediate, or the last value for _gcno_dir wins
This is particularly fun when relative paths are embedded in SRCS, like
lib/libclang_rt does (which I argue is ripe for corruption via parallel
builds).
2017-10-23 00:56:59 +00:00
Enji Cooper
6a66aab022 Try unbreaking MK_COVERAGE != no with make tinderbox
Compile libgcov/libprofile_rt when bootstrapping/compiling gcc/clang.

Hopefully this fixes platforms still on host gcc (mips, powerpc, etc). We'll
see after the next tinderbox cycle on universe12a.freebsd.org *eyeroll*.
2017-10-23 00:44:18 +00:00
Enji Cooper
96f71b5ef7 Diff reduce with ^/head 2017-10-23 00:12:20 +00:00
Enji Cooper
52e08d77d8 Remove MK_COVERAGE=no sprinkled around sys/boot
imp's recent refactoring on ^/head has made this unnecessary, as it seems
everything is pulling MK_COVERAGE=no from sys/boot/Makefile.inc .
2017-10-23 00:10:01 +00:00
Enji Cooper
dd467c8ac1 MFhead@r324884 2017-10-22 23:40:49 +00:00
Enji Cooper
2d457ca3c7 Restore gcc 4.8 version check
I accidentally broke it when making changes
2017-10-22 23:36:43 +00:00
Warner Losh
6c458a6a56 Use preferred defined paths, rather than relative paths in fdt.
Sponsored by: Netflix
2017-10-22 22:52:27 +00:00
Warner Losh
c02a64d8be Create a shell script to build sys/boot on all the architectures.
One could run this from any directory, but it's designed to do
regression testing on sys/boot (it only tests on a subset of
architectures since all of them would take a lot longer and not help).
This will also ensure that future commits to sys/boot compile
everywhere.

Sponsored by: Netflix
2017-10-22 22:52:23 +00:00
Warner Losh
404a0a2f40 Use SYSDIR instead of ${.CURDIR}/../..<etc>/sys.
Sponsored by: Netflix
2017-10-22 22:50:28 +00:00
Warner Losh
b022947e0e Use BOOTSRC here.
sponsored by: Netflix
2017-10-22 22:50:23 +00:00
Warner Losh
45e0c11351 Prefer SRCTOP paths for bits we're grabbing from libc.
Sponsored by: Netflix
2017-10-22 22:50:19 +00:00
Warner Losh
254ba2c985 Make at91 boot loader compile again.
No clue if it actually still works, but it might.
2017-10-22 22:50:15 +00:00
Warner Losh
cb3ee5c694 End source directories with SRC rather than a hodgepodge of names
BOOTDIR->BOOTSRC
FICLDIR->FICLSRC
LDR_MI->LDRSRC

This matches the patterns used in the rest of the system a bit vetter.

Suggested by: rgrimes@
Sponsored by: Netflix
2017-10-22 22:50:08 +00:00
Warner Losh
392c874409 Move fdt and uboot defines into common uboot.mk.
Sponsored by: Netflix
2017-10-22 22:49:51 +00:00
Enji Cooper
6406a0d3c1 Disable MK_COVERAGE in Makefile.inc1 when working with broken gcc packages
It makes more sense to do this in the top-level Makefile, instead of down in
src.opts.mk .

PR:	223174
2017-10-22 22:05:37 +00:00
Enji Cooper
875ad66bca Remove BROKEN_OPTIONS/MK_COVERAGE=no for gcc cross-toolchain reliant archs
The cross-toolchain gcc toolchains aren't installing libgcov.a, but the host
toolchain variants are. Don't hack around broken packages in the base system.

PR:		223174
2017-10-22 21:39:58 +00:00
Enji Cooper
69735ece08 Define TARGET_CPUARCH and use in libclang_rt as the basis for CRTARCH
When cross-compiling, the wrong architecture was being embedded in the
libclang_rt binary filenames. It should be based on TARGET_ARCH (target), not
MACHINE_ARCH (host).

This is a draft commit against my project branch. Will fix on ^/head soon.

PR:	222925
2017-10-22 21:34:37 +00:00
Enji Cooper
48c54cbc90 Create GCNOS directories at install time if needed
Add GCNOS{GRP,MODE,OWN} for parity with FILES{GRP,MODE,OWN}. The defaults are
based on BIN{GRP,MODE,OWN}.

GCNOSDIRMODE is added, strictly for configurability, if need be.
2017-10-22 21:00:59 +00:00
Mateusz Guzik
9e68989764 Make the sleepq chain hash size configurable per-arch and bump on amd64.
While here cache-align chains.

This shortens longest found chain during poudriere -j 80 from 32 to 16.

Pushing this higher up will probably require allocation on boot.
2017-10-22 20:43:50 +00:00
Mateusz Guzik
5a17c5524f sdt: make all sdt probe sites test one variable
This saves on cache misses at the expense of a slight grow of .text.

Note this is a bandaid for lack of hotpatching.

Discussed with:	markj
2017-10-22 20:22:23 +00:00
Mark Johnston
cc1307b67f Delete declarations of struct pfs_bitmap, removed in r143841.
MFC after:	1 week
2017-10-22 20:22:11 +00:00
Mateusz Guzik
4f7663af9f sdt: whack unused SDT_PROBE_ENABLED 2017-10-22 20:14:48 +00:00
Jilles Tjoelker
1f04a45950 libc: Do not refer to _DefaultRuneLocale in ctype inlines
Referring to _DefaultRuneLocale causes this >4KB structure to be copied to
all executables that use <ctype.h> inlines (except PIE executables).

This only affects the case where thread local storage is available.

_CurrentRuneLocale cannot be NULL, so the check can be removed entirely.

_DefaultRuneLocale needs to remain available for now since libc++ uses it.
The __isctype inline in include/_ctype.h also refers to _DefaultRuneLocale
and remains available because it may still be used by third party software.

Reviewed by:	bdrewery, theraven
Differential Revision:	https://reviews.freebsd.org/D10363
2017-10-22 20:01:07 +00:00
Mark Johnston
7421ff0751 Address some miscellaneous issues in the CTF man page.
- Fix a number of typos.
- Replace some illumos-specific references.
- Note that a type definition of kind CTF_K_FUNCTION may be followed by
  a null type identifier in order to provide 4-byte alignment for the
  next type definition.

MFC after:	2 weeks
2017-10-22 19:17:25 +00:00
Mark Johnston
ef36b3f756 MFV r323105 (partial): 8300 fix man page issues found by mandoc 1.14.1
illumos/illumos-gate@72d3dbb9ab
72d3dbb9ab

https://www.illumos.org/issues/8300
  Prior to integrating the mdocml update to 1.14.1, fix issues found by
  new version, especially the "new sentence, new line" style rule.

FreeBSD note: this revision merges only the changes to the CTF manual
page. The changes to the ZFS pages cannot be applied directly.

Reviewed by: Robert Mustacchi <rm@joyent.com>
Reviewed by: Toomas Soome <tsoome@me.com>
Approved by: Gordon Ross <gwr@nexenta.com>
Author: Yuri Pankov <yuri.pankov@nexenta.com>

Discussed with:	avg
MFC after:	2 weeks
2017-10-22 18:32:28 +00:00
Mateusz Guzik
614e1868d6 Change kdb_active type to u_char.
Fixes warnings from gcc and keeps the small size. Perhaps nesting should be moved
to another variablle.

Reported by:	ngie
2017-10-22 13:42:56 +00:00
Enji Cooper
f2374e0cc5 Clean up trailing whitespace in kdb_thr_ctx(..)
MFC after:	1 week
2017-10-22 12:12:52 +00:00
Enji Cooper
66d0c18afc Only try handling mutating GCNOS if SRCS is not empty
This should cure the logspam in certain directory about SRCS:M not evaluating
properly, e.g., etc/
2017-10-22 11:45:51 +00:00
Bruce M Simpson
ab28146b6c Modernise this man page somewhat.
1. Add a reference to a good 3rd party list of compatible cables, but
provide suggestions for 'known good' vendors.

2. Change IP-based USB host-host example to a modern Ethernet one which
works 'out of box' with current Linux systems.

3. Explain that USB 3.0 is host-host, even though point-to-point soft
Ethernet can be achieved.

MFC after:	3 weeks
2017-10-22 11:40:55 +00:00
Enji Cooper
174694331c Do direct comparisons with TARGET for armv6/armv7
This simplifies the conditionals
2017-10-22 11:21:31 +00:00
Bruce M Simpson
1d4c696a71 Add Prolific PL27A1 USB 3.0 Host-Host device to udbp(4).
Tested with a Plugable cable in VirtualBox against Linux 4.11.

MFC after:	2 weeks
2017-10-22 11:15:58 +00:00
Edward Tomasz Napierala
be7d4ac586 Add OID for the vm.overcommit sysctl. This makes it possible to remove
one call to sysctl(2) from jemalloc startup code. (That also requires
changes to jemalloc, but I plan to push those to upstream first.)

Reviewed by:	kib
MFC after:	2 weeks
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D12745
2017-10-22 10:35:29 +00:00
Edward Tomasz Napierala
6b61e3e47a Don't call realpath(3) from libmap rtld code. This gets rid of a few calls
to fstatat(2) at binary startup; the difference looks like this:

--- przed       2017-10-14 13:55:49.983528000 +0100
+++ po  2017-10-14 14:10:39.134343000 +0100
@@ -1,15 +1,10 @@
 mmap(0x0,32768,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON,-1,0x0) = 34366173184 (0x800623000)
 issetugid()                                     = 0 (0x0)
-fstatat(AT_FDCWD,"/etc",{ mode=drwxr-xr-x ,inode=1364352,size=2560,blksize=32768 },AT_SYMLINK_NOFOLLOW) = 0 (0x0)
-fstatat(AT_FDCWD,"/etc/libmap.conf",{ mode=-rw-r--r-- ,inode=1373288,size=102,blksize=32768 },AT_SYMLINK_NOFOLLOW) = 0 (0x0)
 openat(AT_FDCWD,"/etc/libmap.conf",O_RDONLY|O_CLOEXEC,00) = 3 (0x3)
 fstat(3,{ mode=-rw-r--r-- ,inode=1373288,size=102,blksize=32768 }) = 0 (0x0)
 mmap(0x0,102,PROT_READ,MAP_PRIVATE,3,0x0)       = 34366205952 (0x80062b000)
 close(3)                                        = 0 (0x0)
-fstatat(AT_FDCWD,"/usr",{ mode=drwxr-xr-x ,inode=561792,size=512,blksize=32768 },AT_SYMLINK_NOFOLLOW) = 0 (0x0)
-fstatat(AT_FDCWD,"/usr/local",{ mode=drwxr-xr-x ,inode=561800,size=512,blksize=32768 },AT_SYMLINK_NOFOLLOW) = 0 (0x0)
-fstatat(AT_FDCWD,"/usr/local/etc",{ mode=drwxr-xr-x ,inode=653279,size=1536,blksize=32768 },AT_SYMLINK_NOFOLLOW) = 0 (0x0)
-fstatat(AT_FDCWD,"/usr/local/etc/libmap.d",0x7fffffffcf50,AT_SYMLINK_NOFOLLOW) ERR#2 'No such file or directory'
+open("/usr/local/etc/libmap.d",O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC,0165) ERR#2 'No such file or directory'
 munmap(0x80062b000,102)                                 = 0 (0x0)
 openat(AT_FDCWD,"/var/run/ld-elf.so.hints",O_RDONLY|O_CLOEXEC,00) = 3 (0x3)
 read(3,"Ehnt\^A\0\0\0\M^@\0\0\0\M-2\0\0"...,128) = 128 (0x80)

Reviewed by:	kib
MFC after:	2 weeks
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D12741
2017-10-22 10:32:40 +00:00
Enji Cooper
0da813c057 Document /usr/lib/cov (COVERAGEDIR) in hier(7) 2017-10-22 08:42:01 +00:00
Konstantin Belousov
456a73ef01 Remove the support for mknod(S_IFMT), which created dummy vnodes with
VBAD type.

FFS ffs_write() VOP catches such vnodes and panics, other VOPs do not
check for the type and their behaviour is really undefined.  The
comment claims that this support was done for 'badsect' to flag bad
sectors, we do not have such facility in kernel anyway.

Reported by:	Dmitry Vyukov <dvyukov@google.com>
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2017-10-22 08:11:45 +00:00
Enji Cooper
246bcd9f73 MFhead@r324851 2017-10-22 07:58:28 +00:00
Enji Cooper
7c6052349c Regenerate src.conf(5) after r324340 (armv7 addition) 2017-10-22 07:36:28 +00:00
Warner Losh
cced8b11d9 Define LIBSA32 to LIBSA on i386 to fix build.
Sponsored by: Netflix
2017-10-22 07:25:28 +00:00
Enji Cooper
d769de5a12 Add more draft text to WITH_COVERAGE 2017-10-22 07:20:11 +00:00
Enji Cooper
651c18f151 Tweaks to make libraries and make installworld
- Optimize/fix _prereq_libs and _generic_libs by not installing the .gcno files
  with "make install". This cuts down on installing unnecessary files to
  WORLDTMP and fixes the build, since BSD.coverage.dist wasn't being splatted
  on WORLDTMP.
- Splat BSD.coverage.dist on ${DESTDIR}/usr/lib in distributeworld/installworld
  so the files will be installed to the proper places.
2017-10-22 07:16:35 +00:00
Enji Cooper
051c9c6839 It _was_ .gcno's, not .gcda's that get produced with cc --coverage
Try to install them instead of the .gcda's, since the .gcda's likely won't exist.

TODO: verify that installworld does indeed do the right thing.

Ref: gcc(1) -ftest-coverage description; --coverage (option in use) is an alias
     for -fprofile-arcs -ftest-coverage
2017-10-22 07:12:55 +00:00
Warner Losh
0a51cbc9c4 Add note to updating about shifting LOADER_*SUPPORT options.
Sponsored by: Netflix
2017-10-22 03:52:26 +00:00
Warner Losh
4b165a5f12 Use BOOTOBJ and BOOTDIR to find geli includes and libraries.
Sponsored by: Netflix
2017-10-22 03:52:22 +00:00
Warner Losh
4b32ccfd81 When building standalone, don't define errno. Let the definition from
stand.h override. This is similar to what we do in the kernel.

Sponsored by: Netflix
2017-10-22 03:52:17 +00:00