realpath: Improve manual page
* Try to make the RETURN VALUES section flow better.
* Add basename(3), dirname(3), free(3) to the SEE ALSO section.
* Drop the CAVEATS section, which was obsolete the moment realpath(3)
was added to the Single Unix Specification in 1994.
MFC after: 1 week
Sponsored by: Klara, Inc.
Reviewed by: kevans
Differential Revision: https://reviews.freebsd.org/D55928
(cherry picked from commit 1aecb32021ce46d812db36b9037cdc6f423575f9)
realpath: Improve prev_len logic
* Save prev_len after having checked for and appended a trailing slash,
not before. This requires us to back up if we end up returning a
partial result, but previously we would sometimes return a partial
result with a trailing slash and sometimes without.
* Replace strlcat() with a faster strlcpy() since we know exactly how
far into the buffer we are.
MFC after: 1 week
Sponsored by: Klara, Inc.
Reviewed by: kevans
Differential Revision: https://reviews.freebsd.org/D55914
(cherry picked from commit 99d295e471bc362a7927047c89472e1ee2d0da6b)
m4: Stop abbreviating builtin names
* Stop abbreviating macro names half-randomly to 8 chars, this is no
longer 1990.
* Likewise for function names (in particular use doindex for a function
that is notably different from the classic index function).
* Rename a few things for more fidelity: eval is the builtin name, not
expr and your maketemp/mkstemp conform to mkstemp semantics for better
security.
* Rewrap a few comments that were ludicrously short.
No functional changes except improved accuracy of some error messages.
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D55793
[lld][WebAssembly] Propagate +atomics for ThinLTO when using --shared-memory (#188381)
When compiling WebAssembly with ThinLTO, functions are partitioned into
isolated `.bc` modules and dispatched to individual LTO backend threads.
During code generation, the `CoalesceFeaturesAndStripAtomics` pass
iterates over the module to gather the union of target features (like
`+atomics`) attached to defined functions. In particular when not using
threads, it lowers away atomics and TLS variables to their
single-threaded equivalents.
However, if a partitioned module only contains globally defined TLS
variables (e.g. there are no functions, or all functions were fully
inlined or stripped by dropDeadSymbols before ThinLTO optimization), the
module becomes completely devoid of function definitions. The coalescing
pass then falls back to fetching features from the `TargetMachine`.
Because in LTO the `TargetMachine` defaults to a generic target without
atomics enabled, the TLS is lowered away and the `wasm-feature-atomics`
flag is omitted from the resulting ThinLTO object partition, causing
`wasm-ld` to immediately reject it.
[8 lines not shown]
[clang-tidy] Add missing #include insertion in macros for modernize-use-std-format (#188247)
Added missing ``#include`` insertion when the format function call
appears as an argument to a macro.
Part of #175183
---------
Co-authored-by: Victor Chernyakin <chernyakin.victor.j at outlook.com>
Merge tag 'kbuild-fixes-7.0-3' of git://git.kernel.org/pub/scm/linux/kernel/git/kbuild/linux
Pull Kbuild fixes from Nathan Chancellor:
"This mostly addresses some issues with the awk conversion in
scripts/kconfig/merge_config.sh.
- Fix typo to ensure .builtin-dtbs.S is properly cleaned
- Fix '==' bashism in scripts/kconfig/merge_config.sh
- Fix awk error in scripts/kconfig/merge_config.sh when base
configuration is empty
- Fix inconsistent indentation in scripts/kconfig/merge_config.sh"
* tag 'kbuild-fixes-7.0-3' of git://git.kernel.org/pub/scm/linux/kernel/git/kbuild/linux:
scripts: kconfig: merge_config.sh: fix indentation
scripts: kconfig: merge_config.sh: pass output file as awk variable
scripts: kconfig: merge_config.sh: fix unexpected operator warning
kbuild: Delete .builtin-dtbs.S when running make clean
libfyaml: disable optimizations on i386, fixes build for NetBSD.
This includes code that seems to be written for x86-64.
Switching to the "portable" version is a quick working way to avoid that
code.
Note that the meaning of "portable" here means "compiling with some Windows
compiler that doesn't like the syntax". This package does appear to do
run-time detection of features before it is used, and most users wouldn't
want to use the portable flag.
[SandboxIR][Tracker] Test UncondBrInst CondBrInst setters (#187549)
This checks the `setCondition()` and `setSuccessor()` setters introduced
in #187196.
[lldb] use the Py_REFCNT() macro instead of directly accessing member (#188161)
[PyObject members are not to be accessed
directly](https://docs.python.org/3/c-api/structures.html#c.PyObject),
but rather through macros, in this case `Py_REFCNT()`.
In most, ie Global Interpreter Lock-enabled, CPython cases,
`Py_REFCNT()` expands to accessing `ob_refcnt` anyway. However, in a
free-threaded CPython, combined with disabling the limited API (since it
requires the GIL for now), the direct member does not exist, causing the
build to fail. The macro expands to the correct access method in the
free-threaded configuration.