All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tim Deegan <tim@xen.org>
To: xen-devel@lists.xen.org
Cc: keir@xen.org, jbeulich@suse.com
Subject: [PATCH] xen/x86: hypervisor build fixes for FreeBSD.
Date: Thu, 15 Aug 2013 16:44:49 +0100	[thread overview]
Message-ID: <1376581489-1776-1-git-send-email-tim@xen.org> (raw)

These allow an x86_64 hypervisor to build on FreeBSD 9.1/amd64.
- like OpenBSD, needs a different arch passed to ld.
- like OpenBSD, sdtarg.h and stdbool.h are in /usr/include

Signed-off-by: Tim Deegan <tim@xen.org>
---
 config/x86_64.mk          |    4 ++++
 xen/include/xen/stdarg.h  |    2 +-
 xen/include/xen/stdbool.h |    2 +-
 3 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/config/x86_64.mk b/config/x86_64.mk
index 70c0d8d..d925b23 100644
--- a/config/x86_64.mk
+++ b/config/x86_64.mk
@@ -20,5 +20,9 @@ EFI_DIR ?= /usr/lib64/efi
 ifeq ($(XEN_OS),OpenBSD)
 LDFLAGS_DIRECT += -melf_x86_64_obsd
 else
+ifeq ($(XEN_OS),FreeBSD)
+LDFLAGS_DIRECT += -melf_x86_64_fbsd
+else
 LDFLAGS_DIRECT += -melf_x86_64
 endif
+endif
diff --git a/xen/include/xen/stdarg.h b/xen/include/xen/stdarg.h
index ade7a65..d1b2540 100644
--- a/xen/include/xen/stdarg.h
+++ b/xen/include/xen/stdarg.h
@@ -1,7 +1,7 @@
 #ifndef __XEN_STDARG_H__
 #define __XEN_STDARG_H__
 
-#if defined(__OpenBSD__) || defined (__NetBSD__)
+#if defined(__OpenBSD__) || defined(__NetBSD__) || defined(__FreeBSD__)
    typedef __builtin_va_list va_list;
 #  ifdef __GNUC__
 #    define __GNUC_PREREQ__(x, y)                                       \
diff --git a/xen/include/xen/stdbool.h b/xen/include/xen/stdbool.h
index 2eecd52..f0faedf 100644
--- a/xen/include/xen/stdbool.h
+++ b/xen/include/xen/stdbool.h
@@ -1,7 +1,7 @@
 #ifndef __XEN_STDBOOL_H__
 #define __XEN_STDBOOL_H__
 
-#if defined(__OpenBSD__) || defined(__NetBSD__)
+#if defined(__OpenBSD__) || defined(__NetBSD__) || defined(__FreeBSD__)
 #  define bool _Bool
 #  define true 1
 #  define false 0
-- 
1.7.10.4

             reply	other threads:[~2013-08-15 15:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-15 15:44 Tim Deegan [this message]
2013-08-16  8:33 ` [PATCH] xen/x86: hypervisor build fixes for FreeBSD Jan Beulich
2013-08-16 15:25 ` Keir Fraser
2013-08-26 15:06 ` Roger Pau Monné
2013-08-26 16:38   ` Tim Deegan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1376581489-1776-1-git-send-email-tim@xen.org \
    --to=tim@xen.org \
    --cc=jbeulich@suse.com \
    --cc=keir@xen.org \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.