Commit Graph

5007 Commits

Author SHA1 Message Date
Brooks Davis
bfc99943b0 ndis(4): remove as previous announced
nids(4) was a clever idea in the early 2000's when the market was
flooded with 10/100 NICs with Windows-only drivers, but that hasn't been
the case for ages and the driver has had no meaningful maintenance in
ages. It only supports Windows-XP era drivers.

Also remove:
 - ndis support from wpa_supplicant
 - ndiscvt(8)

Reviewed By:	emaste, bcr (manpages)
Differential Revision:	https://reviews.freebsd.org/D27609
2021-01-25 21:45:03 +00:00
Alexander Richardson
a8b20f4fab Create symlinks to host tools on non-FreeBSD hosts
This is unnecessary when cross-building from Linux/macOS.
Additionally, cp -p appears to be broken on macOS Big Sur
(https://openradar.appspot.com/8957219).

For some unknown reason this commit appears to fix
freezes when building on macOS Big Sur.
This also fixes building in docker with volume mounts
with ACLs, since setting the ACL with cp -p fails otherwise.

Obtained From:	CheriBSD
Tested By:	gnn (macOS Big Sur), Nathaniel Wesley Filardo (docker)
Reviewed By:	jrtc27, imp
Differential Revision: https://reviews.freebsd.org/D28267
2021-01-25 15:09:43 +00:00
Ed Maste
b23665f316 Remove Binutils from src.conf(5) option descriptions
All binutils remnants have been removed before FreeBSD 13.

PR:		252842
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
2021-01-24 12:22:01 -05:00
Jessica Clarke
d6327ae8c1 Fix cross-build support for Ubuntu 16.04
Older glibc headers did some very nasty things that have since been
sanitised. We could also fix this by adding a linux/getopt.h wrapper
alongside the existing common/getopt.h that #undef's __need_getopt, but
that seems a little more hacky and complicated.

Reviewed by:	arichardson
2021-01-23 20:59:15 +00:00
Kyle Evans
123ae3045d build: remove LIBPTHREAD/LIBTHR build options
WITHOUT_LIBTHR has been broken for a little over five years now, since the
xz 5.2.0 update introduced a hard liblzma dependency on libthr, and building
a useful system without threading support is becoming increasingly more
difficult.

Additionally, in the five plus years that it's been broken more reverse
dependencies have cropped up in libzstd, libsqlite3, and libcrypto (among
others) that make it more and more difficult to reconcile the effort needed
to fix these options.

Remove the broken options.

PR:		252760
Reviewed by:	brooks, emaste, kib
Differential Revision:	https://reviews.freebsd.org/D28263
2021-01-22 12:33:27 -06:00
Alex Richardson
0348c8fcfa getopt: Fix conversion from string-literal to non-const char *
Define a non-const static char EMSG[] = "" to avoid having to add
__DECONST() to all uses of EMSG. Also make current_dash a const char *
to fix this warning.
2021-01-19 21:23:25 +00:00
Marius Strobl
145f01a3df kerneldoc: remove Doxyfile for cmx(4)
The latter has been removed in 0d3a424a89.
2021-01-16 23:53:13 +01:00
Dimitry Andric
7593c13e18 Add libclang_rt.profile-powerpc64le.a to (Optional)?ObsoleteFiles.inc
On little-endian PowerPC64, this prevented /usr/lib/clang/11.0.0 being
cleaned up completely after upgrading to clang 11.0.1.

Noticed by:	pkubaj
MFC after:	4 weeks
X-MFC-With:	r364284
2021-01-16 17:25:56 +01:00
Mariusz Zaborski
aefe30c543 cat: capsicumize it
Reviewed by:	markj, arichardson
Differential Revision:	https://reviews.freebsd.org/D28083
2021-01-15 21:23:42 +01:00
Kyle Evans
03774659d1 tools: git hooks: drop "submitted by" from commit template
With the switch to git, we should strive to properly attribute every
commit appropriately with the metadata that's provided to do so. In this
case, the submitter should be recorded via the author metadata.  Committing
an arbitrary patch, one can set it as such:

git commit --author="John Smith <smith@example.com>"

Reviewed-by:	emaste
Differential-Revision:	https://reviews.freebsd.org/D28069
2021-01-14 00:33:07 -06:00
Vincenzo Maffione
d7493759fb netmap: pkt-gen: fix offset hex formatting
PR:		252594
Reported by:	brpoole@vt.edu
MFC after:	3 days
2021-01-12 22:05:04 +00:00
Kyle Evans
14a16fd3e7 build: add WITHOUT_CLEAN workaround for 821aa63a09
The *w variants of ncurses directories went away, and the remaining names
build the widechar variants instead of non-widechar variants. As such, the
entire ncurses tree should be regenerated.

Key off of lib/ncurses/ncursesw being present and remove the whole ncurses
hierarchy if it is.

Reviewed by:	emaste (IRC)
2021-01-08 10:43:53 -06:00
Warner Losh
a21def4d56 pccard: Remove wi(4) driver
Remove wi(4). pccard is going away, and wi only supports PC Card
devices, though it has a minor amount of glue to also support
PCI cards. However, removing the one without removing the other
is hard, so the whole driver is being removed.

Relnotes: Yes
2021-01-07 20:41:06 -07:00
Alex Richardson
d146f83180 prepare-commit-msg: Avoid warning on macOS and shellcheck fixes
The macOS /bin/sh complains about using return outside of functions.
Replace `return 0` with `exit 0` to fix this. While editing this files
I've also fixed all the shellcheck warnings that were displayed by my IDE.

Reviewed By:	emaste
Differential Revision: https://reviews.freebsd.org/D28016
2021-01-07 14:00:32 +00:00
Alex Richardson
b500c184b6 Drop some unncessary stale code from Makefile.boot
No longer required after 0e1e341b48.
2021-01-07 10:55:21 +00:00
Alex Richardson
d037edf820 tools/build/make.py: Fix macOS build after a920b9817
If we set STRIPBIN, we also have to set XSTRIPBIN since we otherwise
use the host /usr/bin/strip during buildworld. However, this does not
work on macOS since /usr/bin/strip doesn't handle ELF binaries.
2021-01-07 10:55:21 +00:00
Alex Richardson
7fa2f2a62f Rename NO_WERROR -> MK_WERROR=no
As suggested in D27598. This also supports MK_WERROR.clang=no and
MK_WERROR.gcc=no to support the existing NO_WERROR.<compiler> uses.

Reviewed By:	brooks
Differential Revision: https://reviews.freebsd.org/D27601
2021-01-07 09:31:03 +00:00
Alex Richardson
7467c537a5 Fix warnings during bootstrap phase on macOS 2021-01-07 09:31:03 +00:00
Alex Richardson
4e64fb9f49 Fix warnings during bootstrap on Linux systems
Most warnings are currently off for the boostrap phase, but once D27598
lands they will be enabled again.
2021-01-07 09:30:50 +00:00
Alex Richardson
ed8455806e Fix all warnings emitted in make kernel-toolchain
With this change and D27598 make kernel-toolchain no longer emits any
warnings for me.

Reviewed By:	emaste
Differential Revision: https://reviews.freebsd.org/D27599
2021-01-07 09:26:22 +00:00
Vincenzo Maffione
163f4f1573 netmap: bridge: fix NS_MOREFRAG support
Support for NS_MOREFRAG is broken, as NS_MOREFRAG is copied from
the TX slot to the RX slot rather than the other way around.
Also, the NS_MOREFRAG must be copied also in case of packet
copy (no zerocopy).

Reported by:	rajesh1.kumar_amd.com
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D27980
2021-01-07 07:05:57 +00:00
Kristof Provost
c38e59ce1b pfctl: Fix NOCLEAN build
We've created a new pf_ruleset.c file for pfctl and no longer use the
kernel vrsion, but the build system doesn't handle this dependency
change correctly. Delete the dependency file if it contains the kernel
version of the file.

MFC after:	2 weeks
2021-01-06 22:07:46 +01:00
Baptiste Daroussin
821aa63a09 ncurses: only keep the version with widechar support
Only keep the widechar version of ncurses as libncursesw.so.9

Keep the old name to avoid breaking the ABI compatibility (the non
widechar version libncurses.so.9 is not binary compatible with
libncursesw.so.9) since all ports and base are already only linking
against the widechar version we can simply remove libncurses.so.9

Since the .9 version only lived in the dev branch and never ended in a
release, it is simply removed and not added to any binary compat
package.

Add symlinks to keep build time compatibility for anyone linking against
-lncurses
2021-01-05 14:01:32 +01:00
Dimitry Andric
eaeb601bd6 Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
release/11.x llvmorg-11.0.1-rc2-0-g43ff75f2c3f (aka 11.0.1 rc2).

MFC after:	4 weeks
X-MFC-With:	r364284
2021-01-03 13:54:24 +01:00
Ed Maste
b67e440755 Add comment explaining Git commit message hook
Suggested by:	jhb
2020-12-30 12:33:19 -05:00
Poul-Henning Kamp
07b0027f6c Handle ports FLAVOR better. (+minor polish) 2020-12-30 16:05:09 +00:00
Hiroki Sato
916806472a Fix generation of colldef source files for non-UTF-8 locales
- Files for colldef were generated by duplicating UTF-8 collation files
  for each language and included invalid characters in the non-UTF-8
  encodings.  localedef(1) does not allow those characters.
  cldr2def.pl now checks if the characters are valid based on charmap files.

  TODO: ja_JP.UTF-8 locale should not be generated solely from CLDR because
  it was standardized in a document "UI-OSF Application Platform Profile for
  Japanese Environment" which was incompatible with information in CLDR.
  Most of commercial Unix vendors adopt this pre-Unicode-era document
  as the reference even for UTF-8 locale.  Newer versions of Solaris have
  added a CLDR version as ja_JP.UTF-8@cldr, and IBM AIX has used
  JA_JP.UTF-8 for the UI-OSF specification and ja_JP.UTF-8 for CLDR.

  Note that this commit does not change generation of ja_JP.UTF-8.
  Changes related to this issue will be committed separately later.

- Generate POSIX charamap UTF-32 as a reference.  It was confusing that
  charmap.xml used Unicode names defined in UnicodeData.txt though POSIX
  charmap used slightly different names for the same code points.
  cldr2def.pl now uses UTF-32.cm as single information source for Unicode
  symbol names and code points.  Charset.xml is also updated to use them.

- Fix a bug in get_encodings() in cldr2def.pl which did not understand
  0x00+0x00 notation correctly in charmaps/ISCII-DEV.TXT.

- Do not regenerate posix/xx_Comm_C.UTF-8.src every time when doing
  "make build".

Reviewed by:	bapt
Differential Revision:	https://reviews.freebsd.org/D27809
2020-12-30 04:40:27 +09:00
Adrian Chadd
66585c3fe2 [wlanwatch] fix compiler warnings-as-errors on gcc-6.4 mips
* argc/argv are currently unused
* msglen is currently unused
* "default" is a const buffer, but char *cp isn't, so
  change default string to be a non-const global string variable
* Make 'cp' private to each context that's using it, which fixes
  a "variable shadows previous declaration" warning and makes it
  easier to track where it was being leaked between address family
  sections
2020-12-29 10:24:36 -08:00
Adrian Chadd
1fef838b91 [wlanwds] Fix compiler warnings-as-errors on freebsd gcc-6.4 mips
* Remove unused verbose global; things are now done through syslog
* Mark a variable as unused in handle_rtmsg()

Tested:

* FreeBSD/mips32 using gcc-6.4
2020-12-29 10:24:33 -08:00
Adrian Chadd
ff7c2c5a3b [wlanstats] Fix warnings-as-errors on gcc-6.4 on mips
* use CLLADDR() to not try deconsting a const
* Unsigned where they should be
* static where it should be

Tested:

* freebsd/mips32, using gcc-6.4
2020-12-29 10:24:30 -08:00
Kyle Evans
8aff76fb37 build: remove the option to build gnugrep
Unconditionally install bsdgrep as grep, bootstrap or not. Remove all
build glue and stop installing both gnugrep and libgnuregex now that
all consumers of the latter are gone.

Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D27732
2020-12-25 15:14:17 -06:00
Marius Strobl
9cca83b6db mk48txx(4): remove obsolete driver
It's no longer used since 58aa35d429
and r357455 respectively.
2020-12-25 19:47:45 +01:00
Marius Strobl
d141239c56 mc146818(4): remove obsolete driver
It's no longer used since 58aa35d429
and r357455 respectively.
2020-12-25 19:47:45 +01:00
Ed Maste
a62107ed19 make the git commit message template more compact
git's default commit message includes the list of staged, unstaged, and
untracked files; adding our metadata tags and then their descriptions
made for a very long template.

Move the descriptions to the metadata lines themselves.

Reviewed by:	bcr
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D27664
2020-12-23 08:58:17 -05:00
Yuri Pankov
f952bdf142 tools/tools/locale: skip control character widths
Do not explicitly encode control characters widths as 0
allowing wcwidth() to return the proper implicit value for
non-printable characters (-1).

Reported by:	naddy
2020-12-23 15:53:43 +03:00
Yuri Pankov
150367e9aa tools/tools/locale: fix static-colldef 2020-12-18 08:43:06 +00:00
Yuri Pankov
43835d120f tools/tools/locale: install generated files in current src checkout 2020-12-18 04:01:05 +00:00
Ed Maste
f3fec471a3 Describe the commit message template our git hook script produces
Reported by:	rpokala
2020-12-17 20:31:45 +00:00
Ed Maste
352b4e2092 chmod +x the git commit message prep hook 2020-12-17 20:11:31 +00:00
Ed Maste
9f13adee8b Add initial version of git commit message preparation hook
Start with a slightly modified version of the SVN commit template, to
allow developers to experiment.  This will be updated in the future as
our process and techniques evolve.

This can be installed by copying or symlinking into the .git/hooks/
directory.

Feedback from:	cem, jhb
Reviewed by:	imp
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D27633
2020-12-17 19:58:29 +00:00
Kyle Evans
29842cb36e lualoader: fix lua-lint run
luacheck rightfully complains that i is unused in the show-module-options
loop at the end (it was used for some debugging in the process).

We've added a new pager module that's compiled in, so declare that as an
acceptable global.
2020-12-17 18:29:30 +00:00
Brooks Davis
a7e24b48d2 Remove Doxyfiles for removed drivers
Reported by:	emaste
2020-12-15 18:44:41 +00:00
Ed Maste
1c0ea326aa Retire obsolete GDB 6.1.1
GDB 6.1.1 was released in June 2004 and is long obsolete. It does not
support all of the architectures that FreeBSD does, and imposes
limitations on the FreeBSD kernel build, such as the continued use of
DWARF2 debugging information.

It was kept (in /usr/libexec/) only for use by crashinfo(8), which
extracts some basic information from a kernel core dump after a crash.
Crashinfo already prefers gdb from port/package if installed.

Future work may add kernel debug support to LLDB or find another path
for crashinfo's needs, but in any case we do not want to ship the
excessively outdated GDB in FreeBSD 13.

Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D27610
2020-12-15 17:44:19 +00:00
Ed Maste
369d70ec92 Remove more cx,ctau leftovers
Missed in r359178
2020-12-15 01:45:19 +00:00
Yuri Pankov
89b418d69e locale: fix mode for installed files to be 644, not 755
While here, drop '-c' flag to install as it's default and provided for
backward compatibility only.
2020-12-12 23:41:47 +00:00
Ian Lepore
ff3468ac94 Provide userland notification of gpio pin changes ("userland gpio interrupts").
This is an import of the Google Summer of Code 2018 project completed by
Christian Kramer (and, sadly, ignored by us for two years now).  The goals
stated for that project were:

    FreeBSD already has support for interrupts implemented in the GPIO
    controller drivers of several SoCs, but there are no interfaces to take
    advantage of them out of user space yet. The goal of this work is to
    implement such an interface by providing descriptors which integrate
    with the common I/O system calls and multiplexing mechanisms.

The initial imported code supports the following functionality:

 -  A kernel driver that provides an interface to the user space; the
    existing gpioc(4) driver was enhanced with this functionality.
 -  Implement support for the most common I/O system calls / multiplexing
    mechanisms:
     -  read() Places the pin number on which the interrupt occurred in the
        buffer. Blocking and non-blocking behaviour supported.
     -	poll()/select()
     -	kqueue()
     -	signal driven I/O. Posting SIGIO when the O_ASYNC was set.
 -  Many-to-many relationship between pins and file descriptors.
     -  A file descriptor can monitor several GPIO pins.
     -  A GPIO pin can be monitored by multiple file descriptors.
 -  Integration with gpioctl and libgpio.

I added some fixes (mostly to locking) and feature enhancements on top of
the original gsoc code.  The feature ehancements allow the user to choose
between detailed and summary event reporting.  Detailed reporting provides
a record describing each pin change event.  Summary reporting provides the
time of the first and last change of each pin, and a count of how many times
it changed state since the last read(2) call.  Another enhancement allows
the recording of multiple state change events on multiple pins between each
call to read(2) (the original code would track only a single event at a time).

The phabricator review for these changes timed out without approval, but I
cite it below anyway, because the review contains a series of diffs that
show how I evolved the code from its original state in Christian's github
repo for the gsoc project to what is being commited here.  (In effect,
the phab review extends the VC history back to the original code.)

Submitted by:	Christian Kramer
Obtained from:	https://github.com/ckraemer/freebsd/tree/gsoc2018
Differential Revision:	https://reviews.freebsd.org/D27398
2020-12-12 18:34:15 +00:00
Mitchell Horne
d46a2a0013 riscv: allow building virtual machine images
RISC-V has the same booting requirements as arm64 (loader.efi, no legacy
boot options), so generated images for both architectures have the same
partition layout.

Reviewed by:	gjb
Differential Revision:	https://reviews.freebsd.org/D27044
2020-12-08 00:37:11 +00:00
Hiroki Sato
6c9838ca71 Fix the source directory when installing the results. The install
target did not install them actually.

Spotted by:	Thomas Munro, bapt, yuripv
2020-12-07 04:45:29 +00:00
Yuri Pankov
2c8d44449b update wcwidth data from utf8proc
Character width data being out of date is a constant source
of weird rendering issues and wasted time trying to diagnose
those, e.g. as reported by Jeremy Chadwick:

https://gitlab.com/muttmua/mutt/-/issues/67

Sadly, there is no real ("standard") wcwidth data source, so
this tries to rectify the problem using the utf8proc one (through
its C API) which would hopefully benefeat both FreeBSD and
utf8proc through bug reports (if any).

Reviewed by:	bapt
Differential Revision:	https://reviews.freebsd.org/D27259
2020-12-06 16:44:41 +00:00
Kyle Evans
7c2f310f6d Retire GNU_GREP_COMPAT knob
This was introduced and then disabled by default primarily to avoid dealing
with bugs in libgnuregex. rS363823 switched to using libregex for it, so
let's just rip the option out now so we can make sure we're getting tested
with libregex via bsdgrep.

Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D27476
2020-12-05 02:21:58 +00:00