From patchwork Mon Feb 10 23:29:34 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 24432 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yh0-f70.google.com (mail-yh0-f70.google.com [209.85.213.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 587B8202B2 for ; Mon, 10 Feb 2014 23:31:45 +0000 (UTC) Received: by mail-yh0-f70.google.com with SMTP id c41sf17379076yho.9 for ; Mon, 10 Feb 2014 15:31:44 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:cc:subject :precedence:list-id:list-unsubscribe:list-post:list-help :list-subscribe:mime-version:sender:errors-to:x-original-sender :x-original-authentication-results:mailing-list:list-archive :content-type:content-transfer-encoding; bh=OuMvAyxaxbyPXHLUOCrfzUAFpJcia1QfVMmxJhWf948=; b=i+MG66K9g175Oub/UhMMbXXj/egxcDdIXEmHpkTMzNa4NTLUb6m0ZLGyIP+Norgvzp MFZiR3cnVx4/hXqtexbLO/P9KJLDIhIKVqbl88P6n2bT9kGoslwoG6AiCnniP4p4AvNz t8Jw9vEZ/1AqexHMEccBAKgemF9IF2ysu/TqH85qSUbqi1S5udn2asS9WwYgwa1P2kGB NPv8EhZsTLg3zs/AbRtE90BIS9meOB7SZG8bflfdJGRBBEPUyGLHGzpA257heSJwJYyq nwSXP8/st2/4FwyzH1aFfoxofEwbzXYvkBunCRqZdaxJtnnENsYXNb253wnjO3R3++JV XKzw== X-Gm-Message-State: ALoCoQn/YlKq3nzu19swJffqs/Wz6e+lkkdEXtVSoi8ZcLc5XGVeCtG/nRjDfNGxykBbrC4jWHP+ X-Received: by 10.58.89.146 with SMTP id bo18mr10801643veb.33.1392075104460; Mon, 10 Feb 2014 15:31:44 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.106.165 with SMTP id e34ls678703qgf.29.gmail; Mon, 10 Feb 2014 15:31:44 -0800 (PST) X-Received: by 10.220.11.141 with SMTP id t13mr131607vct.30.1392075104339; Mon, 10 Feb 2014 15:31:44 -0800 (PST) Received: from mail-vb0-f49.google.com (mail-vb0-f49.google.com [209.85.212.49]) by mx.google.com with ESMTPS id y3si5259811vdo.19.2014.02.10.15.31.44 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 10 Feb 2014 15:31:44 -0800 (PST) Received-SPF: neutral (google.com: 209.85.212.49 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.49; Received: by mail-vb0-f49.google.com with SMTP id x14so5249040vbb.36 for ; Mon, 10 Feb 2014 15:31:44 -0800 (PST) X-Received: by 10.58.161.46 with SMTP id xp14mr128688veb.37.1392075104243; Mon, 10 Feb 2014 15:31:44 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.174.196 with SMTP id u4csp205180vcz; Mon, 10 Feb 2014 15:31:43 -0800 (PST) X-Received: by 10.52.170.3 with SMTP id ai3mr2285381vdc.35.1392075103782; Mon, 10 Feb 2014 15:31:43 -0800 (PST) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id x7si5274047vel.0.2014.02.10.15.31.43 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 10 Feb 2014 15:31:43 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of xen-devel-bounces@lists.xen.org designates 50.57.142.19 as permitted sender) client-ip=50.57.142.19; Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WD0IH-0006pK-43; Mon, 10 Feb 2014 23:29:41 +0000 Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WD0IF-0006pF-DT for xen-devel@lists.xenproject.org; Mon, 10 Feb 2014 23:29:39 +0000 Received: from [193.109.254.147:5947] by server-13.bemta-14.messagelabs.com id 06/1F-01226-2E069F25; Mon, 10 Feb 2014 23:29:38 +0000 X-Env-Sender: julien.grall@linaro.org X-Msg-Ref: server-2.tower-27.messagelabs.com!1392074977!3351253!1 X-Originating-IP: [74.125.82.176] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 6.9.16; banners=-,-,- X-VirusChecked: Checked Received: (qmail 28166 invoked from network); 10 Feb 2014 23:29:37 -0000 Received: from mail-we0-f176.google.com (HELO mail-we0-f176.google.com) (74.125.82.176) by server-2.tower-27.messagelabs.com with RC4-SHA encrypted SMTP; 10 Feb 2014 23:29:37 -0000 Received: by mail-we0-f176.google.com with SMTP id q58so4841705wes.35 for ; Mon, 10 Feb 2014 15:29:37 -0800 (PST) X-Received: by 10.180.164.229 with SMTP id yt5mr12325729wib.49.1392074977191; Mon, 10 Feb 2014 15:29:37 -0800 (PST) Received: from localhost.localdomain (cpc8-cmbg15-2-0-cust169.5-4.cable.virginm.net. [86.30.140.170]) by mx.google.com with ESMTPSA id ga20sm34684036wic.0.2014.02.10.15.29.35 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 10 Feb 2014 15:29:36 -0800 (PST) From: Julien Grall To: xen-devel@lists.xenproject.org Date: Mon, 10 Feb 2014 23:29:34 +0000 Message-Id: <1392074974-1488-1-git-send-email-julien.grall@linaro.org> X-Mailer: git-send-email 1.8.5.3 Cc: Ian.Jackson@eu.citrix.com, keir@xen.org, tim@xen.org, ian.campbell@citrix.com, Julien Grall Subject: [Xen-devel] [PATCH] xen: Don't use -nostdinc flags with CLANG X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: julien.grall@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.49 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Archive: 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 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 Tested-by: Julien Grall --- 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