summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Schmaus <flow@gentoo.org>2022-04-17 23:34:02 +0200
committerFlorian Schmaus <flow@gentoo.org>2022-04-17 23:51:58 +0200
commit22b2b448d0abacef7fabcd77a0dde9d6a15f1339 (patch)
treec6d68b5abaaf546921d12219abe512133af2cedb /app-emulation/xen
parentsys-kernel/git-sources: add 5.18_rc3 (diff)
downloadgentoo-22b2b448d0abacef7fabcd77a0dde9d6a15f1339.tar.gz
gentoo-22b2b448d0abacef7fabcd77a0dde9d6a15f1339.tar.bz2
gentoo-22b2b448d0abacef7fabcd77a0dde9d6a15f1339.zip
app-emulation/xen: fix debug use flag
Upstream changed to a kconfig build system for the Xen hypervisor. Even though still documented, passing 'debug=y' as make argument does not enable a debug build. We now create a Gentoo specific kconfig that is merged into upstream's default configuration. This also allows to drop the flask patch. Bug: https://bugs.gentoo.org/838730 Signed-off-by: Florian Schmaus <flow@gentoo.org>
Diffstat (limited to 'app-emulation/xen')
-rw-r--r--app-emulation/xen/xen-4.16.0-r5.ebuild45
1 files changed, 33 insertions, 12 deletions
diff --git a/app-emulation/xen/xen-4.16.0-r5.ebuild b/app-emulation/xen/xen-4.16.0-r5.ebuild
index eb0fa574bc2e..5746fe98d576 100644
--- a/app-emulation/xen/xen-4.16.0-r5.ebuild
+++ b/app-emulation/xen/xen-4.16.0-r5.ebuild
@@ -100,9 +100,6 @@ src_prepare() {
eapply "${FILESDIR}"/${PN}-4.16-no-symlink.patch
fi
- # Enable XSM-FLASK
- use flask && eapply "${FILESDIR}"/${PN}-4.15-flask.patch
-
# Workaround new gcc-11 options
sed -e '/^CFLAGS/s/-Werror//g' -i xen/Makefile || die
@@ -117,11 +114,28 @@ src_prepare() {
default
}
-XEN_OPTS=()
-
src_configure() {
- use arm && XEN_OPTS+=( CONFIG_EARLY_PRINTK=sun7i )
- use debug && XEN_OPTS+=( debug=y )
+ cd xen || die
+ emake defconfig
+
+ touch gentoo-config || die
+ if use arm; then
+ echo "CONFIG_EARLY_PRINTK=sun7i" > gentoo-config || die
+ fi
+ if use debug; then
+ echo "CONFIG_DEBUG=y" > gentoo-config || die
+ fi
+ if use flask; then
+ echo "CONFIG_XSM=y" > gentoo-config || die
+ fi
+
+ local merge_cmd=(
+ ./tools/kconfig/merge_config.sh
+ -m -r
+ .config gentoo-config
+ )
+ einfo "${merge_cmd[*]}"
+ "${merge_cmd[@]}" || die "Merging Gentoo config failed"
# remove flags
unset CFLAGS
@@ -133,19 +147,26 @@ src_configure() {
src_compile() {
# Send raw LDFLAGS so that --as-needed works
- emake V=1 CC="$(tc-getCC)" LDFLAGS="$(raw-ldflags)" LD="$(tc-getLD)" -C xen ${XEN_OPTS[@]}
+ emake \
+ V=1 \
+ CC="$(tc-getCC)" \
+ LDFLAGS="$(raw-ldflags)" \
+ LD="$(tc-getLD)" \
+ -C xen
}
src_install() {
- local myopt
- use debug && myopt="${myopt} debug=y"
-
# The 'make install' doesn't 'mkdir -p' the subdirs
if use efi; then
mkdir -p "${D}"${EFI_MOUNTPOINT}/efi/${EFI_VENDOR} || die
fi
- emake LDFLAGS="$(raw-ldflags)" LD="$(tc-getLD)" DESTDIR="${D}" -C xen ${myopt} install
+ emake \
+ LDFLAGS="$(raw-ldflags)" \
+ LD="$(tc-getLD)" \
+ DESTDIR="${D}" \
+ -C xen \
+ install
# make install likes to throw in some extra EFI bits if it built
use efi || rm -rf "${D}/usr/$(get_libdir)/efi"