mirror of
https://gitlab.com/qemu-project/openbios.git
synced 2024-02-13 08:34:06 +08:00
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> git-svn-id: svn://coreboot.org/openbios/openbios-devel@251 f158a5a8-5612-0410-a976-696ce0be7e32
This commit is contained in:
committed by
Stefan Reinauer
parent
e5bc7e8990
commit
71033f7bb8
@@ -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
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ static FILE *srcfiles[128];
|
||||
static unsigned int cursrc = 0;
|
||||
|
||||
#ifdef NATIVE_BITWIDTH_SMALLER_THAN_HOST_BITWIDTH
|
||||
ucell base_address;
|
||||
unsigned long base_address;
|
||||
#endif
|
||||
|
||||
/* include path handling */
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user