X-Git-Url: http://gitweb/?a=blobdiff_plain;f=Makefile;h=22ec815a294876999b09888ec8e374523fc11ab5;hb=0f4b5968d5f3863323794a90426320c84aa699b5;hp=d209adc8663a569a52f96f1494ba07fcb4a4ee82;hpb=69e0d4ccc0fd99ca2db6a9a1ed16b8afa9be1625;p=attic%2Ftoolchain-noeabi.git diff --git a/Makefile b/Makefile index d209adc..22ec815 100644 --- a/Makefile +++ b/Makefile @@ -69,7 +69,7 @@ libgmp-distclean: libgmp-clean # LIBMPFR $(WORK)/mpfr-$(LIBMPFR_VERSION).tar.bz2: - wget -P $(WORK) -c http://www.mpfr.org/mpfr-current/mpfr-$(LIBMPFR_VERSION).tar.bz2 + wget -P $(WORK) -c http://ftp.gnu.org/gnu/mpfr/mpfr-$(LIBMPFR_VERSION).tar.bz2 $(WORK)/mpfr-$(LIBMPFR_VERSION): $(WORK)/mpfr-$(LIBMPFR_VERSION).tar.bz2 tar -C $(WORK) -xvjf $(WORK)/mpfr-$(LIBMPFR_VERSION).tar.bz2 @@ -104,6 +104,7 @@ $(WORK)/binutils-$(BINUTILS_VERSION): $(WORK)/binutils-$(BINUTILS_VERSION).tar.b tar -C $(WORK) -xvjf $(WORK)/binutils-$(BINUTILS_VERSION).tar.bz2 cd $(WORK)/binutils-$(BINUTILS_VERSION) && \ patch -p1 -i $(WORK)/binutils-$(BINUTILS_VERSION)-branch_update-5.patch + sed -i '/^SUBDIRS/s/doc//' $(WORK)/binutils-$(BINUTILS_VERSION)/*/Makefile.in touch $(WORK)/binutils-$(BINUTILS_VERSION) $(WORK)/build-binutils: $(WORK)/binutils-$(BINUTILS_VERSION) @@ -171,10 +172,11 @@ $(WORK)/glibc-$(GLIBC_VERSION).tar.bz2: $(WORK)/glibc-ports-$(GLIBC_VERSION).tar.bz2: wget -P $(WORK) -c ftp://ftp.gnu.org/gnu/glibc/glibc-ports-$(GLIBC_VERSION).tar.bz2 -$(WORK)/glibc-$(GLIBC_VERSION): $(WORK)/glibc-$(GLIBC_VERSION).tar.bz2 $(WORK)/glibc-ports-$(GLIBC_VERSION).tar.bz2 +$(WORK)/glibc-$(GLIBC_VERSION): $(WORK)/glibc-$(GLIBC_VERSION).tar.bz2 $(WORK)/glibc-ports-$(GLIBC_VERSION).tar.bz2 $(WORK)/glibc-$(GLIBC_VERSION)-make382.patch tar -C $(WORK) -xvjf $(WORK)/glibc-$(GLIBC_VERSION).tar.bz2 cd $(WORK)/glibc-$(GLIBC_VERSION) && \ + patch -p1 -i $(WORK)/glibc-$(GLIBC_VERSION)-make382.patch && \ tar xvjf $(WORK)/glibc-ports-$(GLIBC_VERSION).tar.bz2 && \ mv glibc-ports-$(GLIBC_VERSION) ports && \ sed -e 's/-lgcc_eh//g' -i Makeconfig @@ -196,7 +198,7 @@ $(CLFS)/usr/lib/libc.so: $(WORK)/build-glibc $(WORK)/glibc-$(GLIBC_VERSION) RANLIB="$(TARGET)-ranlib" \ $(WORK)/glibc-$(GLIBC_VERSION)/configure --prefix=/usr \ --libexecdir=/usr/lib/glibc --host=$(TARGET) --build=$(HOST) \ - --disable-profile --enable-addons --with-tls --enable-kernel=2.6.0 \ + --disable-profile --enable-add-ons --with-tls --enable-kernel=2.6.0 \ --with-__thread --with-binutils=$(CROSSTOOLS)/bin \ --with-headers=$(CLFS)/usr/include --cache-file=config.cache && \ make && make install || exit 1 @@ -223,6 +225,7 @@ $(CLFS)/lib/gcc: $(WORK)/build-gcc-final $(WORK)/gcc-$(GCC_VERSION) AR=ar LDFLAGS="-Wl,-rpath,$(CROSSTOOLS)/lib" \ $(WORK)/gcc-$(GCC_VERSION)/configure --prefix=$(CROSSTOOLS) \ --build=$(HOST) --host=$(HOST) --target=$(TARGET) \ + --with-headers=$(CLFS)/usr/include \ --disable-multilib --with-sysroot=$(CLFS) --disable-nls \ --enable-languages=c,c++ --enable-__cxa_atexit \ --with-mpfr=$(CROSSTOOLS) --with-gmp=$(CROSSTOOLS) \ @@ -241,28 +244,18 @@ gcc-final-distclean: gcc-final-clean # TEST THE TOOLCHAIN -$(WORK)/build-test: - mkdir -p $(WORK)/build-test - touch $(WORK)/build-test +$(WORK)/test: $(WORK)/test.c + export PATH=$$PATH:$(CROSSTOOLS)/bin && \ + unset CFLAGS && unset CXXFLAGS && unset CC && \ + AR=ar LDFLAGS="-Wl,-rpath,$(CROSSTOOLS)/lib" \ + $(TARGET)-gcc -Wall -o $(WORK)/test $(WORK)/test.c + [ "`file -b $(WORK)/test | cut -d',' -f2 | sed 's| ||g'`" = "ARM" ] || exit 1 + touch $(WORK)/test -$(WORK)/build-test/hello.c: $(WORK)/build-test - echo '#include ' > $(WORK)/build-test/hello.c - echo 'int main(int argc,char ** argv){printf("Hello World!\n");return 0;}' >> $(WORK)/build-test/hello.c - touch $(WORK)/build-test/hello.c - -$(WORK)/build-test/hello: $(WORK)/build-test/hello.c - cd $(WORK)/build-test && \ - export PATH=$$PATH:$(CROSSTOOLS)/bin && \ - unset CFLAGS && unset CXXFLAGS && unset CC && \ - AR=ar LDFLAGS="-Wl,-rpath,$(CROSSTOOLS)/lib" \ - $(TARGET)-gcc -Wall -o hello hello.c - [ "$$(file -b $(WORK)/build-test/hello | cut -d',' -f2 | sed 's| ||g' )" == "ARM" ] || exit 1 - touch $(WORK)/build-test/hello - -test: gcc-final $(WORK)/build-test/hello +test: gcc-final $(WORK)/test test-clean: - rm -vrf $(WORK)/build-test + rm -vrf $(WORK)/test test-distclean: test-clean