Re: correct to set -nostdinc and then include <stdarg.h> ?

Keith Owens (kaos@ocs.com.au)
Mon, 07 Apr 2003 15:15:12 +1000


On Mon, 07 Apr 2003 00:41:22 -0400,
Chris Friesen <cfriesen@nortelnetworks.com> wrote:
>
>I was trying to compile 2.5.66 with gcc 3.2.2. It dies as soon as it tries to
>compile init/main.c because it is unable to find "stdarg.h" which is included by
>"include/linux/kernel.h".

Try this:

Index: 66.1/Makefile
--- 66.1/Makefile Tue, 25 Mar 2003 11:23:27 +1100 kaos (linux-2.5/I/d/12_Makefile 1.45.1.4.1.59 444)
+++ 66.1(w)/Makefile Mon, 07 Apr 2003 15:13:54 +1000 kaos (linux-2.5/I/d/12_Makefile 1.45.1.4.1.59 444)
@@ -177,7 +177,7 @@ LDFLAGS_MODULE = -r
CFLAGS_KERNEL =
AFLAGS_KERNEL =

-NOSTDINC_FLAGS = -nostdinc -iwithprefix include
+NOSTDINC_FLAGS = -nostdinc $(shell LANG=C $(CC) -print-search-dirs | sed -ne 's/install: \(.*\)/-I \1include/gp')

CPPFLAGS := -D__KERNEL__ -Iinclude
CFLAGS := $(CPPFLAGS) -Wall -Wstrict-prototypes -Wno-trigraphs -O2 \

-
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/