Replace "-I" by "-iquote" to only take files from this directory when '#include "..."' is used ('#include <...>' works as usual)
We need this because on powerpc64 asm/sigcontext.h includes <asm/elf.h> and tries to include target/include/asm/elf.h instead of /usr/include/asm/elf.h
We also remove from include/arch/ppc/types/h some useless and conflicting type definitions.
Signed-off-by: Laurent Vivier laurent@vivier.eu --- Makefile.target | 2 +- include/arch/ppc/types.h | 8 -------- 2 files changed, 1 insertion(+), 9 deletions(-)
diff --git a/Makefile.target b/Makefile.target index a7363e6..4c54105 100644 --- a/Makefile.target +++ b/Makefile.target @@ -15,7 +15,7 @@ HOSTCFLAGS+= -Wstrict-aliasing -Wwrite-strings -Wmissing-prototypes -Wnested-ext HOSTCFLAGS+= -W # Flags for dependency generation HOSTCFLAGS+= -MMD -MP -MT $@ -MF '$(*D)/$(*F).d' -HOSTINCLUDES := -I$(SRCDIR)/include -I$(SRCDIR)/kernel -I$(SRCDIR)/kernel/include -I$(ODIR)/target/include +HOSTINCLUDES := -I$(SRCDIR)/include -I$(SRCDIR)/kernel -I$(SRCDIR)/kernel/include -iquote $(ODIR)/target/include
CC := $(TARGET)gcc AS := $(TARGET)as diff --git a/include/arch/ppc/types.h b/include/arch/ppc/types.h index 69b3db4..b2246d0 100644 --- a/include/arch/ppc/types.h +++ b/include/arch/ppc/types.h @@ -84,21 +84,13 @@ typedef uint32_t prom_uarg_t; /* size named types */
typedef unsigned char u8; -typedef unsigned char __u8; typedef unsigned short u16; -typedef unsigned short __u16; typedef unsigned int u32; -typedef unsigned int __u32; typedef unsigned long long u64; -typedef unsigned long long __u64;
typedef signed char s8; -typedef signed char __s8; typedef short s16; -typedef short __s16; typedef int s32; -typedef int __s32; typedef long long s64; -typedef long long __s64;
#endif