Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S263687AbUFRVHe (ORCPT ); Fri, 18 Jun 2004 17:07:34 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S263126AbUFRVGU (ORCPT ); Fri, 18 Jun 2004 17:06:20 -0400 Received: from fw.osdl.org ([65.172.181.6]:26560 "EHLO mail.osdl.org") by vger.kernel.org with ESMTP id S262085AbUFRU6n (ORCPT ); Fri, 18 Jun 2004 16:58:43 -0400 Date: Fri, 18 Jun 2004 13:58:02 -0700 (PDT) From: Linus Torvalds To: Geert Uytterhoeven cc: Linux/m68k , Linux Kernel Development Subject: Re: [PATCH] cross-sparse In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1426 Lines: 45 On Fri, 18 Jun 2004, Geert Uytterhoeven wrote: > > IIRC, actually the first error I got when using the native sparse was that it > couldn't find stdarg.h. Ok. > And even the non-native sparse doesn't know about architecture-specific defines > like __mc68000__, causing some code paths being wrong. Guess I have to replace > them by e.g. CONFIG_M68K. No, this is handled by fixing up the expected defines in the arch/xxx/Makefile thing, ie x86 has this: CHECK := $(CHECK) -D__i386__=1 exactly because sparse is architecture-agnostic. Same goes for 64-bit issues (sparse defaults to 32-bit types regardless of what the native format is), so a 64-bit platform like ppc64 would do: CHECK := $(CHECK) -m64 -D__powerpc__=1 where that "-m64" is the magic flag to sparse for a 64-bit compile environment. But your stdarg.h issue is certainly valid. I'd really like for sparse to be _totally_ independent of the native compiler install, and I guess we could do something like CHECK := $(CHECK) -I$(shell $(CC) -print-file-name=include) or similar to get this part right too, but then sparse would be hard to use stand-alone without the Makefile magic. Hmm. Linus - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/