All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xen/x86: hypervisor build fixes for FreeBSD.
@ 2013-08-15 15:44 Tim Deegan
  2013-08-16  8:33 ` Jan Beulich
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Tim Deegan @ 2013-08-15 15:44 UTC (permalink / raw)
  To: xen-devel; +Cc: keir, jbeulich

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

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] xen/x86: hypervisor build fixes for FreeBSD.
  2013-08-15 15:44 [PATCH] xen/x86: hypervisor build fixes for FreeBSD Tim Deegan
@ 2013-08-16  8:33 ` Jan Beulich
  2013-08-16 15:25 ` Keir Fraser
  2013-08-26 15:06 ` Roger Pau Monné
  2 siblings, 0 replies; 5+ messages in thread
From: Jan Beulich @ 2013-08-16  8:33 UTC (permalink / raw)
  To: Tim Deegan; +Cc: xen-devel, keir

>>> On 15.08.13 at 17:44, Tim Deegan <tim@xen.org> wrote:
> 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

What a mess (assuming that's still GNU ld and gcc).

But anyway, this looks okay to me (but giving a Reviewed-by would
be sort of odd, considering that I know nothing about all these BSDs).

Jan

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] xen/x86: hypervisor build fixes for FreeBSD.
  2013-08-15 15:44 [PATCH] xen/x86: hypervisor build fixes for FreeBSD Tim Deegan
  2013-08-16  8:33 ` Jan Beulich
@ 2013-08-16 15:25 ` Keir Fraser
  2013-08-26 15:06 ` Roger Pau Monné
  2 siblings, 0 replies; 5+ messages in thread
From: Keir Fraser @ 2013-08-16 15:25 UTC (permalink / raw)
  To: Tim Deegan, xen-devel; +Cc: jbeulich

On 15/08/2013 16:44, "Tim Deegan" <tim@xen.org> wrote:

> 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>

Acked-by: Keir Fraser <keir@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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] xen/x86: hypervisor build fixes for FreeBSD.
  2013-08-15 15:44 [PATCH] xen/x86: hypervisor build fixes for FreeBSD Tim Deegan
  2013-08-16  8:33 ` Jan Beulich
  2013-08-16 15:25 ` Keir Fraser
@ 2013-08-26 15:06 ` Roger Pau Monné
  2013-08-26 16:38   ` Tim Deegan
  2 siblings, 1 reply; 5+ messages in thread
From: Roger Pau Monné @ 2013-08-26 15:06 UTC (permalink / raw)
  To: Tim Deegan; +Cc: keir, jbeulich, xen-devel

On 15/08/13 17:44, Tim Deegan wrote:
> 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

Just for curiosity, have you tried this with -current FreeBSD (10)? I'm
specifically asking this because -current has switched to clang.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] xen/x86: hypervisor build fixes for FreeBSD.
  2013-08-26 15:06 ` Roger Pau Monné
@ 2013-08-26 16:38   ` Tim Deegan
  0 siblings, 0 replies; 5+ messages in thread
From: Tim Deegan @ 2013-08-26 16:38 UTC (permalink / raw)
  To: Roger Pau Monné; +Cc: keir, jbeulich, xen-devel


At 17:06 +0200 on 26 Aug (1377536819), Roger Pau Monn? wrote:
> On 15/08/13 17:44, Tim Deegan wrote:
> > 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
> 
> Just for curiosity, have you tried this with -current FreeBSD (10)? I'm
> specifically asking this because -current has switched to clang.


No - although I do use FreeBSD for some things I didn't have a v10 image
to try.  I might give it a go if I get a moment. :) 

Clang will build the hypervisor (if you use 'make xen clang=y') but IIRC
it might not build the tools without some more work.  The tools build
uses autoconf now so on the one hand it should be possible for
./configure to DTRT, but on the other hand I really don't want to get
involved in any autotools wrangling. :)

Cheers,

Tim. 

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-08-26 16:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-15 15:44 [PATCH] xen/x86: hypervisor build fixes for FreeBSD Tim Deegan
2013-08-16  8:33 ` Jan Beulich
2013-08-16 15:25 ` Keir Fraser
2013-08-26 15:06 ` Roger Pau Monné
2013-08-26 16:38   ` Tim Deegan

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.