[X86] splitVectorOp - add BUILD_VECTOR handling (#233077)
In case a call to splitVectorOp has already constant folded into a BUILD_VECTOR
Fixes #233063
games/xray-16: Fix SIGILL in renderer caused by invalid sort comparator
The game dies with SIGILL (ud2, "Privileged opcode") while rendering.
PR: 299369
Sponsored by: UNIS Labs (vvd, commit patch)
MFH: 2026Q4
(cherry picked from commit 38a6cf184c6c72499450168d67eb8502807f70df)
games/xray-16: Fix build against math.h declaring rsqrt() in recent 16
FreeBSD's <math.h> now declares double rsqrt(double), which clashes with
the engine's own rsqrt() helper:
src/xrCore/_vector3d.h:359:8: error: exception specification in
declaration does not match previous declaration
359 | double rsqrt(double v) noexcept;
/usr/include/math.h:556:9: note: previous declaration is here
556 | double rsqrt(double);
Rename the engine helper to xr_rsqrt() in its declaration, its definition
and its four call sites so it no longer collides with the libm symbol.
PR: 299297
Sponsored by: UNIS Labs (vvd, commit patch)
(cherry picked from commit f8f8aa77d7a9d324b62f440940d7e4af374124b4)
ifconfig(8): Fix false -Wuse-after-free warnings in ifwg.c
Tweak the code to fix the false -Wuse-after-free warnings in
wg_data_grow() from GCC 12.5:
```
/usr/src/sbin/ifconfig/ifwg.c: In function 'wg_data_grow':
/usr/src/sbin/ifconfig/ifwg.c:79:20: warning: pointer may be used after 'realloc' [-Wuse-after-free]
79 | aip_offset = (char *)wg_aip - (char *)wg_interface;
| ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/src/sbin/ifconfig/ifwg.c:82:33: note: call to 'realloc' here
82 | wg_data.wgd_interface = realloc(wg_interface, wg_data.wgd_size);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/src/sbin/ifconfig/ifwg.c:78:21: warning: pointer may be used after 'realloc' [-Wuse-after-free]
78 | peer_offset = (char *)wg_peer - (char *)wg_interface;
| ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/src/sbin/ifconfig/ifwg.c:82:33: note: call to 'realloc' here
82 | wg_data.wgd_interface = realloc(wg_interface, wg_data.wgd_size);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[3 lines not shown]
csh(1): Silence -Wuse-after-free warnings from GCC 12.5
GCC 12.5 generates the following -Wuse-after-free warnings, which are
all false positives, so silence them for this vendor source. I'd like
to submit the code fixes to upstream and then do a vendor update.
```
/usr/src/bin/csh/csh/../../../contrib/tcsh-6/sh.func.c: In function 'iconv_catgets':
/usr/src/bin/csh/csh/../../../contrib/tcsh-6/sh.func.c:2600:34: warning: pointer may be used after 'realloc' [-Wuse-after-free]
2600 | dest = p + (dest - buf);
| ~~~~~~^~~~~~
In file included from /usr/src/bin/csh/csh/../../../contrib/tcsh-6/sh.func.c:32:
/usr/src/bin/csh/csh/../../../contrib/tcsh-6/sh.h:499:25: note: call to 'realloc' here
499 | # define xrealloc(p, i) realloc(p, i)
| ^~~~~~~~~~~~~
/usr/src/bin/csh/csh/../../../contrib/tcsh-6/sh.func.c:2597:26: note: in expansion of macro 'xrealloc'
2597 | if ((p = xrealloc(buf, buf_size * 2)) == NULL)
| ^~~~~~~~
/usr/src/bin/csh/csh/../../../contrib/tcsh-6/sh.proc.c: In function 'morecommand':
[22 lines not shown]
contrib/gcc-12: Silence -Wmaybe-uninitialized warning
GCC 12.5 would generate the following -Wmaybe-uninitialized warning for
expmed.cc, which defines the #pragma to force this diagnostic to be a
warning, so the GCC's own bootstrap that uses -Werror could succeed.
However, this #pragma makes this warning can't be silenced by a
-Wno-maybe-uninitialized option on the command line. So just modify the
source file to ignore it.
```
/usr/src/gnu/usr.bin/cc120/libbackend/../../../../contrib/gcc-12/gcc/expmed.cc: In function 'rtx_def* extract_bit_field_1(rtx, poly_uint64, poly_uint64, int, rtx, machine_mode, machine_mode, bool, bool, rtx_def**)':
/usr/src/gnu/usr.bin/cc120/libbackend/../../../../contrib/gcc-12/gcc/expmed.cc:1832:45: warning: '*(unsigned int*)((char*)&imode + offsetof(scalar_int_mode, scalar_int_mode::m_mode))' may be used uninitialized [-Wmaybe-uninitialized]
1832 | rtx sub = extract_bit_field_as_subreg (mode1, op0, imode,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
1833 | bitsize, bitnum);
| ~~~~~~~~~~~~~~~~
/usr/src/gnu/usr.bin/cc120/libbackend/../../../../contrib/gcc-12/gcc/expmed.cc:1792:19: note: '*(unsigned int*)((char*)&imode + offsetof(scalar_int_mode, scalar_int_mode::m_mode))' was declared here
1792 | scalar_int_mode imode;
| ^~~~~
[6 lines not shown]
gnu/cc80: Correct CFLAGS to fix mkdep warnings
These programs require to use a C++ compiler to compile their '.c'
sources, so they used hacks to do this, one of which is overriding
'MKDEPCC=${CXX}'. However, the CFLAGS wasn't overridden, so calling
mkdep(1) programs would give the warnings:
```
cc1plus: warning: command-line option '-std=gnu11' is valid for C/ObjC but not for C++
```
Fix it by additionally overriding CC and CFLAGS, similar to the
practice used in 'cc80/cc_tools/libcpp/Makefile'. One bonus is that we
can also remove the rule overriding.
games/xray-16: Fix SIGILL in renderer caused by invalid sort comparator
The game dies with SIGILL (ud2, "Privileged opcode") while rendering.
PR: 299369
Sponsored by: UNIS Labs (vvd, commit patch)
MFH: 2026Q4