mirror of
https://github.com/ipxe/ipxe
synced 2026-03-16 03:02:07 +03:00
[xen] Allow for platforms that have no Xen support
The Xen headers support only x86 and ARM. Allow for platforms such as LoongArch64 to build despite the absence of Xen support by providing an architecture-specific <bits/xen.h> that simply does: #ifndef _BITS_XEN_H #define _BITS_XEN_H #include <ipxe/nonxen.h> #endif /* _BITS_XEN_H */ Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -59,6 +59,10 @@ sub try_import_file {
|
||||
if ( /^\#include\s+[<\"](\S+)[>\"]/ ) {
|
||||
push @dependencies, catfile ( $subdir, $1 );
|
||||
}
|
||||
# Patch "Unsupported architecture" line
|
||||
if ( /^\#error\s+"Unsupported\sarchitecture"/ ) {
|
||||
$_ = "#include <bits/xen.h>"
|
||||
}
|
||||
# Write out line
|
||||
print $outfh "$_\n";
|
||||
# Apply FILE_LICENCE() immediately after include guard
|
||||
|
||||
@@ -19,7 +19,7 @@ FILE_LICENCE ( MIT );
|
||||
#elif defined(__arm__) || defined (__aarch64__)
|
||||
#include "arch-arm.h"
|
||||
#else
|
||||
#error "Unsupported architecture"
|
||||
#include <bits/xen.h>
|
||||
#endif
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
Reference in New Issue
Block a user