Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion packages/kmod/0001-meson-add-support-for-static-builds.patch
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ From: Piyush Jena <jepiyush@amazon.com>
Date: Tue, 8 Jul 2025 22:11:12 +0000
Subject: [PATCH] meson: add support for static builds

Signed-off-by: Piyush Jena <jepiyush@amazon.com>
[update to get PIE for static builds]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't need the double sign-off. Also, can you explain why we couldn't do this before and now we can? Is this just a new finding?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I worked on it last time the objective was to get meson to build the exact same executables as automake (which was used before). I remember intentionally skipping PIE because "that would make it different". I found out about the existing issue recently.
I can't really comment on why it was harder to do earlier. The kmod contributors added PIE only after moving to meson. (kmod-project/kmod@6acdf06). I would assume meson just makes the process easier.

Signed-off-by: Piyush Jena <jepiyush@amazon.com>
---
meson.build | 6 ++++++
Expand All @@ -18,7 +20,7 @@ index a0cf675..4b16d6a 100644

+kmod_link_args = []
+if get_option('default_library') == 'static'
+ kmod_link_args += ['-static']
+ kmod_link_args += ['-static-pie']
+endif
+
kmod = executable(
Expand Down
Loading