Index: head/emulators/xen-kernel/Makefile =================================================================== --- head/emulators/xen-kernel/Makefile (revision 565410) +++ head/emulators/xen-kernel/Makefile (revision 565411) @@ -1,52 +1,55 @@ # $FreeBSD$ PORTNAME= xen PORTVERSION= 4.14.1 -PORTREVISION= 0 +PORTREVISION= 1 CATEGORIES= emulators MASTER_SITES= http://downloads.xenproject.org/release/xen/${PORTVERSION}/ PKGNAMESUFFIX= -kernel MAINTAINER= royger@FreeBSD.org COMMENT= Hypervisor using a microkernel design LICENSE= GPLv2 ONLY_FOR_ARCHS= amd64 USES= cpe gmake python:build bison # Ports build environment has ARCH=amd64 set which disables Xen automatic arch # detection, but amd64 is not a valid arch for Xen. Hardcode x86_64 on the # command line in order to overwrite the one from the environment. MAKE_ARGS= clang=y PYTHON=${PYTHON_CMD} ARCH=x86_64 NO_MTREE= yes STRIP= # PLIST_FILES= /boot/xen \ lib/debug/boot/xen.debug # Propagate module command line passed by the loader. EXTRA_PATCHES+= ${PATCHDIR}/0001-x86-pvh-pass-module-command-line-to-dom0.patch:-p1 + +# Fix EFI BS call ABI. +EXTRA_PATCHES+= ${PATCHDIR}/0001-x86-efi-enable-MS-ABI-attribute-on-clang.patch:-p1 .include .if ${OPSYS} != FreeBSD IGNORE= only supported on FreeBSD .endif .if ${OSVERSION} < 1200074 IGNORE= only supported on FreeBSD 12.0 or newer .endif # The ports native 'build' target cannot be used because it sets # CFLAGS, and that breaks the Xen build system. do-build: ${MAKE_CMD} -j${MAKE_JOBS_NUMBER} -C ${WRKSRC} build-xen ${MAKE_ARGS} do-install: ${MKDIR} ${STAGEDIR}/boot ${MKDIR} ${STAGEDIR}${PREFIX}/lib/debug/boot/ ${INSTALL_PROGRAM} ${WRKSRC}/xen/xen ${STAGEDIR}/boot ${INSTALL_DATA} ${WRKSRC}/xen/xen-syms ${STAGEDIR}${PREFIX}/lib/debug/boot/xen.debug .include Index: head/emulators/xen-kernel/files/0001-x86-efi-enable-MS-ABI-attribute-on-clang.patch =================================================================== --- head/emulators/xen-kernel/files/0001-x86-efi-enable-MS-ABI-attribute-on-clang.patch (nonexistent) +++ head/emulators/xen-kernel/files/0001-x86-efi-enable-MS-ABI-attribute-on-clang.patch (revision 565411) @@ -0,0 +1,38 @@ +From 92f5ffa58d188c9f9a9f1bcdccb6d6348d9df612 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= +Date: Thu, 4 Feb 2021 14:02:32 +0100 +Subject: [PATCH] x86/efi: enable MS ABI attribute on clang +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Or else the EFI service calls will use the wrong calling convention. + +The __ms_abi__ attribute is available on all supported versions of +clang. Add a specific Clang check because the GCC version reported by +Clang is below the required 4.4 to use the __ms_abi__ attribute. + +Signed-off-by: Roger Pau Monné +Acked-by: Andrew Cooper +Reviewed-by: Ian Jackson +Release-Acked-by: Ian Jackson +--- + xen/include/asm-x86/x86_64/efibind.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/xen/include/asm-x86/x86_64/efibind.h b/xen/include/asm-x86/x86_64/efibind.h +index b013db175d..ddcfae07ec 100644 +--- a/xen/include/asm-x86/x86_64/efibind.h ++++ b/xen/include/asm-x86/x86_64/efibind.h +@@ -172,7 +172,7 @@ typedef uint64_t UINTN; + #ifndef EFIAPI // Forces EFI calling conventions reguardless of compiler options + #ifdef _MSC_EXTENSIONS + #define EFIAPI __cdecl // Force C calling convention for Microsoft C compiler +- #elif __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) ++ #elif __clang__ || __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) + #define EFIAPI __attribute__((__ms_abi__)) // Force Microsoft ABI + #else + #define EFIAPI // Substitute expresion to force C calling convention +-- +2.30.1 + Property changes on: head/emulators/xen-kernel/files/0001-x86-efi-enable-MS-ABI-attribute-on-clang.patch ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property