From 372145cd292a0ea7a5f5f4ada810d8d55faa54e0 Mon Sep 17 00:00:00 2001 From: Andy Green Date: Wed, 13 Aug 2008 00:35:09 +0100 Subject: [PATCH] build-link-with-libgcc.patch libgcc has divide and things we would like to use Signed-off-by: Andy Green --- qiboot/Makefile | 3 ++- qiboot/config.mk | 9 +++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/qiboot/Makefile b/qiboot/Makefile index 43511ec..0cf54e3 100644 --- a/qiboot/Makefile +++ b/qiboot/Makefile @@ -30,6 +30,7 @@ C_OBJS = $(patsubst %.c,%.o, $(C_SRCS)) #SRCS := $(START: .o=.S) $(COBJS: .o=.c) SRCS = ${S_SRCS} ${C_SRCS} OBJS = ${S_OBJS} ${C_OBJS} +LIBS = -L${COMPILER_LIB_PATH} -lgcc # GTA02 A5 and A6 U-Boot will eat these for DFU action UDFU_VID = 0x1d50 @@ -51,7 +52,7 @@ all:${UDFU_IMAGE} ${OBJS}:${SRCS} ${UDFU_IMAGE}:${OBJS} - $(LD) ${LDFLAGS} -T$(LDS) -g $(OBJS) -o ${TARGET} + $(LD) ${LDFLAGS} -T$(LDS) -g $(OBJS) -o ${TARGET} ${LIBS} $(OBJCOPY) -O binary -S ${TARGET} ${IMAGE} $(MKUDFU) -v ${UDFU_VID} -p ${UDFU_PID} -r ${UDFU_REV} \ -d ${IMAGE} ${UDFU_IMAGE} diff --git a/qiboot/config.mk b/qiboot/config.mk index 5d01952..b8cb833 100644 --- a/qiboot/config.mk +++ b/qiboot/config.mk @@ -1,8 +1,13 @@ # # Include the make variables (CC, etc...) # -#CROSS_COMPILE=arm-softfloat-linux-gnu- -CROSS_COMPILE=/usr/local/openmoko/arm/bin/arm-angstrom-linux-gnueabi- + +CROSS_PATH=/usr/local/openmoko/arm +CROSS_COMPILE=${CROSS_PATH}/bin/arm-angstrom-linux-gnueabi- + +#### +COMPILER_LIB_PATH_PRE=${CROSS_PATH}/lib/gcc/arm-angstrom-linux-gnueabi +COMPILER_LIB_PATH=${COMPILER_LIB_PATH_PRE}/`ls ${COMPILER_LIB_PATH_PRE}` AS = $(CROSS_COMPILE)as LD = $(CROSS_COMPILE)ld