Commit Graph

9763 Commits

Author SHA1 Message Date
rin 7da850018c Apply this fix also for binutils.old.
http://www.nerv.org/netbsd/?q=id:20210422T010948Z.f87d2246188cfedb66a0d5a012c107b6a2b9f395

> Fix regression where ld(1) is trapped into infinite loop when
> linking binary whose text does not fit within R_PPC_REL24.
>
> Reported upstream as Bug 27755:
> https://sourceware.org/bugzilla/show_bug.cgi?id=27755
>
> This problem was introduced to binutils-2-31-1 for our tree.
> netbsd-9 is affected, while netbsd-8 is not.
2021-04-22 01:14:18 +00:00
rin 1c7fbcda57 Fix regression where ld(1) is trapped into infinite loop when
linking binary whose text does not fit within R_PPC_REL24.

Reported upstream as Bug 27755:
https://sourceware.org/bugzilla/show_bug.cgi?id=27755

This problem was introduced to binutils-2-31-1 for our tree.
netbsd-9 is affected, while netbsd-8 is not.
2021-04-22 01:09:48 +00:00
hannken a2c5994a36 Prevent blocking l2arc_feed_thread() forever, skip the
cv_timedwait() for negative or zero ticks.
2021-04-21 10:02:34 +00:00
rillig 296378dbd5 clang: fix build for installing libclang_rt.ubsan_minimal-x86_64.a
The build failed with:

	--- install-ubsan_minimal-m64 ---
	x86_64--netbsd-install: the last argument
	    (/.../libclang_rt.ubsan_minimal-x86_64.a.syms)
	    must name an existing directory

The cause of this is that the suffix transformation rule for .a.a.sym
was active even during 'make install'.

At that point, the make variable .ALLSRC for the target
${DESTDIR}/.../libclang_rt.ubsan_minimal-x86_64.a.sym included not only
the corresponding file from the source directory, but also the potential
source file from the transformation rule, in this case
libclang_rt.ubsan_minimal-x86_64.a.

This led to several file parameters for the command 'install', which is
only allowed if the last parameter names an existing directory.
2021-04-20 23:19:53 +00:00
rillig e05bae9cb6 tmux: move __printflike to the declaration in the header
Noted by Akihiko HAYASHI.
2021-04-20 17:42:31 +00:00
mrg 307da2e47a give a structure a name.
it makes GCC 10 less unhappy about building arm64 GCC 10.
2021-04-20 10:39:58 +00:00
rillig bc7a89052f tmux: fix -Wformat-nonliteral for Clang
dist/control.c:394:17: error: format string is not a string literal
    [-Werror,-Wformat-nonliteral]
        xvasprintf(&s, fmt, ap);
                       ^~~

dist/status.c:436:33: error: format string is not a string literal
    [-Werror,-Wformat-nonliteral]
        xvasprintf(&c->message_string, fmt, ap);
                                       ^~~
2021-04-19 21:52:17 +00:00
mrg 12037e2a81 hppa switched. sh3el seems ready. m68k atf wasn't fail.. 2021-04-19 08:40:15 +00:00
christos c745c111da fix the 32 bit build (I guess the authors don't have any 32 bit machines
anymore)
2021-04-18 14:01:29 +00:00
mrg 6b7734269e arm64-gcc10 can run atf fine (with a GCC 9 kernel.) 2021-04-17 22:03:57 +00:00
mrg 05211fa483 it's spelled aarch64eb. now aarch64eb userland builds, too.
update arm64 status (kernels still need new libkern help.)
2021-04-17 22:01:02 +00:00
christos e271dbb81d merge our changes between tmux-3.1c and tmux-3.2 2021-04-17 20:42:09 +00:00
christos 9fb66d812c CHANGES FROM 3.1c TO 3.2
* Add a flag to disable keys to close a message.
* Permit shortcut keys in buffer, client, tree modes to be configured with a
  format (-K flag to choose-buffer, choose-client, choose-tree).
* Add a current_file format for the config file being parsed.
* When display-message used in config file, show the message after the config
  file finishes.
* Add client-detached notification in control mode.
* Improve performance of format evaluation.
* Make jump command support UTF-8 in copy mode.
* Support X11 colour names and other colour formats for OSC 10 and 11.
* Add "pipe" variants of "copy-pipe" commands which do not copy.
* Include "focused" in client flags.
* Send Unicode directional isolate characters around horizontal pane borders if
  the terminal supports UTF-8 and an extension terminfo(5) capability "Bidi" is
  present.
* Add a -S flag to new-window to make it select the existing window if one
  with the given name already exists rather than failing with an error.
* Addd a format modifier to check if a window or session name exists (N/w or
  N/s).
* Add compat clock_gettime for older macOS.
* Add a no-detached choice to detach-on-destroy which detaches only if there
  are no other detached sessions to switch to.
* Add rectangle-on and rectangle-off copy mode commands.
* Change so that window_flags escapes # automatically. A new format
  window_raw_flags contains the old unescaped version.
* Add -N flag to never start server even if command would normally do so.
* With incremental search, start empty and only repeat the previous search if
  the user tries to search again with an empty prompt.
* Add a value for remain-on-exit that only keeps the pane if the program
  failed.
* Add a -C flag to run-shell to use a tmux command rather than a shell command.
* Do not list user options with show-hooks.
* Remove current match indicator in copy mode which can't work anymore since we
  only search the visible region.
* Make synchronize-panes a pane option and add -U flag to set-option to unset
  an option on all panes.
* Make replacement of ##s consistent when drawing formats, whether followed by
  [ or not. Add a flag (e) to the q: format modifier to double up #s
* Add -N flag to display-panes to ignore keys.
* Change how escaping is processed for formats so that ## and # can be used in
  styles.
* Add a 'w' format modifier for string width.
* Add support for Haiku.
* Expand menu and popup -x and -y as formats.
* Add numeric comparisons for formats.
* Fire focus events even when the pane is in a mode.
* Add -O flag to display-menu to not automatically close when all mouse buttons
  are released.
* Allow fnmatch(3) wildcards in update-environment.
* Disable nested job expansion so that the result of #() is not expanded again.
* Use the setal capability as well as (tmux's) Setulc.
* Add -q flag to unbind-key to hide errors.
* Allow -N without a command to change or add a note to an existing key.
* Add a -w flag to set- and load-buffer to send to clipboard using OSC 52.
* Add -F to set-environment and source-file.
* Allow colour to be spelt as color in various places.
* Add n: modifier to get length of a format.
* Respond to OSC colour requests if a colour is available.
* Add a -d option to display-message to set delay.
* Add a way for control mode clients to subscribe to a format and be notified
  of changes rather than having to poll.
* Add some formats for search in copy mode (search_present, search_match).
* Do not wait on shutdown for commands started with run -b.
* Add -b flags to insert a window before (like the existing -a for after) to
  break-pane, move-window, new-window.
* Make paste -p the default for ].
* Add support for pausing a pane when the output buffered for a control mode
  client gets too far behind. The pause-after flag with a time is set on the
  pane with refresh-client -f and a paused pane may be resumed with
  refresh-client -A.
* Allow strings in configuration files to span multiple lines - newlines and
  any leading whitespace are removed, as well as any following comments that
  couldn't be part of a format. This allows long formats or other strings to be
  annotated and indented.
* Instead of using a custom parse function to process {} in configuration
  files, treat as a set of statements the same as outside {} and convert back
  to a string as the last step. This means the rules are consistent inside and
  outside {}, %if and friends work at the right time, and the final result
  isn't littered with unnecessary newlines.
* Add support for extended keys - both xterm(1)'s CSI 27 ~ sequence and the
  libtickit CSI u sequence are accepted; only the latter is output. tmux will
  only attempt to use these if the extended-keys option is on and it can detect
  that the terminal outside supports them (or is told it does with the
  "extkeys" terminal feature).
* Add an option to set the pane border lines style from a choice of single
  lines (ACS or UTF-8), double or heavy (UTF-8), simple (plain ASCII) or number
  (the pane numbers). Lines that won't work on a non-UTF-8 terminal are
  translated back into ACS when they are output.
* Make focus events update the latest client (like a key press).
* Store UTF-8 characters differently to reduce memory use.
* Fix break-pane -n when only one pane in the window.
* Instead of sending all data to control mode clients as fast as possible, add
  a limit of how much data will be sent to the client and try to use it for
  panes with some degree of fairness.
* Add an active-pane client flag (set with attach-session -f, new-session -f
  or refresh-client -f). This allows a client to have an independent active
  pane for interactive use (the window client pane is still used for many
  things however).
* Add a mark to copy mode, this is set with the set-mark command (bound to X)
  and appears with the entire line shown using copy-mode-mark-style and the
  marked character in reverse. The jump-to-mark command (bound to M-x) swaps
  the mark and the cursor positions.
* Add a -D flag to make the tmux server run in the foreground and not as a
  daemon.
* Do not loop forever in copy mode when search finds an empty match.
* Fix the next-matching-bracket logic when using vi(1) keys.
* Add a customize mode where options may be browsed and changed, includes
  adding a brief description of each option. Bound to C-b C by default.
* Change message log (C-b ~) so there is one for the server rather than one per
  client and it remains after detach, and make it useful by logging every
  command.
* Add M-+ and M-- to tree mode to expand and collapse all.
* Change the existing client flags for control mode to apply for any client,
  use the same mechanism for the read-only flag and add an ignore-size flag.
  refresh-client -F has become -f (-F stays for backwards compatibility) and
  attach-session and switch-client now have -f flags also. A new format
  client_flags lists the flags and is shown by list-clients by default.
  This separates the read-only flag from "ignore size" behaviour (new
  ignore-size) flag - both behaviours are useful in different circumstances.
  attach -r and switchc -r remain and set or toggle both flags together.
* Store and restore cursor position when copy mode is resized.
* Export TERM_PROGRAM and TERM_PROGRAM_VERSION like various other terminals.
* Add formats for after hook command arguments: hook_arguments with all the
  arguments together; hook_argument_0, hook_argument_1 and so on with
  individual arguments; hook_flag_X if flag -X is present; hook_flag_X_0,
  hook_flag_X_1 and so on if -X appears multiple times.
* Try to search the entire history first for up to 200 ms so a search count can
  be shown. If it takes too long, search the visible text only.
* Use VIS_CSTYLE for paste buffers also (show \012 as \n).
* Change default formats for tree mode, client mode and buffer mode to be more
  compact and remove some clutter.
* Add a key (e) in buffer mode to open the buffer in an editor. The buffer
  contents is updated when the editor exits.
* Add -e flag for new-session to set environment variables, like the same flag
  for new-window.
* Improve search match marking in copy mode. Two new options
  copy-mode-match-style and copy-mode-current-match-style to set the style for
  matches and for the current match respectively. Also a change so that if a
  copy key is pressed with no selection, the current match (if any) is copied.
* Sanitize session names like window names instead of forbidding invalid ones.
* Check if the clear terminfo(5) capability starts with CSI and if so then
  assume the terminal is VT100-like, rather than relying on the XT capability.
* Improve command prompt tab completion and add menus both for strings and -t
  and -s (when used without a trailing space). command-prompt has additional
  flags for only completing a window (-W) and a target (-T), allowing C-b ' to
  only show windows and C-b . only targets.
* Change all the style options to string options so they can support formats.
  Change pane-border-active-style to use this to change the border colour when
  in a mode or with synchronize-panes on. This also implies a few minor changes
  to existing behaviour:
  - set-option -a with a style option automatically inserts a comma between the
    old value and appended text.
  - OSC 10 and 11 no longer set the window-style option, instead they store the
    colour internally in the pane data and it is used as the default when the
    option is evaluated.
  - status-fg and -bg now override status-style instead of the option values
    being changed.
* Add extension terminfo(5) capabilities for margins and focus reporting.
* Try $XDG_CONFIG_HOME/tmux/tmux.conf as well as ~/.config/tmux/tmux.conf for
  configuration file (the search paths are in TMUX_CONF in Makefile.am).
* Remove the DSR 1337 iTerm2 extension and replace by the extended device
  attributes sequence (CSI > q) supported by more terminals.
* Add a -s flag to copy-mode to specify a different pane for the source
  content. This means it is possible to view two places in a pane's history at
  the same time in different panes, or view the history while still using the
  pane. Pressing r refreshes the content from the source pane.
* Add an argument to list-commands to show only a single command.
* Change copy mode to make copy of the pane history so it does not need to
  freeze the pane.
* Restore pane_current_path format from portable tmux on OpenBSD.
* Wait until the initial command sequence is done before sending a device
  attributes request and other bits that prompt a reply from the terminal. This
  means that stray relies are not left on the terminal if the command has
  attached and then immediately detached and tmux will not be around to receive
  them.
* Add a -f filter argument to the list commands like choose-tree.
* Move specific hooks for panes to pane options and windows for window options
  rather than all hooks being session options. These hooks are now window
  options:
  window-layout-changed
  window-linked
  window-pane-changed
  window-renamed
  window-unlinked
  And these now pane options:
  pane-died
  pane-exited
  pane-focus-in
  pane-focus-out
  pane-mode-changed
  pane-set-clipboard
  Any existing configurations using these hooks on a session rather than
  globally (that is, set-hook or set-option without -g) may need to be changed.
* Show signal names when a process exits with remain-on-exit on platforms which
  have a way to get them.
* Start menu with top item selected if no mouse and use mode-style for the
  selected item.
* Add a copy-command option and change copy-pipe and friends to pipe to it if
  used without arguments, allows all the default copy key bindings to be
  changed to pipe with one option rather than needing to change each key
  binding individually.
* Tidy up the terminal detection and feature code and add named sets of
  terminal features, each of which are defined in one place and map to a
  builtin set of terminfo(5) capabilities. Features can be specified based on
  TERM with a new terminal-features option or with the -T flag when running
  tmux. tmux will also detect a few common terminals from the DA and DSR
  responses.
  This is intended to make it easier to configure tmux's use of terminfo(5)
  even in the presence of outdated ncurses(3) or terminfo(5) databases or for
  features which do not yet have a terminfo(5) entry. Instead of having to grok
  terminfo(5) capability names and what they should be set to in the
  terminal-overrides option, the user can hopefully just give tmux a feature
  name and let it do the right thing.
  The terminal-overrides option remains both for backwards compatibility and to
  allow tweaks of individual capabilities.
* Support mintty's application escape sequence (means tmux doesn't have to
  delay to wait for Escape, so no need to reduce escape-time when using
  mintty).
* Change so main-pane-width and height can be given as a percentage.
* Support for the iTerm2 synchronized updates feature (allows the terminal to
  avoid unnecessary drawing while output is still in progress).
* Make the mouse_word and mouse_line formats work in copy mode and enable the
  default pane menu in copy mode.
* Add a -T flag to resize-pane to trim lines below the cursor, moving lines out
  of the history.
* Add a way to mark environment variables as "hidden" so they can be used by
  tmux (for example in formats) but are not set in the environment for new
  panes. set-environment and show-environment have a new -h flag and there is a
  new %hidden statement for the configuration file.
* Change default position for display-menu -x and -y to centre rather than top
  left.
* Add support for per-client transient popups, similar to menus but which are
  connected to an external command (like a pane). These are created with new
  command display-popup.
* Change double and triple click bindings so that only one is fired (previously
  double click was fired on the way to triple click). Also add default double
  and triple click bindings to copy the word or line under the cursor and
  change the existing bindings in copy mode to do the same.
* Add a default binding for button 2 to paste.
* Add -d flag to run-shell to delay before running the command and allow it to
  run without a command so it just delays.
* Add C-g to cancel command prompt with vi keys as well as emacs, and q in
  command mode.
* When the server socket is given with -S, create it with umask 177 instead of
  117 (because it may not be in a safe directory like the default directory in
  /tmp).
* Add a copy-mode -H flag to hide the position marker in the top right.
* Add number operators for formats (+, -, *, / and m),
2021-04-17 19:42:01 +00:00
mrg cab9e0888f add support for arm64 lse.S.
arm64 userland much happier now.  /usr/bin/gcc as gcc 10 on arm64
is fine, build is complete, though i did not test xsrc yet.
2021-04-17 10:54:46 +00:00
mrg d44b5d46ab remove double arm64 netbsd target. add t-lse, though we don't
pull this out with mknative currently.
2021-04-17 10:53:18 +00:00
mrg edc6087d66 port the -mnative support in GCC 10 to netbsd. (much simpler than 8->9!) 2021-04-17 10:19:09 +00:00
mrg 2c7f7c1589 switch alpha, ia64, sparc*, riscv*, amd64 and vax to GCC 10 default. 2021-04-17 04:07:16 +00:00
mrg ddd88a608a various updates, thanks to those who provided feedback.
- powerpc ports work
- m68k ports work, x68k has a new caveat
- hppa works
- mips64eb vs UVMHIST has been fix
- i386 reboot problem fixed (cardbus issue, not GCC related)
2021-04-17 01:59:41 +00:00
christos 9777eb9aeb go back to right-aligning the titles for CPU and WCPU. 2021-04-16 13:02:47 +00:00
rin efb1d0a1d1 Restore our local change to remove GNU_STACK program header:
http://cvsweb.netbsd.org/bsdweb.cgi/src/external/gpl3/gcc/dist/gcc/config/rs6000/rs6000.c#rev1.13

This was removed accidentally when merging GCC10 into our tree.

Note that some firmwares, e.g., Explora, refuse to execute ELF
kernel image if this program header is present.

Now, GCC10 becomes just fine for all three powerpc sub-archs, i.e.,
oea, booke, and ibm4xx, as far as I can see. No regressions are
observed for ATF.

OK mrg
2021-04-16 02:33:28 +00:00
rin 3d5cb49cde Fix regression introduced to GCC10, where it wrongly recognizes 32-bit
processors as POWER9 if -misel flag is specified.

rs6000_machine_from_flags() assumes ISEL instructions are supported only
for POWER9 and successors. However, ISEL is also implemented for 32-bit
booke processors.

Since our kernel for booke is compiled with -misel, this regression
completely breaks it.

As a fix, check whether CPU is 64-bit capable or not, before checking
-misel flag.

The problem has been reported as 100108 to upstream:

	https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100108

OK mrg
2021-04-16 02:26:43 +00:00
rin 3467bd47be Fix regression introduced to GCC10, by which inline assembler codes for
403/405 are miscompiled.

Redundant .machine directive introduced by upstream commit
2d94f7dea9c73ef3c116a0ddc722724578a860fe:

	https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=2d94f7dea9c73ef3c116a0ddc722724578a860fe

clobbers CPU flags passed to assembler. This results in miscompile for
inline assembler codes specific to 403/405 processors, at least.

Therefore, revert this commit locally.

The problem has been reported as 100107 to upstream:

	https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100107

OK mrg
2021-04-16 02:18:04 +00:00
christos 8ffea519f1 avoid second typedef for boolean_t in kernel code originally defined in
<sys/types.h>
2021-04-15 07:00:50 +00:00
christos 2cb1b4dc1d remove extra typedef for vnode_t done in <sys/vnode.h> 2021-04-15 06:59:57 +00:00
mrg 8842784405 document various gcc warnings that occur frequently enough to
inspire the GCC_NO_* series of variables, and explain some
about what the issues may be for each, hopefully providing some
direction on how to fix new warnings in this space.

christos asked me for this last year, and it's finally complete
enough to commit.  :-)
2021-04-15 05:15:04 +00:00
mrg f83306c1b9 feedback from rin@: alpha and m68k work well, powerpc not so much
but fixes are known.

thanks!
2021-04-15 05:12:57 +00:00
mrg 5cf114ea09 i've test-built all platforms. everything except arm64, x68k and sun2
builds.  many of them work as well.  most mips are (minimally) tested.
2021-04-15 01:59:51 +00:00
christos bed36db058 lto-common.c needs the stack protector treatment 2021-04-14 12:20:59 +00:00
mrg a16a1d25de dtrace systrace.c issue fixed by christos (thanks!)
mips issue is related to memset.c miscompiling and does not
appear with -ffreestanding (thanks joerg & simonb.)
2021-04-14 01:19:13 +00:00
mrg b62893b8db note amd64 dtrace issue is only warning for now.
note that i386 has problems in -current.
2021-04-13 22:24:56 +00:00
mrg e43c684a44 with dtrace enabled, there is at least one remaining issue for amd64. 2021-04-13 10:10:25 +00:00
mrg 28c64a7060 ignore a "should be impossible" uninitialised variable error. 2021-04-13 09:28:42 +00:00
mrg 33786a4719 XXX: ignore warning about overlapping buffers for sprintf(). 2021-04-13 09:20:55 +00:00
mrg 3a792618ec sparc and amd64 successfully finished their atf runs. 2021-04-13 08:57:39 +00:00
mrg 968c7bf770 update the status of GCC. summary: mostly looking good.
- all targets build or can be attempted
- arm64 needs __aarch64_swp1_acq in both libgcc and libkern
- earmv4 works, earmv7hf works, all arm32 builds, rest untested
- hppa, most/all m68k, alpha, and most ppc builds, none tested
- ia64 kernel runs as well as before, userland fails to build
- i386 runs, seems mostly fine except lib/libc/sys/t_ptrace_wait
  resume test is hung, and cpu-spinning in a zombie
- sun2 grew again, too large but builds besides RAMDISK not fitting
- mips seems problematic.  some kernels fail some work, userland
  has problems with both static and dynamic n32 and n64 programs
- sh3el seems ok in gxemul/landisk, sh3eb not tested
- vax seems OK in simh (same c++ exception issues)

all ports kernels have been tested to build (though perhaps with
some uncommited changes only needed for some, while most changes
are commited, about 15 are not but many ports build without them.)
2021-04-13 08:22:40 +00:00
mrg ade90e4afe make this match the builtin prototypes. 2021-04-13 08:06:11 +00:00
mrg 0972d30524 apply -fcommon here as well. 2021-04-13 07:53:59 +00:00
mrg 1effc6f09c more -O0 for vax 2021-04-13 06:30:36 +00:00
mrg 97b36aa771 more GCC 10 fixes.
mDNSResponder: another wrong return local address

dhcp: ignore a seemingly impossible stringop overflow

hpacel: avoid maybe uninitialised error that is wrong.

rsh: avoid impossible malloc(0)

udf: cast pointers through (uintptr_t) to fool invalid boundary checks
2021-04-13 06:25:48 +00:00
mrg f5c1005436 apply some -Wno- to ignore several new warnings with GCC 10.
ntp: ignore truncation beyond api sizes, and ignore wrongly
guessed underflow

tmux: ignore maybe uninitialised warning for impossible case

libbfd: signed/unsigned variables assigned in the same statement

dri/gallium: -Wno-builtin-declaration-mismatch for u_atomic.c as
it implements backend functions with different in-C-machine but
same-in-real-machine types

libXfont/libXfont2: signed/unsigned variables assigned in the same
statement

i915drm: ignore impossible maybe uninitialised warnings

sysinst: ignore an invalid string truncation issue
2021-04-13 04:58:59 +00:00
mrg 0559215e96 use -fcommon here. 2021-04-13 04:52:00 +00:00
mrg 72ab974e26 use -fcommon here too. 2021-04-13 04:14:46 +00:00
mrg d212f498b1 use -fcommon. 2021-04-13 01:15:57 +00:00
mrg 72ccf7c95b apply -fcommon to sources that still rely upon it. 2021-04-13 01:11:05 +00:00
mrg b08b556d46 mknative-gcc for GCC 10 and earm ports (now including earmv7hf) after
the arm/netbsd-elf.h fix.  shark appears to work at least now.
2021-04-12 09:51:49 +00:00
mrg f76800c4b6 arm/netbsd-elf.h is necessary for eabi targets. 2021-04-12 09:03:39 +00:00
mrg 250ad67d8e properly size a buffer to include the trailing nul. 2021-04-12 08:55:22 +00:00
mrg 8027934b7b avoid common symbols. 2021-04-12 08:54:11 +00:00
mrg e6db336e16 updates:
- arm64 doesn't build (missing __aarch64_swp1_acq in kernels)
- mips cpu targets all build (maybe not all ports)
- powerpc builds (maybe not all ports)
2021-04-12 08:31:30 +00:00
mrg 60ad6a583b mknative-gcc for GCC 10.3 and powerpc ports. 2021-04-12 08:29:18 +00:00