summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys-boot/lilo/files/lilo-24.x-check-for-__GLIBC__.patch18
-rw-r--r--sys-boot/lilo/lilo-24.2.ebuild7
2 files changed, 24 insertions, 1 deletions
diff --git a/sys-boot/lilo/files/lilo-24.x-check-for-__GLIBC__.patch b/sys-boot/lilo/files/lilo-24.x-check-for-__GLIBC__.patch
new file mode 100644
index 000000000000..be3443629cfa
--- /dev/null
+++ b/sys-boot/lilo/files/lilo-24.x-check-for-__GLIBC__.patch
@@ -0,0 +1,18 @@
+diff -Naurp lilo-24.2.orig/src/lilo.c lilo-24.2/src/lilo.c
+--- lilo-24.2.orig/src/lilo.c 2021-06-06 15:53:52.389730145 -0400
++++ lilo-24.2/src/lilo.c 2021-06-06 15:53:28.309159571 -0400
+@@ -182,7 +182,14 @@ extern int has_partitions_beta(dev_t dev
+ printf("Without");
+ #endif
+ printf(" device-mapper\n");
++#ifdef __GLIBC__
++ /*
++ * __GLIBC__ is defined in features.h, which should be pulled
++ * in by stdio.h, but this is not guaranteed nor apparently
++ * documented anywhere.
++ */
+ printf("\nglibc version %d.%d\n", __GLIBC__, __GLIBC_MINOR__);
++#endif
+ printf("Kernel Headers included from %d.%d.%d\n",
+ LINUX_VERSION_CODE>>16,
+ LINUX_VERSION_CODE>>8 & 255,
diff --git a/sys-boot/lilo/lilo-24.2.ebuild b/sys-boot/lilo/lilo-24.2.ebuild
index 5b39c9c32f53..ae703abe60db 100644
--- a/sys-boot/lilo/lilo-24.2.ebuild
+++ b/sys-boot/lilo/lilo-24.2.ebuild
@@ -3,7 +3,7 @@
EAPI="7"
-inherit eutils flag-o-matic toolchain-funcs
+inherit flag-o-matic toolchain-funcs
DOLILO_V="0.6"
IUSE="static minimal pxeserial device-mapper"
@@ -24,6 +24,10 @@ KEYWORDS="-* amd64 x86"
DEPEND=">=sys-devel/bin86-0.15.5"
RDEPEND="device-mapper? ( >=sys-fs/lvm2-2.02.45 )"
+# Bootloaders should not be using arbitrary CFLAGS without good reason. A bootloader
+# is typically only executed once to boot the system, and it should work the first time.
+QA_FLAGS_IGNORED="/sbin/lilo"
+
src_prepare() {
default
@@ -34,6 +38,7 @@ src_prepare() {
eapply "${FILESDIR}/${PN}-24.2-add-nvme-support.patch"
eapply "${FILESDIR}/${PN}-24.x-fix-gcc-10.patch"
+ eapply "${FILESDIR}/${PN}-24.x-check-for-__GLIBC__.patch"
# Do not strip and have parallel make
# FIXME: images/Makefile does weird stuff