Troubles building a (nearly) unified tree

H. J. Lu hjl@lucon.org
Thu Nov 7 09:56:00 GMT 2002


On Thu, Nov 07, 2002 at 12:49:56PM -0500, Peter Barada wrote:
> 
> I'm having trouble trying to build an m68k-elf cross-copmiler from the
> ananymous cvs sources, and I 've checked out the gcc tree, the
> binutils tree ad the newlib tree.
> 
> I figured out pretty quickly that I wanted to leave the binutils and
> newlib trees together, and then attempted to configure it with:
> 
> mkdir -p obj/junk/m68k-elf ; cd obj/junk/m68k-elf
> ../../../src/configure --target=m68k-elf --prefix=/tmp/junk
> 
> and build it, but it failed since it was loking for the cross compiler
> to build it.
> 
> I placed in the src directory a link to the gcc tree (which was
> checked out at a peralle level to 'src') (cd src ; ln -s ../gcc
> gcc) and reconfigured, and that worked, but when I built it, it fails with:
> 

This is the Makefile I am using for making a combined source tree of
gcc 3.2 in CVS and the current binutils in CVS.

H.J.
----
GCC-SOURCE-DIR=../../../../gnu/src/gcc-3.2/gcc
BINUTILS-SOURCE-DIR=../../../src/binutils/binutils
GDB-SOURCE-DIR=../../../../gnu/src/gdb-5.3/gdb
GDB-SOURCE-DIR=
TOOLS-SOURCE-DIR=tools-3.2-$(shell date +%Y%m%d)

PATH:=$(HOME)/bin:$(PATH)

link:
	mkdir $(TOOLS-SOURCE-DIR) || (echo $(TOOLS-SOURCE-DIR) exist! && exit 1)
	cd $(TOOLS-SOURCE-DIR) && \
	lndir $(GCC-SOURCE-DIR) && \
	lndir $(BINUTILS-SOURCE-DIR) && \
	rm -rf mips libiberty include && \
	mkdir libiberty include && \
	cd libiberty && \
	lndir ../$(BINUTILS-SOURCE-DIR)/libiberty && \
	lndir ../$(GCC-SOURCE-DIR)/libiberty && \
	cd ../include && \
	lndir ../$(BINUTILS-SOURCE-DIR)/include && \
	lndir ../$(GCC-SOURCE-DIR)/include && \
	cd .. && \
	((test -n "$(GDB-SOURCE-DIR)" \
	  && lndir $(GDB-SOURCE-DIR)) || true) && \
	((test -x ../applied/README \
	  && ../applied/README) || true) && \
	cd ..
	rm -f tools
	ln -s $(TOOLS-SOURCE-DIR) tools

copy: link
	mv $(TOOLS-SOURCE-DIR) $(TOOLS-SOURCE-DIR).tmp
	mkdir $(TOOLS-SOURCE-DIR)
	cd $(TOOLS-SOURCE-DIR).tmp && \
	cp -afL . ../$(TOOLS-SOURCE-DIR)

tar:
	tar cfhj $(TOOLS-SOURCE-DIR).tar.bz2 $(TOOLS-SOURCE-DIR)

save:
	if [ -d $(TOOLS-SOURCE-DIR) ]; then \
	  rm -rf $(TOOLS-SOURCE-DIR).saved; \
	  mv $(TOOLS-SOURCE-DIR) $(TOOLS-SOURCE-DIR).saved; \
	fi



More information about the Gcc mailing list