Related: be9e1474db
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7060>
61 lines
2.1 KiB
Diff
61 lines
2.1 KiB
Diff
From 9047f8b2a7374d95e8261f15941d07b6e4def3fe Mon Sep 17 00:00:00 2001
|
|
From: Clayton Craft <clayton@craftyguy.net>
|
|
Date: Tue, 7 Jan 2025 20:19:51 -0800
|
|
Subject: [PATCH] (pmOS cross/systemd-boot-x86 specific): meson: minimal
|
|
configure for building systemd-boot
|
|
|
|
Notes:
|
|
- toggling all ENABLED_* things off saves a ton of configure
|
|
time
|
|
- Removing capability.h, so that cross compiling doesn't fail
|
|
because that header isn't installed
|
|
- Set libcap to required=false, they aren't needed for building the
|
|
bootloader, and they complicate cross compilation
|
|
|
|
IMPORTANT: some of these dependencies don't exist for the target arch
|
|
(x86) and since they aren't actually required by sd-boot it's easier
|
|
to just disable/remove them from meson.build!!!
|
|
---
|
|
meson.build | 12 ++++++++++--
|
|
1 file changed, 10 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/meson.build b/meson.build
|
|
index 238b935372..8449eb8ecd 100644
|
|
--- a/meson.build
|
|
+++ b/meson.build
|
|
@@ -688,7 +688,6 @@ conf.set('GPERF_LEN_TYPE', gperf_len_type,
|
|
|
|
foreach header : [
|
|
'crypt.h',
|
|
- 'sys/capability.h',
|
|
]
|
|
|
|
if not cc.has_header(header)
|
|
@@ -997,7 +996,7 @@ threads = dependency('threads')
|
|
librt = cc.find_library('rt')
|
|
libm = cc.find_library('m')
|
|
libdl = cc.find_library('dl')
|
|
-libcap = dependency('libcap')
|
|
+libcap = dependency('libcap', required : false)
|
|
|
|
# On some architectures, libatomic is required. But on some installations,
|
|
# it is found, but actual linking fails. So let's try to use it opportunistically.
|
|
@@ -1886,6 +1885,15 @@ pefile = pymod.find_installation('python3', required: false, modules : ['pefile'
|
|
want_ukify = get_option('ukify').require(python_39 and (want_tests != 'true' or pefile.found()), error_message : 'Python >= 3.9 and pefile required').allowed()
|
|
conf.set10('ENABLE_UKIFY', want_ukify)
|
|
|
|
+foreach key : conf.keys()
|
|
+ if key.startswith('ENABLE_')
|
|
+ conf.set10(key, false)
|
|
+ endif
|
|
+endforeach
|
|
+
|
|
+conf.set10('ENABLE_EFI', true)
|
|
+conf.set10('ENABLE_BOOTLOADER', true)
|
|
+
|
|
#####################################################################
|
|
|
|
check_efi_alignment_py = files('tools/check-efi-alignment.py')
|
|
--
|
|
2.51.0
|
|
|