Re: [Tinyx-devel] [PATCH] BUILD: Improving build system
Status: Planning
Brought to you by:
davidcohen
From: David C. <da...@gm...> - 2008-01-12 20:09:00
|
Hi, On 1/12/08, Felipe Balbi <me...@fe...> wrote: > On Sat, Jan 12, 2008 at 12:33:29PM -0400, David Cohen wrote: > > This patch adds symbolic path to include/asm/arch directory and use gcc > > instead of ld to link final tinyx image. > > > > Signed-off-by: David Cohen <da...@gm...> > > --- > > Makefile | 14 ++++++++------ > > 1 files changed, 8 insertions(+), 6 deletions(-) > > > > diff --git a/Makefile b/Makefile > > index 3b0a471..f452c11 100644 > > --- a/Makefile > > +++ b/Makefile > > @@ -9,6 +9,7 @@ HOSTCFLAGS = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer > > CROSS_COMPILE ?= arm-linux- > > > > ARCH = arm7 > > +MODEL = lpc2xxx > > CPU would look better here. I agree. I' ll change to cpu. Br, David > > We could later, > if cpu_is_lpc2xxx() > and let gcc do the optimizations. > > > > > AS = $(CROSS_COMPILE)as > > LD = $(CROSS_COMPILE)ld > > @@ -19,7 +20,7 @@ STRIP = $(CROSS_COMPILE)strip > > OBJCOPY = $(CROSS_COMPILE)objcopy > > OBJDUMP = $(CROSS_COMPILE)objdump > > AWK = awk > > -CFLAGS = -Wall -Os -mcpu=arm7tdmi > > +CFLAGS = -Wall -Os -mcpu=arm7tdmi -nostdlib > > INCLUDES = -Iinclude -Iinclude/libc > > > > PYTHON = python > > @@ -28,14 +29,15 @@ MAKEFLAGS += --no-print-directory > > > > all-sources = $(shell git-ls-files) > > > > -export ARCH AS LD CC AR NM STRIP OBJCOPY OBJDUMP AWK CFLAGS PYTHON INCLUDES > > +export ARCH MODEL AS LD CC AR NM STRIP OBJCOPY OBJDUMP AWK CFLAGS PYTHON INCLUDES > > > > tinyx.dirs = lib/ arch/ kernel/ > > > > tinyx.objs = $(patsubst %/, %/tyx_part.o, $(tinyx.dirs)) > > > > -$(shell rm -f $(tinyx.objs) include/asm) > > +$(shell rm -f $(tinyx.objs) include/asm/arch include/asm) > > $(shell ln -s asm-$(ARCH) include/asm) > > +$(shell ln -s arch-$(MODEL) include/asm/arch) > > > > _all: > > > > @@ -52,7 +54,8 @@ tinyx.hex: tinyx.elf > > $(OBJCOPY) -O ihex build/$< build/$@ > > > > tinyx.elf: $(tinyx.objs) > > - $(LD) -EL -T arch/$(ARCH)/kernel/kernel.ld -o build/$@ $(tinyx.objs) > > + #$(LD) -EL -T arch/$(ARCH)/kernel/kernel.ld -o build/$@ $(tinyx.objs) > > + $(CC) -Xlinker --script=arch/$(ARCH)/kernel/kernel.ld -o build/$@ $(tinyx.objs) > > > > $(tinyx.objs): > > @$(MAKE) target=$@ -f scripts/Makefile.build > > @@ -63,7 +66,6 @@ endef > > > > tags: > > $(call xtags, ctags) > > - > > .PHONY: clean > > clean: > > @cleandirs="$(shell $(PYTHON) scripts/expandtree.py $(tinyx.dirs))"; \ > > @@ -72,6 +74,6 @@ clean: > > cleanobjs="$$cleanobjs $$dir*.o"; \ > > done; \ > > echo "rm -f $$cleanobjs include/asm build/tinyx.hex build/tinyx.elf build/tinyx.deps"; \ > > - rm -f $$cleanobjs include/asm build/tinyx.hex build/tinyx.elf build/tinyx.deps; > > + rm -f $$cleanobjs include/asm/arch include/asm build/tinyx.hex build/tinyx.elf build/tinyx.deps; > > > > > > -- > > 1.5.3.7 > > > > > > ------------------------------------------------------------------------- > > Check out the new SourceForge.net Marketplace. > > It's the best place to buy or sell services for > > just about anything Open Source. > > http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace > > _______________________________________________ > > Tinyx-devel mailing list > > Tin...@li... > > https://lists.sourceforge.net/lists/listinfo/tinyx-devel > > -- > Best Regards, > > Felipe Balbi > me...@fe... > http://blog.felipebalbi.com |