CRUX-ARM : Home

Home :: Documentation :: Download :: Development :: Community :: Ports :: Packages :: Bugs :: Links :: About :: Donors
Fixed and cleanup libgmp stage in Makefile and config in vars.mk
[toolchain.git] / Makefile
index 2404d50c51116ed49db191e45238aefb71fdb1d5..b09b9df5297efeca890ea39ee92b0803a87b7bfe 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -6,11 +6,12 @@ include vars.mk
 
 .PHONY: all clean distclean
 
-all: linux-headers libgmp libmpfr libmpc binutils gcc-static glibc gcc-final libtool setup test
+all: linux-headers libgmp libmpfr libmpc binutils gcc-static glibc gcc-final setup test
 
-clean: linux-headers-clean libgmp-clean libmpfr-clean libmpc-clean binutils-clean gcc-static-clean glibc-clean gcc-final-clean libtool-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
+       rm -rvf $(CROSSTOOLS) $(CLFS)
 
-distclean: clean linux-headers-distclean libgmp-distclean libmpfr-distclean libmpc-distclean binutils-distclean gcc-static-distclean glibc-distclean gcc-final-distclean libtool-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
@@ -44,6 +45,7 @@ $(WORK)/gmp-$(LIBGMP_VERSION).tar.bz2:
 
 $(WORK)/gmp-$(LIBGMP_VERSION): $(WORK)/gmp-$(LIBGMP_VERSION).tar.bz2
        tar -C $(WORK) -xvjf $(WORK)/gmp-$(LIBGMP_VERSION).tar.bz2
+       mv `find $(WORK) -type d -name 'gmp-*'` $(WORK)/gmp-$(LIBGMP_VERSION)
        touch $(WORK)/gmp-$(LIBGMP_VERSION)
 
 $(WORK)/build-libgmp: $(WORK)/gmp-$(LIBGMP_VERSION)
@@ -184,7 +186,7 @@ $(CROSSTOOLS)/lib/gcc: $(WORK)/build-gcc-static $(WORK)/gcc-$(GCC_VERSION)
                --disable-libgomp --disable-libmudflap --disable-libssp \
                --with-mpfr=$(CROSSTOOLS) --with-gmp=$(CROSSTOOLS) --with-mpc=$(CROSSTOOLS) \
                --disable-shared --disable-threads --enable-languages=c --disable-libquadmath \
-               --with-abi=$(ABI) --with-arch=$(ARCH) --with-mode=$(MODE) --with-float=$(FLOAT) --with-fpu=$(FPU) && \
+               --with-abi=$(ABI) --with-mode=$(MODE) --with-float=$(FLOAT) && \
                make all-gcc all-target-libgcc && make install-gcc install-target-libgcc || exit 1
        touch $(CROSSTOOLS)/lib/gcc
 
@@ -201,15 +203,8 @@ gcc-static-distclean: gcc-static-clean
 $(WORK)/glibc-$(GLIBC_VERSION).tar.bz2:
        wget -P $(WORK) -c ftp://ftp.gnu.org/gnu/glibc/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
        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' -e 's/-lgcc_s//g' -i Makeconfig
        touch $(WORK)/glibc-$(GLIBC_VERSION)
 
 $(WORK)/build-glibc: $(WORK)/glibc-$(GLIBC_VERSION)
@@ -221,7 +216,6 @@ $(CLFS)/usr/lib/libc.so: $(WORK)/build-glibc $(WORK)/glibc-$(GLIBC_VERSION)
                export PATH=$(CROSSTOOLS)/bin:$$PATH && \
                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 && \
@@ -261,7 +255,7 @@ $(CLFS)/lib/gcc: $(WORK)/build-gcc-final $(WORK)/gcc-$(GCC_VERSION)
                --enable-languages=c,c++ --enable-__cxa_atexit \
                --enable-threads=posix --disable-libstdcxx-pch --disable-bootstrap --disable-libgomp \
                --with-mpfr=$(CROSSTOOLS) --with-gmp=$(CROSSTOOLS) --with-mpc=$(CROSSTOOLS) \
-               --with-abi=$(ABI) --with-arch=$(ARCH) --with-mode=$(MODE) --with-float=$(FLOAT) --with-fpu=$(FPU) && \
+               --with-abi=$(ABI) --with-mode=$(MODE) --with-float=$(FLOAT) && \
                make AS_FOR_TARGET="$(TARGET)-as" LD_FOR_TARGET="$(TARGET)-ld" && \
                make install || exit 1
        touch $(CLFS)/lib/gcc
@@ -275,37 +269,6 @@ gcc-final-distclean: gcc-final-clean
        rm -vf $(WORK)/gcc-$(GCC_VERSION).tar.bz2
 
 
-# LIBTOOL
-
-$(WORK)/libtool-$(LIBTOOL_VERSION).tar.xz:
-       wget -P $(WORK) -c http://ftp.gnu.org/gnu/libtool/libtool-$(LIBTOOL_VERSION).tar.xz
-
-$(WORK)/libtool-$(LIBTOOL_VERSION): $(WORK)/libtool-$(LIBTOOL_VERSION).tar.xz
-       tar -C $(WORK) -xvJf $(WORK)/libtool-$(LIBTOOL_VERSION).tar.xz
-       touch $(WORK)/libtool-$(LIBTOOL_VERSION)
-
-$(WORK)/build-libtool: $(WORK)/libtool-$(LIBTOOL_VERSION)
-       mkdir -p $(WORK)/build-libtool
-       touch $(WORK)/build-libtool
-
-$(CROSSTOOLS)/lib/libltdl.so: $(WORK)/build-libtool $(WORK)/libtool-$(LIBTOOL_VERSION)
-       cd $(WORK)/build-libtool && \
-               unset CFLAGS && unset CXXFLAGS && \
-               LDFLAGS="-Wl,-rpath,$(CROSSTOOLS)/lib" && \
-               $(WORK)/libtool-$(LIBTOOL_VERSION)/configure --prefix=$(CROSSTOOLS) \
-               --program-prefix=$(TARGET)- && \
-               make && make install || exit 1
-       touch $(CROSSTOOLS)/lib/libltdl.so
-
-libtool: gcc-final $(CROSSTOOLS)/lib/libltdl.so
-
-libtool-clean:
-       rm -vrf $(WORK)/build-libtool $(WORK)/libtool-$(LIBTOOL_VERSION)
-
-libtool-distclean:
-       rm -vf $(WORK)/libtool-$(LIBTOOL_VERSION).tar.xz
-
-
 # SETUP FOR PKGUTILS-CROSS
 $(CLFS)/var/lib/pkg/db:
        install -d -m 0755 $(CLFS)/var/lib/pkg