<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/tools/include/nolibc/compiler.h, branch v7.1</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v7.1</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v7.1'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2026-04-09T21:25:40+00:00</updated>
<entry>
<title>tools/nolibc: support UBSAN on gcc</title>
<updated>2026-04-09T21:25:40+00:00</updated>
<author>
<name>Thomas Weißschuh</name>
<email>linux@weissschuh.net</email>
</author>
<published>2026-04-08T21:03:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3495279d05d62b07d7594c75d4380f51d04410dd'/>
<id>urn:sha1:3495279d05d62b07d7594c75d4380f51d04410dd</id>
<content type='text'>
The UBSAN implementation in gcc requires a slightly different function
attribute to skip instrumentation.

Extend __nolibc_no_sanitize_undefined to also handle gcc.

Signed-off-by: Thomas Weißschuh &lt;linux@weissschuh.net&gt;
Link: https://patch.msgid.link/20260408-nolibc-gcc-15-v1-2-330d0c40f894@weissschuh.net
</content>
</entry>
<entry>
<title>tools/nolibc: create __nolibc_no_sanitize_ubsan</title>
<updated>2026-04-09T21:25:35+00:00</updated>
<author>
<name>Thomas Weißschuh</name>
<email>linux@weissschuh.net</email>
</author>
<published>2026-04-08T21:03:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=08ab9580726edcc12019d2097b56b88de1142ca7'/>
<id>urn:sha1:08ab9580726edcc12019d2097b56b88de1142ca7</id>
<content type='text'>
The logic to disable UBSAN will become a bit more complicated.
Move it out into compiler.h, so crt.h stays readable.

Signed-off-by: Thomas Weißschuh &lt;linux@weissschuh.net&gt;
Link: https://patch.msgid.link/20260408-nolibc-gcc-15-v1-1-330d0c40f894@weissschuh.net
</content>
</entry>
<entry>
<title>tools/nolibc: avoid -Wundef warning for __STDC_VERSION__</title>
<updated>2026-03-22T10:03:58+00:00</updated>
<author>
<name>Thomas Weißschuh</name>
<email>linux@weissschuh.net</email>
</author>
<published>2026-03-18T16:12:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3eb97c4cbd4d874e7e327ec512f6169934e12b8a'/>
<id>urn:sha1:3eb97c4cbd4d874e7e327ec512f6169934e12b8a</id>
<content type='text'>
With -std=c89 the macro __STDC_VERSION__ is not defined.
While undefined identifiers in '#if' directives are assumed to be '0',
with -Wundef a warning is emitted.

Avoid the warning by explicitly falling back to '0' if __STDC_VERSION__
is not provided by the preprocessor.

Fixes: 37219aa5b123 ("tools/nolibc: add __nolibc_static_assert()")
Signed-off-by: Thomas Weißschuh &lt;linux@weissschuh.net&gt;
Acked-by: Willy Tarreau &lt;w@1wt.eu&gt;
Link: https://patch.msgid.link/20260318-nolibc-wundef-v1-1-fcb7f9ac7298@weissschuh.net
</content>
</entry>
<entry>
<title>tools/nolibc: Add _NOLIBC_OPTIMIZER_HIDE_VAR() to compiler.h</title>
<updated>2026-03-20T16:46:06+00:00</updated>
<author>
<name>David Laight</name>
<email>david.laight.linux@gmail.com</email>
</author>
<published>2026-03-08T11:37:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6702425cd50ebb9a71d6b441df4b0df4f58d160a'/>
<id>urn:sha1:6702425cd50ebb9a71d6b441df4b0df4f58d160a</id>
<content type='text'>
Needed to stop compiler 'optimisations' bloating code.
Equivalent to the definition in include/linux/compiler.h

Signed-off-by: David Laight &lt;david.laight.linux@gmail.com&gt;
Acked-by: Willy Tarreau &lt;w@1wt.eu&gt;
Link: https://patch.msgid.link/20260308113742.12649-2-david.laight.linux@gmail.com
Signed-off-by: Thomas Weißschuh &lt;linux@weissschuh.net&gt;
</content>
</entry>
<entry>
<title>tools/nolibc: add __nolibc_static_assert()</title>
<updated>2026-01-06T11:08:08+00:00</updated>
<author>
<name>Thomas Weißschuh</name>
<email>linux@weissschuh.net</email>
</author>
<published>2025-12-20T13:55:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=37219aa5b12326cd60f4586779c687f3394e80f5'/>
<id>urn:sha1:37219aa5b12326cd60f4586779c687f3394e80f5</id>
<content type='text'>
Add a wrapper for _Static_assert() to use within nolibc.
While _Static_assert() itself was only standardized in C11,
in GCC and clang dialects it is also available in older standards.

Link: https://lore.kernel.org/lkml/20251203192330.GA12995@1wt.eu/
Signed-off-by: Thomas Weißschuh &lt;linux@weissschuh.net&gt;
Acked-by: Willy Tarreau &lt;w@1wt.eu&gt;
Reviewed-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Link: https://patch.msgid.link/20251220-nolibc-uapi-types-v3-13-c662992f75d7@weissschuh.net
</content>
</entry>
<entry>
<title>tools/nolibc: add compiler version detection macros</title>
<updated>2026-01-06T11:08:07+00:00</updated>
<author>
<name>Thomas Weißschuh</name>
<email>linux@weissschuh.net</email>
</author>
<published>2025-12-20T13:55:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=dd6659efe0529e7177e9270a0fc044a0b17deb8a'/>
<id>urn:sha1:dd6659efe0529e7177e9270a0fc044a0b17deb8a</id>
<content type='text'>
Some upcoming logic needs to depend on the version of GCC or clang.

Add some helper macros to keep the conditionals readable.

Signed-off-by: Thomas Weißschuh &lt;linux@weissschuh.net&gt;
Acked-by: Willy Tarreau &lt;w@1wt.eu&gt;
Reviewed-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Link: https://patch.msgid.link/20251220-nolibc-uapi-types-v3-12-c662992f75d7@weissschuh.net
</content>
</entry>
<entry>
<title>tools/nolibc: use __fallthrough__ rather than fallthrough</title>
<updated>2025-10-29T15:29:15+00:00</updated>
<author>
<name>Benjamin Berg</name>
<email>benjamin.berg@intel.com</email>
</author>
<published>2025-09-24T14:20:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2cb6cc8361da803ede847ed1ca8afeb3af6df6ff'/>
<id>urn:sha1:2cb6cc8361da803ede847ed1ca8afeb3af6df6ff</id>
<content type='text'>
Use the version of the attribute with underscores to avoid issues if
fallthrough has been defined by another header file already.

Signed-off-by: Benjamin Berg &lt;benjamin.berg@intel.com&gt;
Signed-off-by: Thomas Weißschuh &lt;linux@weissschuh.net&gt;
</content>
</entry>
<entry>
<title>tools/nolibc: add __nolibc_aligned() and __nolibc_aligned_as()</title>
<updated>2025-04-19T12:17:52+00:00</updated>
<author>
<name>Thomas Weißschuh</name>
<email>linux@weissschuh.net</email>
</author>
<published>2025-04-19T10:46:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f4152715dcd5c580dca6ea628ec03785bba44b9a'/>
<id>urn:sha1:f4152715dcd5c580dca6ea628ec03785bba44b9a</id>
<content type='text'>
Provide a convenience macro around __attribute__((aligned)).

Signed-off-by: Thomas Weißschuh &lt;linux@weissschuh.net&gt;
Acked-by: Willy Tarreau &lt;w@1wt.eu&gt;
Link: https://lore.kernel.org/r/20250419-nolibc-ubsan-v2-2-060b8a016917@weissschuh.net
</content>
</entry>
<entry>
<title>tools/nolibc: add __nolibc_has_feature()</title>
<updated>2025-04-19T12:17:46+00:00</updated>
<author>
<name>Thomas Weißschuh</name>
<email>linux@weissschuh.net</email>
</author>
<published>2025-04-19T10:46:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8399f14666688be8d84cb3ccbec6ee790c020b36'/>
<id>urn:sha1:8399f14666688be8d84cb3ccbec6ee790c020b36</id>
<content type='text'>
Certain compiler features are signaled via the __has_feature()
preprocessor builtin.

Add a nolibc wrapper for it, similar to __nolibc_has_attribute().

Signed-off-by: Thomas Weißschuh &lt;linux@weissschuh.net&gt;
Acked-by: Willy Tarreau &lt;w@1wt.eu&gt;
Link: https://lore.kernel.org/r/20250419-nolibc-ubsan-v2-1-060b8a016917@weissschuh.net
</content>
</entry>
<entry>
<title>tools/nolibc: compiler: add macro __nolibc_fallthrough</title>
<updated>2024-10-07T19:56:18+00:00</updated>
<author>
<name>Thomas Weißschuh</name>
<email>linux@weissschuh.net</email>
</author>
<published>2024-09-30T05:35:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=079ec6a3cf529d86c2895059eb8be1b36cc9fd72'/>
<id>urn:sha1:079ec6a3cf529d86c2895059eb8be1b36cc9fd72</id>
<content type='text'>
Recent version of GCC and clang gained -Wimplicit-fallthrough,
warning about implicit fall-through between switch labels.
As nolibc does not control the compilation flags, this can trigger
warnings for when built by the user.
Make use of the "fallthrough" attribute to explicitly annotate the
expected fall-throughs and silence the warning.

Link: https://lore.kernel.org/r/20240930-nolibc-fallthrough-v2-1-2e8d10fe3430@weissschuh.net
Signed-off-by: Thomas Weißschuh &lt;linux@weissschuh.net&gt;
</content>
</entry>
</feed>
