diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2024-07-05 00:02:53 +0300 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2024-07-05 00:03:59 +0300 |
| commit | 98f21e694a6b0964d6d08196cb6bfbc1c2ae2ff4 (patch) | |
| tree | cbdba41381dc6e7a571001928eeb84996020db13 /include | |
| parent | a6557ed0233e2193cef0ab5b4cea7f1d7f19ad5d (diff) | |
| download | kmi-98f21e694a6b0964d6d08196cb6bfbc1c2ae2ff4.tar.gz kmi-98f21e694a6b0964d6d08196cb6bfbc1c2ae2ff4.zip | |
fix some small build issues
+ Compiling for size emits memcpy() calls after they've already been
removed by LTO, so add __used attribute to counteract this.
Newer versions of GCC seem to prefer `-flto=auto` to just `-flto`, so
use that.
printf format %d -> %ld
Diffstat (limited to 'include')
| -rw-r--r-- | include/kmi/attrs.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/kmi/attrs.h b/include/kmi/attrs.h index 5c15201..f789310 100644 --- a/include/kmi/attrs.h +++ b/include/kmi/attrs.h @@ -59,6 +59,10 @@ /** Weak linkage. */ #define __weak __attribute__((weak)) +/** Tell optimizer something is used, even though it might not seem like it. + * Special functions like memcpy() may need it. */ +#define __used __attribute__((used)) + /** Main entry point of kernel proper. */ #define __main __section(".kernel.start") __noinline |
