summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Schmaus <flow@gentoo.org>2022-04-21 19:49:38 +0200
committerFlorian Schmaus <flow@gentoo.org>2022-04-21 21:21:06 +0200
commit9eec5a81b8a56ee6bcbfdf14b84713c4c6d571e8 (patch)
treee64b548c145042c89cb4097e0b3773903236b198 /app-emulation
parentdev-python/pyqtgraph: Stabilize 0.12.4 ALLARCHES, #839450 (diff)
downloadgentoo-9eec5a81b8a56ee6bcbfdf14b84713c4c6d571e8.tar.gz
gentoo-9eec5a81b8a56ee6bcbfdf14b84713c4c6d571e8.tar.bz2
gentoo-9eec5a81b8a56ee6bcbfdf14b84713c4c6d571e8.zip
app-emulation/xen: provide clang=(y|n), HOSTCC and HOSTCXX to make
Provide clang=(y|n) to the make invocation as it tells Xen's build system whether or not clang is used. Also set HOSTCC and HOSTCXX. I believe this to probably fix calling cc directly (bug #839888). Also set LDFLAGS correctly. Previously LDFLAGS would be unset, which made raw-ldflags return the empty string, so # Send raw LDFLAGS so that --as-needed works LDFLAGS="$(raw-ldflags)" set LDFLAGS to the empty string. Finally, no longer unset ASFLAGS, as the ASFLAGS environment variable is no longer used by Xen. Bug: https://bugs.gentoo.org/839888 Signed-off-by: Florian Schmaus <flow@gentoo.org>
Diffstat (limited to 'app-emulation')
-rw-r--r--app-emulation/xen/xen-4.16.0-r7.ebuild (renamed from app-emulation/xen/xen-4.16.0-r6.ebuild)39
1 files changed, 22 insertions, 17 deletions
diff --git a/app-emulation/xen/xen-4.16.0-r6.ebuild b/app-emulation/xen/xen-4.16.0-r7.ebuild
index f57641df28d0..07e9855fc988 100644
--- a/app-emulation/xen/xen-4.16.0-r6.ebuild
+++ b/app-emulation/xen/xen-4.16.0-r7.ebuild
@@ -114,6 +114,24 @@ src_prepare() {
default
}
+xen_make() {
+ # Setting clang to either 'y' or 'n' tells Xen's build system
+ # whether or not clang is used.
+ local clang=n
+ if tc-is-clang; then
+ clang=y
+ fi
+
+ # Send raw LDFLAGS so that --as-needed works
+ emake \
+ V=1 \
+ LDFLAGS="$(raw-ldflags)" \
+ HOSTCC="$(tc-getBUILD_CC)" \
+ HOSTCXX="$(tc-getBUILD_CXX)" \
+ clang="${clang}" \
+ "$@"
+}
+
src_configure() {
cd xen || die
@@ -131,24 +149,16 @@ EOF
echo "CONFIG_XSM=y" >> gentoo-config || die
fi
- emake KCONFIG_ALLCONFIG=gentoo-config alldefconfig
-
# remove flags
unset CFLAGS
- unset LDFLAGS
- unset ASFLAGS
tc-ld-disable-gold # Bug 700374
+
+ xen_make KCONFIG_ALLCONFIG=gentoo-config alldefconfig
}
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_make -C xen
}
src_install() {
@@ -157,12 +167,7 @@ src_install() {
mkdir -p "${D}"${EFI_MOUNTPOINT}/efi/${EFI_VENDOR} || die
fi
- emake \
- LDFLAGS="$(raw-ldflags)" \
- LD="$(tc-getLD)" \
- DESTDIR="${D}" \
- -C xen \
- install
+ xen_make 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"