X-Git-Url: http://gitweb/?a=blobdiff_plain;f=Makefile;h=ae6909d1593f218b6f4f3f36ccb6b627fc34eb92;hb=e50788ed2c5af06da38392bef9c444918d8fef74;hp=fd4a5d117a1c33e42dd0e359456baaefe76a2e5d;hpb=eedac697e12939a79d51a64b4371c48be79ec2d0;p=toolchain-softfp.git diff --git a/Makefile b/Makefile index fd4a5d1..ae6909d 100644 --- a/Makefile +++ b/Makefile @@ -6,16 +6,16 @@ include vars.mk .PHONY: all clean distclean -all: linux-headers libgmp libmpfr binutils gcc-static glibc gcc-final test +all: linux-headers libgmp libmpfr libmpc binutils gcc-static glibc gcc-final setup test -clean: linux-headers-clean libgmp-clean libmpfr-clean binutils-clean gcc-static-clean glibc-clean gcc-final-clean test-clean +clean: linux-headers-clean libgmp-clean libmpfr-clean libmpc-clean binutils-clean gcc-static-clean glibc-clean gcc-final-clean test-clean -distclean: clean linux-headers-distclean libgmp-distclean libmpfr-distclean binutils-distclean gcc-static-distclean glibc-distclean gcc-final-distclean test-distclean +distclean: clean linux-headers-distclean libgmp-distclean libmpfr-distclean libmpc-distclean binutils-distclean gcc-static-distclean glibc-distclean gcc-final-distclean test-distclean # LINUX HEADERS $(WORK)/linux-$(KERNEL_HEADERS_VERSION).tar.bz2: - wget -P $(WORK) -c ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-$(KERNEL_HEADERS_VERSION).tar.bz2 + wget -P $(WORK) -c ftp://ftp.kernel.org/pub/linux/kernel/v3.0/linux-$(KERNEL_HEADERS_VERSION).tar.bz2 $(WORK)/linux-$(KERNEL_HEADERS_VERSION): $(WORK)/linux-$(KERNEL_HEADERS_VERSION).tar.bz2 tar -C $(WORK) -xvjf $(WORK)/linux-$(KERNEL_HEADERS_VERSION).tar.bz2 @@ -69,10 +69,12 @@ 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 +$(WORK)/mpfr-$(LIBMPFR_VERSION): $(WORK)/mpfr-$(LIBMPFR_VERSION).tar.bz2 $(WORK)/libmpfr-3.1.1-p2.patch.gz tar -C $(WORK) -xvjf $(WORK)/mpfr-$(LIBMPFR_VERSION).tar.bz2 + cd $(WORK)/mpfr-$(LIBMPFR_VERSION) && \ + gunzip -c $(WORK)/libmpfr-$(LIBMPFR_VERSION)-p2.patch.gz | patch -p1 touch $(WORK)/mpfr-$(LIBMPFR_VERSION) $(WORK)/build-libmpfr: $(WORK)/mpfr-$(LIBMPFR_VERSION) @@ -96,14 +98,42 @@ libmpfr-distclean: libmpfr-clean rm -vrf $(WORK)/mpfr-$(LIBMPFR_VERSION).tar.bz2 +# LIBMPC +$(WORK)/mpc-$(LIBMPC_VERSION).tar.gz: + wget -P $(WORK) -c http://www.multiprecision.org/mpc/download/mpc-$(LIBMPC_VERSION).tar.gz + +$(WORK)/mpc-$(LIBMPC_VERSION): $(WORK)/mpc-$(LIBMPC_VERSION).tar.gz + tar -C $(WORK) -xvzf $(WORK)/mpc-$(LIBMPC_VERSION).tar.gz + touch $(WORK)/mpc-$(LIBMPC_VERSION) + +$(WORK)/build-libmpc: $(WORK)/mpc-$(LIBMPC_VERSION) + mkdir -p $(WORK)/build-libmpc + touch $(WORK)/build-libmpc + +$(CROSSTOOLS)/lib/libmpc.so: $(WORK)/build-libmpc + cd $(WORK)/build-libmpc && \ + unset CFLAGS && unset CXXFLAGS && \ + LDFLAGS="-Wl,-rpath,$(CROSSTOOLS)/lib" && \ + $(WORK)/mpc-$(LIBMPC_VERSION)/configure --prefix=$(CROSSTOOLS) \ + --enable-shared --with-gmp=$(CROSSTOOLS) --with-mpfr=$(CROSSTOOLS) && \ + make && make install || exit 1 + touch $(CROSSTOOLS)/lib/libmpc.so + +libmpc: $(CROSSTOOLS)/lib/libmpc.so + +libmpc-clean: + rm -vrf $(WORK)/build-libmpc $(WORK)/mpc-$(LIBMPC_VERSION) + +libmpc-distclean: libmpc-clean + rm -vrf $(WORK)/mpc-$(LIBMPC_VERSION).tar.bz2 + + # BINUTILS $(WORK)/binutils-$(BINUTILS_VERSION).tar.bz2: wget -P $(WORK) -c ftp://ftp.gnu.org/gnu/binutils/binutils-$(BINUTILS_VERSION).tar.bz2 -$(WORK)/binutils-$(BINUTILS_VERSION): $(WORK)/binutils-$(BINUTILS_VERSION).tar.bz2 $(WORK)/binutils-$(BINUTILS_VERSION)-branch_update-5.patch +$(WORK)/binutils-$(BINUTILS_VERSION): $(WORK)/binutils-$(BINUTILS_VERSION).tar.bz2 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) @@ -153,8 +183,8 @@ $(CROSSTOOLS)/lib/gcc: $(WORK)/build-gcc-static $(WORK)/gcc-$(GCC_VERSION) --without-headers --enable-__cxa_atexit --enable-symvers=gnu --disable-decimal-float \ --nfp --without-fp --with-softfloat-support=internal \ --disable-libgomp --disable-libmudflap --disable-libssp \ - --with-mpfr=$(CROSSTOOLS) --with-gmp=$(CROSSTOOLS) \ - --disable-shared --disable-threads --enable-languages=c && \ + --with-mpfr=$(CROSSTOOLS) --with-gmp=$(CROSSTOOLS) --with-mpc=$(CROSSTOOLS) \ + --disable-shared --disable-threads --enable-languages=c --disable-libquadmath && \ make && make install || exit 1 touch $(CROSSTOOLS)/lib/gcc @@ -173,13 +203,13 @@ $(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 tar -C $(WORK) -xvjf $(WORK)/glibc-$(GLIBC_VERSION).tar.bz2 cd $(WORK)/glibc-$(GLIBC_VERSION) && \ tar xvjf $(WORK)/glibc-ports-$(GLIBC_VERSION).tar.bz2 && \ mv glibc-ports-$(GLIBC_VERSION) ports && \ - sed -e 's/-lgcc_eh//g' -i Makeconfig + sed -e 's/-lgcc_eh//g' -e 's/-lgcc_s//g' -i Makeconfig touch $(WORK)/glibc-$(GLIBC_VERSION) $(WORK)/build-glibc: $(WORK)/glibc-$(GLIBC_VERSION) @@ -192,6 +222,7 @@ $(CLFS)/usr/lib/libc.so: $(WORK)/build-glibc $(WORK)/glibc-$(GLIBC_VERSION) echo "libc_cv_forced_unwind=yes" > config.cache && \ echo "libc_cv_c_cleanup=yes" >> config.cache && \ echo "libc_cv_gnu89_inline=yes" >> config.cache && \ + echo "libc_cv_ctors_header=yes" >> config.cache && \ echo "install_root=$(CLFS)" > configparms && \ unset CFLAGS && unset CXXFLAGS && \ BUILD_CC="gcc" CC="$(TARGET)-gcc" AR="$(TARGET)-ar" \ @@ -225,11 +256,11 @@ $(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-fp=no --with-headers=$(CLFS)/usr/include \ + --with-fp=no --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) \ - --enable-c99 --enable-long-long --enable-threads=posix && \ + --with-mpfr=$(CROSSTOOLS) --with-gmp=$(CROSSTOOLS) --with-mpc=$(CROSSTOOLS) \ + --enable-threads=posix --disable-libstdcxx-pch --disable-bootstrap --disable-libgomp && \ make AS_FOR_TARGET="$(TARGET)-as" LD_FOR_TARGET="$(TARGET)-ld" && \ make install || exit 1 touch $(CLFS)/lib/gcc @@ -243,6 +274,13 @@ gcc-final-distclean: gcc-final-clean rm -vf $(WORK)/gcc-$(GCC_VERSION).tar.bz2 +# SETUP FOR PKGUTILS +$(CLFS)/var/lib/pkg/db: + install -d -m 0755 $(CLFS)/var/lib/pkg + touch $(CLFS)/var/lib/pkg/db + +setup: $(CLFS)/var/lib/pkg/db + # TEST THE TOOLCHAIN $(WORK)/test: $(WORK)/test.c export PATH=$$PATH:$(CROSSTOOLS)/bin && \