All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xen: Don't use -nostdinc flags with CLANG
@ 2014-02-10 23:29 Julien Grall
  2014-02-11  8:37 ` Jan Beulich
  2014-02-11  8:53 ` Tim Deegan
  0 siblings, 2 replies; 19+ messages in thread
From: Julien Grall @ 2014-02-10 23:29 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian.Jackson, keir, tim, ian.campbell, Julien Grall

Commit 06a9c7e "xen: move -nostdinc into common Rules.mk." breaks
compilation with clang:

In file included from sched_sedf.c:8:
In file included from /home/julieng/works/xen/xen/include/xen/lib.h:5:
/home/julieng/works/xen/xen/include/xen/stdarg.h:20:12: error: 'stdarg.h' file
not found with <angled> include; use "quotes" instead
           ^~~~~~~~~~
           "stdarg.h"
In file included from sched_sedf.c:8:
/home/julieng/works/xen/xen/include/xen/lib.h:101:63: error: unknown type name 'va_list'
extern int vsnprintf(char *buf, size_t size, const char *fmt, va_list args)
                                                              ^
/home/julieng/works/xen/xen/include/xen/lib.h:105:64: error: unknown type name 'va_list'
extern int vscnprintf(char *buf, size_t size, const char *fmt, va_list args)

I have the same errors on different version of clang:
    - clang 3.0 on debian wheezy
    - clang 3.3 on Fedora 20
    - clang 3.5 build from trunk

Removing -nostdinc fix the build on clang.

Signed-off-by: Julien Grall <julien.grall@linaro.org>
---
 xen/Rules.mk | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/xen/Rules.mk b/xen/Rules.mk
index df1428f..ed9b8d0 100644
--- a/xen/Rules.mk
+++ b/xen/Rules.mk
@@ -46,7 +46,8 @@ 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
+CFLAGS-y        += -iwithprefix include
+CFLAGS-$(gcc)   += -nostdinc
 endif
 
 CFLAGS-$(XSM_ENABLE)    += -DXSM_ENABLE
-- 
1.8.5.3

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

end of thread, other threads:[~2014-02-13 15:32 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

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.