CRUX-ARM : Home

Home :: Documentation :: Download :: Development :: Community :: Ports :: Packages :: Bugs :: Links :: About :: Donors
Added libtool to our toolchain to avoid issues with the host one
authorJose V Beneyto <sepen@crux.nu>
Wed, 14 Aug 2013 13:07:42 +0000 (13:07 +0000)
committerJose V Beneyto <sepen@crux.nu>
Wed, 14 Aug 2013 13:07:42 +0000 (13:07 +0000)
Makefile
vars.mk

index d1f7a6ba97b23e819ddc8802c5191ab887e4b439..90dcf8c47345229afb9855650bf1238be0db45d1 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -6,11 +6,11 @@ include vars.mk
 
 .PHONY: all clean distclean
 
-all: linux-headers libgmp libmpfr libmpc binutils gcc-static glibc gcc-final setup test
+all: linux-headers libgmp libmpfr libmpc binutils gcc-static glibc gcc-final libtool setup test
 
-clean: linux-headers-clean libgmp-clean libmpfr-clean libmpc-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 libtool-clean test-clean
 
-distclean: clean linux-headers-distclean libgmp-distclean libmpfr-distclean libmpc-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 libtool-distclean test-distclean
 
 
 # LINUX HEADERS
@@ -137,7 +137,7 @@ $(WORK)/binutils-$(BINUTILS_VERSION): $(WORK)/binutils-$(BINUTILS_VERSION).tar.b
 
 $(WORK)/build-binutils: $(WORK)/binutils-$(BINUTILS_VERSION)
        mkdir -p $(WORK)/build-binutils
-       touch $(WORK)/build-binutils-build
+       touch $(WORK)/build-binutils
 
 $(CLFS)/usr/include/libiberty.h: $(WORK)/build-binutils
        cd $(WORK)/build-binutils && \
@@ -275,6 +275,36 @@ 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
 $(CLFS)/var/lib/pkg/db:
        install -d -m 0755 $(CLFS)/var/lib/pkg
diff --git a/vars.mk b/vars.mk
index 939d8c809a64a4cfda8caf25c446d1e7af88303a..6708bb98ec486f9fc29f4305ab57ef44f3e98113 100644 (file)
--- a/vars.mk
+++ b/vars.mk
@@ -17,6 +17,7 @@ LIBMPC_VERSION = 1.0.1
 BINUTILS_VERSION = 2.23.1
 GCC_VERSION = 4.7.3
 GLIBC_VERSION = 2.16.0
+LIBTOOL_VERSION = 2.4.2
 
 ABI = aapcs-linux
 MODE = arm