Author: stepan Date: 2008-11-24 13:13:40 +0100 (Mon, 24 Nov 2008) New Revision: 251
Modified: openbios-devel/config/examples/cross-ppc_rules.xml openbios-devel/kernel/bootstrap.c openbios-devel/kernel/cross.h Log: This patch allows me to compile openbios using the cross-pcc target on amd64 host.
Signed-off-by: Laurent Vivier Laurent@lvivier.info Acked-by: Stefan Reinauer stepan@coresystems.de
Modified: openbios-devel/config/examples/cross-ppc_rules.xml =================================================================== --- openbios-devel/config/examples/cross-ppc_rules.xml 2008-11-17 19:42:11 UTC (rev 250) +++ openbios-devel/config/examples/cross-ppc_rules.xml 2008-11-24 12:13:40 UTC (rev 251) @@ -9,20 +9,21 @@ ARCH := ppc ODIR := obj-$(ARCH) HOSTCC := gcc -HOSTCFLAGS := -Os -Wall -W -DFCOMPILER -DBOOTSTRAP $(CROSSCFLAGS) +HOSTCFLAGS := -Os -Wall -W -DFCOMPILER -DBOOTSTRAP $(CROSSCFLAGS) -DSWAP_ENDIANNESS HOSTINCLUDES := -Iinclude -Ikernel/include -I$(ODIR)/target/include # # MOLPATH is needed if you want to build openbios-mol.elf # MOLPATH=$(HOME)/mol-0.9.71
-CC := powerpc-linux-gcc -AS := powerpc-linux-as -AR := powerpc-linux-ar -LD := powerpc-linux-ld -NM := powerpc-linux-nm -STRIP := powerpc-linux-strip -RANLIB := powerpc-linux-ranlib +TARGET=powerpc-linux-gnu- +CC := $(TARGET)gcc +AS := $(TARGET)as +AR := $(TARGET)ar +LD := $(TARGET)ld +NM := $(TARGET)nm +STRIP := $(TARGET)strip +RANLIB := $(TARGET)ranlib CFLAGS := -Os -Wall -W -msoft-float -DNATIVE_BITWIDTH_EQUALS_HOST_BITWIDTH -USWAP_ENDIANNESS -fno-builtin-bcopy -fno-builtin-log2 INCLUDES := -Iinclude -Ikernel/include -I$(ODIR)/target/include
Modified: openbios-devel/kernel/bootstrap.c =================================================================== --- openbios-devel/kernel/bootstrap.c 2008-11-17 19:42:11 UTC (rev 250) +++ openbios-devel/kernel/bootstrap.c 2008-11-24 12:13:40 UTC (rev 251) @@ -47,7 +47,7 @@ static unsigned int cursrc = 0;
#ifdef NATIVE_BITWIDTH_SMALLER_THAN_HOST_BITWIDTH -ucell base_address; +unsigned long base_address; #endif
/* include path handling */
Modified: openbios-devel/kernel/cross.h =================================================================== --- openbios-devel/kernel/cross.h 2008-11-17 19:42:11 UTC (rev 250) +++ openbios-devel/kernel/cross.h 2008-11-24 12:13:40 UTC (rev 251) @@ -113,7 +113,7 @@ #endif
#ifdef NATIVE_BITWIDTH_SMALLER_THAN_HOST_BITWIDTH -extern ucell base_address; +extern unsigned long base_address; #define pointer2cell(x) ((ucell)(((unsigned long)(x))-base_address)) #define cell2pointer(x) ((u8 *)(((unsigned long)(x))+base_address)) #define FMT_CELL_x "x"