[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH] xen: Don't use -nostdinc flags with CLANG
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@xxxxxxxxxx> --- 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 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |