summaryrefslogtreecommitdiffstats
path: root/usr.bin
Commit message (Collapse)AuthorAgeFilesLines
* MFC r309124:dim2016-12-2662-2158/+469
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Upgrade our copies of clang, llvm, lldb, compiler-rt and libc++ to 3.9.0 release, and add lld 3.9.0. Also completely revamp the build system for clang, llvm, lldb and their related tools. Please note that from 3.5.0 onwards, clang, llvm and lldb require C++11 support to build; see UPDATING for more information. Release notes for llvm, clang and lld are available here: <http://llvm.org/releases/3.9.0/docs/ReleaseNotes.html> <http://llvm.org/releases/3.9.0/tools/clang/docs/ReleaseNotes.html> <http://llvm.org/releases/3.9.0/tools/lld/docs/ReleaseNotes.html> Thanks to Ed Maste, Bryan Drewery, Andrew Turner, Antoine Brodin and Jan Beich for their help. Relnotes: yes MFC r309147: Pull in r282174 from upstream llvm trunk (by Krzysztof Parzyszek): [PPC] Set SP after loading data from stack frame, if no red zone is present Follow-up to r280705: Make sure that the SP is only restored after all data is loaded from the stack frame, if there is no red zone. This completes the fix for https://llvm.org/bugs/show_bug.cgi?id=26519. Differential Revision: https://reviews.llvm.org/D24466 Reported by: Mark Millard PR: 214433 MFC r309149: Pull in r283060 from upstream llvm trunk (by Hal Finkel): [PowerPC] Refactor soft-float support, and enable PPC64 soft float This change enables soft-float for PowerPC64, and also makes soft-float disable all vector instruction sets for both 32-bit and 64-bit modes. This latter part is necessary because the PPC backend canonicalizes many Altivec vector types to floating-point types, and so soft-float breaks scalarization support for many operations. Both for embedded targets and for operating-system kernels desiring soft-float support, it seems reasonable that disabling hardware floating-point also disables vector instructions (embedded targets without hardware floating point support are unlikely to have Altivec, etc. and operating system kernels desiring not to use floating-point registers to lower syscall cost are unlikely to want to use vector registers either). If someone needs this to work, we'll need to change the fact that we promote many Altivec operations to act on v4f32. To make it possible to disable Altivec when soft-float is enabled, hardware floating-point support needs to be expressed as a positive feature, like the others, and not a negative feature, because target features cannot have dependencies on the disabling of some other feature. So +soft-float has now become -hard-float. Fixes PR26970. Pull in r283061 from upstream clang trunk (by Hal Finkel): [PowerPC] Enable soft-float for PPC64, and +soft-float -> -hard-float Enable soft-float support on PPC64, as the backend now supports it. Also, the backend now uses -hard-float instead of +soft-float, so set the target features accordingly. Fixes PR26970. Reported by: Mark Millard PR: 214433 MFC r309212: Add a few missed clang 3.9.0 files to OptionalObsoleteFiles. MFC r309262: Fix packaging for clang, lldb and lld 3.9.0 During the upgrade of clang/llvm etc to 3.9.0 in r309124, the PACKAGE directive in the usr.bin/clang/*.mk files got dropped accidentally. Restore it, with a few minor changes and additions: * Correct license in clang.ucl to NCSA * Add PACKAGE=clang for clang and most of the "ll" tools * Put lldb in its own package * Put lld in its own package Reviewed by: gjb, jmallett Differential Revision: https://reviews.freebsd.org/D8666 MFC r309656: During the bootstrap phase, when building the minimal llvm library on PowerPC, add lib/Support/Atomic.cpp. This is needed because upstream llvm revision r271821 disabled the use of std::call_once, which causes some fallback functions from Atomic.cpp to be used instead. Reported by: Mark Millard PR: 214902 MFC r309835: Tentatively apply https://reviews.llvm.org/D18730 to work around gcc PR 70528 (bogus error: constructor required before non-static data member). This should fix buildworld with the external gcc package. Reported by: https://jenkins.freebsd.org/job/FreeBSD_HEAD_amd64_gcc/ MFC r310194: Upgrade our copies of clang, llvm, lld, lldb, compiler-rt and libc++ to 3.9.1 release. Please note that from 3.5.0 onwards, clang, llvm and lldb require C++11 support to build; see UPDATING for more information. Release notes for llvm, clang and lld will be available here: <http://releases.llvm.org/3.9.1/docs/ReleaseNotes.html> <http://releases.llvm.org/3.9.1/tools/clang/docs/ReleaseNotes.html> <http://releases.llvm.org/3.9.1/tools/lld/docs/ReleaseNotes.html> Relnotes: yes
* MFC r309676vangyzen2016-12-156-21/+38
| | | | | | | | | | | | | Export the whole thread name in kinfo_proc kinfo_proc::ki_tdname is three characters shorter than thread::td_name. Add a ki_moretdname field for these three extra characters. Add the new field to kinfo_proc32, as well. Update all in-tree consumers to read the new field and assemble the full name, except for lldb's HostThreadFreeBSD.cpp, which I will handle separately. Bump __FreeBSD_version. Sponsored by: Dell EMC
* MFC r309364 r309367 r309624vangyzen2016-12-132-35/+35
| | | | | | | | | | | | | | | locale: fix buffer management Also, handle signed and unsigned chars, and more gracefully handle invalid input. locale: enable more warnings; fix them Do not set WARNS, so it gets the current default of 6. Fix the warnings by sprinkling static, const, or strdup. Make some constant data tables const. Fix whitespace. Sponsored by: Dell EMC
* MFC r309232-309234:delphij2016-12-122-14/+2
| | | | | | | | r309232: Fix an obvious typo. r309233: Eliminate variables that are computed, assigned but never used. r309234: pages and psize are always assigned, so there is no need to initialize them as zero.
* MFC r304875:delphij2016-12-111-1/+1
| | | | Use printable ASCII instead of octal representation.
* MFC r303285:delphij2016-12-114-106/+282
| | | | | | | | | | Change bsdiff to use divsufsort suffix sort library instead of qsufsort, which is more efficient. Note that for now we do not create a separate library for libdivsufsort because it's not used anywhere else. Obtained from: Chromium
* MFC r306299:marcel2016-12-111-3/+6
| | | | | | | | Update local variable 'block' after calling capacity_resize(), otherwise format_resize(), which is called right after, isn't getting the current/actual image size. Rather than rounding up, format_resize() could end up truncating the size and we don't allow that by design.
* MFC: r309198, r309199rmacklem2016-12-101-2/+12
| | | | | Document the -E flag for nfsstat. This is a content change.
* MFC: r309197rmacklem2016-12-101-2/+368
| | | | | | Add a -E flag to nfsstat.c so that it prints out the NFSv4.1 procedure/operation counts. It also avoids clipping the counts at 9 digits.
* MFC r309184:delphij2016-12-101-22/+21
| | | | style(9) indent changes, no actual code change.
* MFC r305951: elfdump: adjust stdout/stderr capabilitiesemaste2016-12-091-5/+9
| | | | | | | stdio uses fstat and the TIOCGETA ioctl. Also collapse the cap_rights_limit and new cap_ioctls_limit calls into one if statement. Errors here are not actionable by the user and distinguishing stdout from stderr doesn't really have value.
* MFC r308340vangyzen2016-11-301-1/+2
| | | | | | | | ncal: fix a reference to an out-of-scope stack buffer PR: 214237 Submitted by: Jonathan de Boyne Pollard Sponsored by: Dell EMC
* MFC r308824vangyzen2016-11-301-2/+32
| | | | | | | | | | locale: fix display of "grouping" and "mon_grouping" values The "grouping" and "mon_grouping" values are arrays of one-byte integers, not arrays of ASCII characters. Display them in a format similar to GNU and MacOS. Sponsored by: Dell EMC
* MFC r308808, r308809: Lookup locale when print all keywords as well.ume2016-11-261-1/+2
|
* MFC r308314:pfg2016-11-091-0/+3
| | | | | | | | | | | | | | | sed(1): add LEGACY_BSDSED_COMPAT compile-time flag. In r297602, which included a __FreeBSD_version bump to 1100105, we changed sed 'i' and 'a' from discarding whitespaces to conform with what GNU and sysvish sed do. There are arguments in favor of keeping the old behavior but the new behavior is also useful for migration purposes. It seems important to at least consider the case of developers depending on the previous behavior so add a CFLAG to enable the old behavior. PR: 213474
* MFC: r302481bapt2016-11-061-1/+1
| | | | | | | | Revert the change from errx/strerror to errc to appease gcc 4.2 I have forgotten this part in r307794 Reported by: lidl
* MFC r306782-r306783bapt2016-11-052-15/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r306782: localedef: Fix ctype dump (fixed wide spread errors) This commit is from John Marino in dragonfly with the following commit log: ==== This was a CTYPE encoding error involving consecutive points of the same ctype. It was reported by myself to Illumos over a year ago but I was unsure if it was only happening on BSD. Given the cause, the bug is also present on Illumos. Basically, if consecutive points were of the exact same ctype, they would be defined as a range regardless. For example, all of these would be considered equivalent: <A> ... <C>, <H> (converts to <A> .. <H>) <A>, <B>, <H> (converts to <A> .. <H>) <A>, <J> ... <H> (converts to <A> .. <H>) So all the points that shouldn't have been defined got "bridged" by the extreme points. The effects were recently reported to FreeBSD on PR 213013. There are countless places were the ctype flags are misdefined, so this is a major fix that has to be MFC'd. ==== This reveals a bad change I did on the testsuite: while 0x07FF is a valid unicode it is not used yet (reserved for future use) PR: 213013 Submitted by: marino@ Reported by: Kurtis Rader <krader@skepticism.us> Obtained from: Dragonfly MFC after: 1 month r306783: localedef: Improve cc_list parsing original commit log: ===== I had originally suspected the parsing of ctype definition files as being the source of the ctype flag mis-definitions, but it wasn't. In the process, I simplified the cc_list parsing so I'm committing the no-impact improvement separately. It removes some parsing redundancies and won't parse partial range definitions anymore. ==== Submitted by: marino Obtained from: Dragonfly MFC after: 1 month
* MFC r308148, r308150, r308156:gjb2016-11-031-4/+6
| | | | | | | | | | | | | r308148: Fix packaging calendar(1) files. r308150: Fix packaging /usr/share/examples/etc. r308156: Fix packaging /usr/lib{,32}/libgcc_eh{,_p}.a. Sponsored by: The FreeBSD Foundation
* MFC r307861:mm2016-10-313-3/+3
| | | | | | | Update libarchive to 3.2.2 Most of the post-3.2.1 fixes have already been merged. This update contains just the version bump and some fixes to the test framework.
* MFC 303002: Include process IDs in core dumps.jhb2016-10-281-0/+1
| | | | | | | | | When threads were added to the kernel, the pr_pid member of the NT_PRSTATUS note was repurposed to store LWP IDs instead of process IDs. However, the process ID was no longer recorded in core dumps. This change adds a pr_pid field to prpsinfo (NT_PRSINFO). Rather than bumping the prpsinfo version number, note parsers can use the note's payload size to determine if pr_pid is present.
* MFC r307638:gahr2016-10-261-2/+2
| | | | | | | | | | | Chase a cornercase in printenv and sync its behaviour with builtin's The cornercase is when printenv is passed a parameter in the form VAR=val, where VAR=val exists in the environment. In this case, printenv would print a spurious newline and returns 0. Approved by: cognet MFC after: 1 week
* MFC r307520: elfdump: correct DT_AUXILIARY / DT_USED / DT_FILTER definitionsemaste2016-10-241-3/+3
| | | | | | r109332 introduced these three as DT_SUNW_*. Update to the correct names already used elsewhere in FreeBSD and the Sun "Linker and Libraries Guide"
* MFC r302471, r302473:bapt2016-10-222-15/+13
| | | | | | | | | | | | | | | | r302471: Add RCS Id. Sort options in SYNOPSIS. Fix macro usage. Fix Dd. Submitted by: wiz@NetBSD.org Obtained from: NetBSD r302473: Sync usage between program and man page. Increase column width. [1] Simplifay the usage() function Replace errx/strerror with errc Submitted by: wiz@NetBSD.org [1] Obtained from: NetBSD
* MFC r303265:bapt2016-10-221-2/+1
| | | | Remove reference cpp(1) which is not used anymore
* MFC r303783, r305927:bapt2016-10-221-40/+29
| | | | | | | | | | | | | r303783: sdiff: remove non finish/function code 2 extra options not available neither on other BSD nor in GNU sdiff: --diff-pid and --pipe-fd were present in the SoC code, none were usable Just remove it r305927: Remove reference of z(s)diff which was dropped before importing
* MFC: 305937bapt2016-10-221-1/+34
| | | | | | | Capsicum-ize tee(1) Reviewed by: allanjude Differential Revision: https://reviews.freebsd.org/D7940
* MFC: 307368,307369,307372,307381bapt2016-10-225-56/+29
| | | | | | | | Remove the common.h include which is actually not used in sdiff.c Turn editit into a static function Move cleanup() into the edit.c file which is the only users of that function Remove common.{c,h} Fix typos in sdiff(1) message and improve display
* MFH (r305414): add a toggle to show approximate swap usage.des2016-10-221-8/+55
|
* MFC r303367:ngie2016-10-211-1/+0
| | | | | | Testcase 7.8 no longer needs to be marked TODO It passes out of the box today
* MFC r303541, r303542, r303543, r303545, r303546, r303547, r304225, r304226, ↵araujo2016-10-219-20/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r304605, r304676, r305212, r305863: r303541: Use nitems() from sys/param.h. Sponsored by: gandi.net (BSD Day Taiwan) MFC after: 2 weeks. r303542: Use nitems() from sys/param.h. MFC after: 2 weeks. Sponsored by: gandi.net (BSD Day Taiwan) r303543: Use nitems() from sys/param.h. MFC after: 2 weeks. Sponsored by: gandi.net (BSD Day Taiwan) r303545: Use nitems() from sys/param.h. MFC after: 2 weeks. Sponsored by: gandi.net (BSD Day Taiwan) r303546: Use nitems() from sys/param.h. MFC after: 2 weeks. Sponsored by: gandi.net (BSD Day Taiwan) r303547: Use nitems() from sys/param.h. MFC after: 2 weeks. Sponsored by: gandi.net (BSD Day Taiwan) r304225: Use nitems() from sys/param.h. MFC after: 2 weeks. r304226: Use nitems() from sys/param.h. MFC after: 2 weeks. r304605: Fix calloc(3) argument order. Reviewed by: trasz MFC after: 4 weeks. Differential Revision: https://reviews.freebsd.org/D7532 r304676: Fix calloc(3) argument order. MFC after: 4 weeks. r305212: - Invert calloc(3) argument order. MFC after: 4 weeks r305863: Invert calloc(3) argument order. Reviewed by: ed. MFC after: 4 weeks. Differential Revision: https://reviews.freebsd.org/D7902
* MFC r302558:gahr2016-10-191-108/+133
| | | | | | | | Do not truncate lines longer than 512 chars. PR: 210344 MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D6881
* MFC r303818, r303833, r303941, r304478, r304481, r304483, r304484, r304554,ed2016-10-121-2/+0
| | | | | | | | | | | | | | | | | | r304555, r304556, r304557, r304558, r304559, r304561, r304563, r304564, r304565, r304615, r304742, r304743, r304744, r304745, r304748, r304886, r304991, r305928, r305938, r305987, r306185: Bring CloudABI support back in sync with HEAD. - Add support for running 32-bit executables on amd64, armv6 and i386. - As these new architectures require the use of the vDSO, merge back vDSO support for 64-bit executables running on amd64 and arm64 as well. This has the advantage that support for vDSO-less execution can be phased out when 11.0 becomes unsupported, as opposed to 11.x. This change has been tested by running the cloudlibc unit tests on all supported architectures, which seems to work fine.
* MFC r306560, r306561:pfg2016-10-091-4/+3
| | | | | | | | | patch(1): make some macros look boolean. Minor cleanup inspired by a new patch(1) variant in schily tools. For reference: https://sourceforge.net/p/schillix-on/
* MFC r305813:pfg2016-10-091-3/+3
| | | | | | | | | | localedef(1): make better use of calloc(3) arguments. The first argument of calloc(3) should be an ordinal type, and the second a size: split a multiplication to make better use of calloc(3) and detect overflows. Do some other re-ordering and style fixes while here.
* MFC 302859: Include command line arguments in core dump process info.jhb2016-10-061-1/+15
| | | | | Fill in pr_psargs in the NT_PRSINFO ELF core dump note with command line arguments.
* MFC: r304059rmacklem2016-10-031-3/+26
| | | | | | Update the man page to descibe the "-d" option added by r304058. This is a content change.
* MFC: r304058, r304066, r304194rmacklem2016-10-032-268/+504
| | | | | | Update nfsstat.c to use the new kernel nfsstat structure and add the new "-d" flag from D1626. The man page will be updated in a subsequent commit.
* MFC r306261:kib2016-09-304-0/+206
| | | | | | | Add proccontrol(1). MFC r306281 (by bdrewery): DIRDEPS_BUILD: Connect new directories.
* MFC r306131asomers2016-09-261-1/+1
| | | | Update mkimg(1) author's contact info
* MFC bspatch Capsicumization, sanity checks, and other improvementsemaste2016-09-221-75/+153
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r304691: bspatch: apply style(9) Make style changes (and trivial refactoring of open calls) now in order to reduce noise in diffs for future capsicum changes. r304807 (allanjude): Capsicumize bspatch Move all of the fopen() and open() calls to the top of main() Restrict each FD to least privilege (read/seek only, write only, etc) cap_enter(), and make all except the output FD read/seek only. r304821: bspatch: remove output file in the case of error r305486: bspatch: add sanity checks on sizes to avoid integer overflow Note that this introduces an explicit 2GB limit, but this was already implicit in variable and function argument types. This is based on the "non-cryptanalytic attacks against freebsd update components" anonymous gist. Further refinement is planned. r305737: bspatch: remove superfluous newlines from errx strings r305822: bspatch: use #define for header size instead of magic number r306026: bspatch: Remove backwards-compatibility sys/capability.h support bspatch previously included sys/capability.h or sys/capsicum.h based on __FreeBSD_version, as FreeBSD is the upstream for bsdiff and we may see this file incorporated into other third-party software. The Capsicum header is now installed as sys/capsicum.h in stable/10 and FreeBSD 10.3, so we can just use sys/capsicum.h and simplify the logic.
* MFC r305077:dim2016-09-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Squelch clang 3.9.0 warnings about BASE (which is 32768) being converted to -32768 when it is used as an argument to mp_itom(), in both libtelnet and newkey. This code has been wrong since r26238 (!), so after almost 20 years it is rather useless to try to correct it. MFC r305086: Fix warnings in telnet about invalid constant conversions, e.g.: contrib/telnet/telnet/commands.c:2914:13: error: implicit conversion from 'int' to 'char' changes value from 137 to -119 [-Werror,-Wconstant-conversion] *lsrp++ = IPOPT_SSRR; ~ ^~~~~~~~~~ /usr/include/netinet/ip.h:152:21: note: expanded from macro 'IPOPT_SSRR' #define IPOPT_SSRR 137 /* strict source route */ ^~~ contrib/telnet/telnet/commands.c:2916:13: error: implicit conversion from 'int' to 'char' changes value from 131 to -125 [-Werror,-Wconstant-conversion] *lsrp++ = IPOPT_LSRR; ~ ^~~~~~~~~~ /usr/include/netinet/ip.h:148:21: note: expanded from macro 'IPOPT_LSRR' #define IPOPT_LSRR 131 /* loose source route */ ^~~ Use unsigned char buffers instead.
* MFC r304809:ngie2016-09-011-0/+6
| | | | | | | | | | Add non-TRUSTEDBSD prefixed knobs for the _PC_ACL* and {CAP,INF,MAC}_PRESENT knobs It's not necessarily intuitive that the variables to query contain TRUSTEDBSD in the prefix. Add non-TRUSTEDBSD prefixed knobs for querying things like "_PC_ACL_NFS4". Relnotes: yes
* MFC r303804:ngie2016-08-281-1/+0
| | | | | | | | | | | | Fix building usr.bin/tar/tests with PIE symbol building enabled by removing CFLAGS+= -static `CFLAGS+= -static` was a carryover from pre-r289195 with usr.bin/tar/test/Makefile that should have been specified in LDFLAGS There doesn't seem to be an apparent need for static compilation of the test binaries. Obtained-from: opBSD (418a491eed20d2603ddd1f1bd92c2c0d95094002)
* MFC r303830,r304693,r304694,r304698:ngie2016-08-282-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | r303830: Remove vestigal references to __alpha__ Replace alpha reference in getconf(1) with amd64 [*] PR: 211300 [*] r304693: Clean up trailing whitespace r304694: Add `MIN_HOLE_SIZE` pathconf(2) support to getconf This allows shell programs to programmatically determine whether or not a filesystem supports sparse files r304698: Add support for _PC_ACL_NFS4 as TRUSTEDBSD_ACL_NFS4 The TRUSTEDBSD prefix was chosen for consistency with the other related `_PC_ACL*` prefixed variables.
* MFC r304292:tuexen2016-08-201-4/+4
| | | | | | | Use names for SCTP and UDPLite when reporting the input histogram. MFC r304295: Fix the output for scope statistics.
* MFC r303929,r303930,r303931,r303932,r303933:bdrewery2016-08-191-8/+39
| | | | | | | | | | | | | r303929: Fix -S with -b not atomically updating the destination file. r303930: Support -v for -l. r303931: Fix -S with -l not being atomic. r303932: Fix -b failure not restoring flags on the destination file. r303933: Squelch a false-positive Clang static analyzer warning.
* MFC r303990:kib2016-08-191-2/+0
| | | | Remove unused prototypes.
* MFC r304374ache2016-08-181-1/+1
| | | | Fix TAB replaced with spaces in prev. commit.
* MFC r303581ache2016-08-182-2/+2
| | | | Fix date
* MFC r303568ache2016-08-181-1/+1
| | | | Remove another vestige of scripted conversion
OpenPOWER on IntegriCloud