summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--recipes-extended/xen/xen.inc35
1 files changed, 25 insertions, 10 deletions
diff --git a/recipes-extended/xen/xen.inc b/recipes-extended/xen/xen.inc
index 36ab78e2..4ac954ec 100644
--- a/recipes-extended/xen/xen.inc
+++ b/recipes-extended/xen/xen.inc
@@ -867,15 +867,27 @@ export CROSS_COMPILE="${TARGET_PREFIX}"
867# overide LDFLAGS to allow xen to build without: "x86_64-oe-linux-ld: unrecognized option '-Wl,-O1'" 867# overide LDFLAGS to allow xen to build without: "x86_64-oe-linux-ld: unrecognized option '-Wl,-O1'"
868export LDFLAGS="" 868export LDFLAGS=""
869 869
870# Yocto injects -mfpmath=sse for some machine types into the CFLAGS which 870# Pass through the Yocto distro compiler flags via the Xen-provided variables.
871# conflicts with -mno-sse so instead we strip -mfpmath=sse instead of 871# Special handling:
872# patching the build to be ok with this 872# - Yocto supplies the _FORTIFY_SOURCE flag via CC/CPP/CXX but then passes the
873TUNE_CCARGS := "${@oe.utils.str_filter_out('-mfpmath=sse', '${TUNE_CCARGS}', d)}" 873# optimization -O via C*FLAGS which is problematic when the CFLAGS are cleared
874TUNE_CCARGS := "${@oe.utils.str_filter_out('-msse4.2', '${TUNE_CCARGS}', d)}" 874# within the build because compilation fails with the compiler stating
875 875# "_FORTIFY_SOURCE requires compiling with optimization (-O)".
876# Supply the full set of compiler flags via the tool variables 876# - Move HOST_CC_ARCH into the Xen-provided CFLAGS variables and keep
877# Yocto supplys _FORTIFY_SOURCE via CC/CPP/CXX but optimization -O via C*FLAGS 877# TOOLCHAIN_OPTIONS set via CC: this enables hvmloader to be built correctly.
878CC_append = " ${CFLAGS}" 878# It must not be compiled with SSE compiler options enabled and the Xen build
879# explicitly clears CFLAGS to ensure that, so such options must not be passed
880# in via the tool variable. hvmloader is required to run HVM-mode guest VMs.
881CC="${CCACHE}${HOST_PREFIX}gcc ${TOOLCHAIN_OPTIONS}"
882EXTRA_CFLAGS_XEN_CORE="${HOST_CC_ARCH} ${CFLAGS}"
883EXTRA_CFLAGS_XEN_TOOLS="${HOST_CC_ARCH} ${CFLAGS}"
884# 32-bit ARM needs the TUNE_CCARGS component of HOST_CC_ARCH to be passed
885# in CC to ensure that configure can compile binaries for the right arch.
886CC_arm="${CCACHE}${HOST_PREFIX}gcc ${TUNE_CCARGS} ${TOOLCHAIN_OPTIONS}"
887EXTRA_CFLAGS_XEN_CORE_arm="${SECURITY_CFLAGS} ${CFLAGS}"
888EXTRA_CFLAGS_XEN_TOOLS_arm="${SECURITY_CFLAGS} ${CFLAGS}"
889
890# There are no Xen-provided variables for C++, so append to the tool variables:
879CPP_append = " ${CPPFLAGS}" 891CPP_append = " ${CPPFLAGS}"
880CXX_append = " ${CXXFLAGS}" 892CXX_append = " ${CXXFLAGS}"
881 893
@@ -996,8 +1008,11 @@ do_configure() {
996 bbfatal "Unable to copy defconfig to .config" 1008 bbfatal "Unable to copy defconfig to .config"
997 fi 1009 fi
998 1010
1011 unset CFLAGS
1012
999 # do configure 1013 # do configure
1000 oe_runconf 1014 oe_runconf EXTRA_CFLAGS_XEN_CORE="${EXTRA_CFLAGS_XEN_CORE}" \
1015 EXTRA_CFLAGS_XEN_TOOLS="${EXTRA_CFLAGS_XEN_TOOLS}"
1001 if [ ! -e ${STAGING_INCDIR}/bits/long-double-32.h ]; then 1016 if [ ! -e ${STAGING_INCDIR}/bits/long-double-32.h ]; then
1002 cp ${STAGING_INCDIR}/bits/long-double-64.h ${STAGING_INCDIR}/bits/long-double-32.h 1017 cp ${STAGING_INCDIR}/bits/long-double-64.h ${STAGING_INCDIR}/bits/long-double-32.h
1003 fi 1018 fi