All of lore.kernel.org
 help / color / mirror / Atom feed
From: George Dunlap <george.dunlap@eu.citrix.com>
To: Tim Deegan <tim@xen.org>, george.dunlap@citrix.com
Cc: xen-devel@lists.xenproject.org,
	Julien Grall <julien.grall@linaro.org>,
	keir@xen.org, Ian.Jackson@eu.citrix.com, ian.campbell@citrix.com
Subject: Re: [PATCH] xen: Don't use -nostdinc flags with CLANG
Date: Thu, 13 Feb 2014 11:46:33 +0000	[thread overview]
Message-ID: <52FCB099.7000902@eu.citrix.com> (raw)
In-Reply-To: <20140213112419.GB82703@deinos.phlegethon.org>

On 02/13/2014 11:24 AM, Tim Deegan wrote:
> George: ping.
>
> At 15:33 +0100 on 11 Feb (1392129226), Tim Deegan wrote:
>> At 14:24 +0000 on 11 Feb (1392125052), Julien Grall wrote:
>>> If it's possible I'd like this patch goes in Xen 4.4 to fix build with
>>> official version of clang (until 3.4).
>>>
>>> Clang 3.5 is still under development, so I don't think it's important to
>>> have support for it in Xen 4.4.
>> Fair enough.  In that case it needs a release ack from George.  It:
>>   - fixes a compile issue on some version s of clang;
>>   - might cause a regression with other compilers, but the regression
>>     is likely to be obvious (i.e. a compile-time failure).

So the main risk would be if stgarg.h contained something like the 
"__GNUC_PREREQ__(4, 5)" #ifdef-ery that we missed.  Without this patch, 
we know it doesn't compile on the latest version of clang.  I think 
that's probably worse than the risk of potentially not compiling on some 
compiler that doesn't end up being tested before the release:

Release-acked-by: George Dunlap <george.dunlap@eu.citrix.com>


>>
>> And it needs an ack from Keir, for changing common code.
>>
>> v2 is below, removing "-iwithprefix".  I've kept your tested-by; hope
>> that's OK.
>>
>> Cheers,
>>
>> Tim.
>>
>> commit 1d62fcb9ad8d2b409ac2cf0e8a3824e19ca3313f
>> Author: Tim Deegan <tim@xen.org>
>> Date:   Tue Feb 11 12:44:09 2014 +0000
>>
>>      xen: stop trying to use the system <stdarg.h> and <stdbool.h>
>>      
>>      We already have our own versions of the stdarg/stdbool definitions, for
>>      systems where those headers are installed in /usr/include.
>>      
>>      On linux, they're typically installed in compiler-specific paths, but
>>      finding them has proved unreliable.  Drop that and use our own versions
>>      everywhere.
>>      
>>      Signed-off-by: Tim Deegan <tim@xen.org>
>>      Tested-by: Julien Grall <julien.grall@linaro.org>
>>
>> diff --git a/xen/Rules.mk b/xen/Rules.mk
>> index df1428f..3a6cec5 100644
>> --- a/xen/Rules.mk
>> +++ b/xen/Rules.mk
>> @@ -44,10 +44,7 @@ ALL_OBJS-$(x86)          += $(BASEDIR)/crypto/built_in.o
>>   CFLAGS += -fno-builtin -fno-common
>>   CFLAGS += -Werror -Wredundant-decls -Wno-pointer-arith
>>   CFLAGS += -pipe -g -D__XEN__ -include $(BASEDIR)/include/xen/config.h
>> -# Solaris puts stdarg.h &c in the system include directory.
>> -ifneq ($(XEN_OS),SunOS)
>> -CFLAGS += -nostdinc -iwithprefix include
>> -endif
>> +CFLAGS += -nostdinc
>>   
>>   CFLAGS-$(XSM_ENABLE)    += -DXSM_ENABLE
>>   CFLAGS-$(FLASK_ENABLE)  += -DFLASK_ENABLE -DXSM_MAGIC=0xf97cff8c
>> diff --git a/xen/include/xen/stdarg.h b/xen/include/xen/stdarg.h
>> index d1b2540..0283f06 100644
>> --- a/xen/include/xen/stdarg.h
>> +++ b/xen/include/xen/stdarg.h
>> @@ -1,23 +1,21 @@
>>   #ifndef __XEN_STDARG_H__
>>   #define __XEN_STDARG_H__
>>   
>> -#if defined(__OpenBSD__) || defined(__NetBSD__) || defined(__FreeBSD__)
>> -   typedef __builtin_va_list va_list;
>> -#  ifdef __GNUC__
>> -#    define __GNUC_PREREQ__(x, y)                                       \
>> -        ((__GNUC__ == (x) && __GNUC_MINOR__ >= (y)) ||                  \
>> -         (__GNUC__ > (x)))
>> -#  else
>> -#    define __GNUC_PREREQ__(x, y)   0
>> -#  endif
>> -#  if !__GNUC_PREREQ__(4, 5)
>> -#    define __builtin_va_start(ap, last)    __builtin_stdarg_start((ap), (last))
>> -#  endif
>> -#  define va_start(ap, last)    __builtin_va_start((ap), (last))
>> -#  define va_end(ap)            __builtin_va_end(ap)
>> -#  define va_arg                __builtin_va_arg
>> +#ifdef __GNUC__
>> +#  define __GNUC_PREREQ__(x, y)                                       \
>> +      ((__GNUC__ == (x) && __GNUC_MINOR__ >= (y)) ||                  \
>> +       (__GNUC__ > (x)))
>>   #else
>> -#  include <stdarg.h>
>> +#  define __GNUC_PREREQ__(x, y)   0
>>   #endif
>>   
>> +#if !__GNUC_PREREQ__(4, 5)
>> +#  define __builtin_va_start(ap, last)    __builtin_stdarg_start((ap), (last))
>> +#endif
>> +
>> +typedef __builtin_va_list va_list;
>> +#define va_start(ap, last)    __builtin_va_start((ap), (last))
>> +#define va_end(ap)            __builtin_va_end(ap)
>> +#define va_arg                __builtin_va_arg
>> +
>>   #endif /* __XEN_STDARG_H__ */
>> diff --git a/xen/include/xen/stdbool.h b/xen/include/xen/stdbool.h
>> index f0faedf..b0947a6 100644
>> --- a/xen/include/xen/stdbool.h
>> +++ b/xen/include/xen/stdbool.h
>> @@ -1,13 +1,9 @@
>>   #ifndef __XEN_STDBOOL_H__
>>   #define __XEN_STDBOOL_H__
>>   
>> -#if defined(__OpenBSD__) || defined(__NetBSD__) || defined(__FreeBSD__)
>> -#  define bool _Bool
>> -#  define true 1
>> -#  define false 0
>> -#  define __bool_true_false_are_defined   1
>> -#else
>> -#  include <stdbool.h>
>> -#endif
>> +#define bool _Bool
>> +#define true 1
>> +#define false 0
>> +#define __bool_true_false_are_defined   1
>>   
>>   #endif /* __XEN_STDBOOL_H__ */
>>
>> _______________________________________________
>> Xen-devel mailing list
>> Xen-devel@lists.xen.org
>> http://lists.xen.org/xen-devel

  reply	other threads:[~2014-02-13 11:46 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-10 23:29 [PATCH] xen: Don't use -nostdinc flags with CLANG Julien Grall
2014-02-11  8:37 ` Jan Beulich
2014-02-11  8:53 ` Tim Deegan
2014-02-11 12:30   ` Julien Grall
2014-02-11 12:35     ` Tim Deegan
2014-02-11 12:36       ` Julien Grall
2014-02-11 12:59         ` Tim Deegan
2014-02-11 13:20           ` Julien Grall
2014-02-11 13:59             ` Tim Deegan
2014-02-11 14:24               ` Julien Grall
2014-02-11 14:33                 ` Tim Deegan
2014-02-11 15:01                   ` Keir Fraser
2014-02-13 11:24                   ` Tim Deegan
2014-02-13 11:46                     ` George Dunlap [this message]
2014-02-13 11:49                       ` George Dunlap
2014-02-13 15:19                   ` [PATCH] xen: Don't use __builtin_stdarg_start() Tim Deegan
2014-02-13 15:22                     ` George Dunlap
2014-02-13 15:32                     ` Roger Pau Monné
2014-02-11 13:21           ` [PATCH] xen: Don't use -nostdinc flags with CLANG Julien Grall

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=52FCB099.7000902@eu.citrix.com \
    --to=george.dunlap@eu.citrix.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=george.dunlap@citrix.com \
    --cc=ian.campbell@citrix.com \
    --cc=julien.grall@linaro.org \
    --cc=keir@xen.org \
    --cc=tim@xen.org \
    --cc=xen-devel@lists.xenproject.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.