From: Michael Tremer Date: Mon, 5 May 2008 17:42:31 +0000 (+0200) Subject: Modified the uClibc toolchain and added new tools to it. X-Git-Tag: v3.0-alpha1~1025^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=fcfe88f5cb6807cf229ef10616fdcc03559af088;p=ipfire-3.x.git Modified the uClibc toolchain and added new tools to it. --- diff --git a/config/busybox/.config b/config/busybox/.config index af3e259ad..94a39b133 100644 --- a/config/busybox/.config +++ b/config/busybox/.config @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit # Busybox version: 1.10.0 -# Sat Apr 26 17:29:28 2008 +# Sun May 4 18:11:59 2008 # CONFIG_HAVE_DOT_CONFIG=y @@ -58,7 +58,7 @@ CONFIG_NO_DEBUG_LIB=y # # Installation Options # -# CONFIG_INSTALL_NO_USR is not set +CONFIG_INSTALL_NO_USR=y CONFIG_INSTALL_APPLET_SYMLINKS=y # CONFIG_INSTALL_APPLET_HARDLINKS is not set # CONFIG_INSTALL_APPLET_SCRIPT_WRAPPERS is not set diff --git a/lfs/adjust-toolchain b/lfs/adjust-toolchain index 11c6b3e43..4c8384a14 100644 --- a/lfs/adjust-toolchain +++ b/lfs/adjust-toolchain @@ -78,10 +78,10 @@ ifeq "$(STAGE)" "base" endif ifeq "$(STAGE)" "uclibc" - $(UCLIBC_TARGET)-gcc -dumpspecs \ - > $$($(UCLIBC_TARGET)-gcc --print-file specs) - sed -e 's/%{shared:-lc}/%{!nointl: -lintl} &/' \ - -i $$($(UCLIBC_TARGET)-gcc --print-file specs) + #$(UCLIBC_TARGET)-gcc -dumpspecs \ + # > $$($(UCLIBC_TARGET)-gcc --print-file specs) + #sed -e 's/%{shared:-lc}/%{!nointl: -lintl} &/' \ + # -i $$($(UCLIBC_TARGET)-gcc --print-file specs) mv -v $(UCLIBC_DIR)/$(UCLIBC_TARGET)/bin/{ld,ld-old} mv -v $(UCLIBC_DIR)/$(UCLIBC_TARGET)/bin/{ld-new,ld} ln -sfv ../$(UCLIBC_TARGET)/bin/ld \ diff --git a/lfs/cpio b/lfs/cpio index 49761993c..55d86c974 100644 --- a/lfs/cpio +++ b/lfs/cpio @@ -53,10 +53,24 @@ $(patsubst %,$(DIR_DL)/%,$(objects)) : $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) @$(PREBUILD) @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE) + +ifeq "$(STAGE)" "ipfire" cd $(DIR_APP) && ./configure CPIO_MT_PROG=mt --prefix=/usr \ --bindir=/bin --libexecdir=/tmp \ --with-rmt=/usr/sbin/rmt cd $(DIR_APP) && make -j $(PARALLELISM) cd $(DIR_APP) && make install +endif + +ifeq "$(STAGE)" "uclibc" + cd $(DIR_APP) && ./configure CPIO_MT_PROG=mt --prefix=/usr \ + --bindir=/bin --libexecdir=/tmp \ + --with-rmt=/usr/sbin/rmt \ + --build=$(IFS_TARGET) \ + --host=$(UCLIBC_TARGET) + cd $(DIR_APP) && make -j $(PARALLELISM) + cd $(DIR_APP) && make install DESTDIR=$(UCLIBC_DIR) +endif + @rm -rf $(DIR_APP) @$(POSTBUILD) diff --git a/lfs/e2fsprogs b/lfs/e2fsprogs index a12e61d53..0fbdf0c6f 100644 --- a/lfs/e2fsprogs +++ b/lfs/e2fsprogs @@ -25,7 +25,10 @@ include Config PKG_NAME = e2fsprogs -VER = 1.40.8 +VER = 1.40.3 + +## XXX - This was downgraded because uClibc leaks a function: +## ../../lib/libuuid.so: undefined reference to `___tls_get_addr' THISAPP = $(PKG_NAME)-$(VER) DL_FILE = $(THISAPP).tar.gz @@ -70,11 +73,18 @@ ifeq "$(STAGE)" "base" endif ifeq "$(STAGE)" "uclibc" - cd $(DIR_APP)/build && ../configure --prefix=/usr --with-root-prefix="" \ - --enable-elf-shlibs --build=$(IFS_TARGET) --host=$(UCLIBC_TARGET) + cd $(DIR_APP)/build && ../configure --prefix=/usr \ + --with-root-prefix="" \ + --enable-elf-shlibs \ + --build=$(IFS_TARGET) \ + --host=$(UCLIBC_TARGET) \ + --with-cc=$(UCLIBC_TARGET)-gcc \ + --with-linker=$(UCLIBC_TARGET)-ld cd $(DIR_APP)/build && make -j $(PARALLELISM) - cd $(DIR_APP)/build && make install DESTDIR=$(UCLIBC_DIR) - cd $(DIR_APP)/build && make install-libs DESTDIR=$(UCLIBC_DIR) + cd $(DIR_APP)/build && make install install-libs DESTDIR=$(UCLIBC_DIR) + for lib in libblkid.so.1 libcom_err.so.2 libe2p.so.2 libext2fs.so.2 libss.so.2 libuuid.so.1; do \ + ln -svf $$lib $(UCLIBC_DIR)/lib/$$(awk -F. '{ print $$1"."$$2 }' <<< $$lib) || exit 1; \ + done endif @rm -rf $(DIR_APP) diff --git a/lfs/gcc b/lfs/gcc index 28fa29417..dbf9c5d9a 100644 --- a/lfs/gcc +++ b/lfs/gcc @@ -275,6 +275,7 @@ ifeq "$(PASS)" "2" --enable-languages=c,c++ \ --disable-multilib \ --disable-libmudflap \ + --disable-libgomp \ --with-gnu-ld \ --disable-nls cd $(DIR_SRC)/gcc-build && make -j $(PARALLELISM) diff --git a/lfs/glibc b/lfs/glibc index 486b833de..2af5c7d06 100644 --- a/lfs/glibc +++ b/lfs/glibc @@ -99,6 +99,8 @@ ifeq "$(STAGE)" "base" # Locales -mkdir -pv /usr/lib/locale + localedef -i de_DE -f UTF-8 de_DE.UTF-8 + localedef -i de_DE -f ISO-8859-1 de_DE localedef -i en_US -f UTF-8 en_US.UTF-8 localedef -i en_US -f ISO-8859-1 en_US localedef -i en_GB -f UTF-8 en_GB.UTF-8 diff --git a/lfs/kudzu b/lfs/kudzu index 51f2c835e..18cd20473 100644 --- a/lfs/kudzu +++ b/lfs/kudzu @@ -53,8 +53,28 @@ $(patsubst %,$(DIR_DL)/%,$(objects)) : $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) @$(PREBUILD) @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE) + +ifeq "$(STAGE)" "ipfire" cd $(DIR_APP) && ARCH=$(MACHINE) RPM_OPT_FLAGS="$(CFLAGS) -I/usr/include" make #-j $(PARALLELISM) cd $(DIR_APP) && ARCH=$(MACHINE) RPM_OPT_FLAGS="$(CFLAGS)" make install cd $(DIR_APP) && ARCH=$(MACHINE) RPM_OPT_FLAGS="$(CFLAGS)" make install-program +endif + +ifeq "$(STAGE)" "uclibc" + cd $(DIR_APP) && sed -e "s/^AR = ar//" -e "s/^RANLIB = ranlib//" \ + -i Makefile + cd $(DIR_APP) && sed -e "s@ln -s ../../sbin/kudzu \$$(usbindir)/kudzu@@" \ + -i Makefile + cd $(DIR_APP) && \ + ARCH=$(MACHINE) \ + RPM_OPT_FLAGS="$(CFLAGS) -I$(UCLIBC_DIR)/usr/include" \ + CC=$(UCLIBC_TARGET)-gcc \ + AR=$(UCLIBC_TARGET)-ar \ + RANLIB=$(UCLIBC_TARGET)-ranlib \ + make -j $(PARALLELISM) + cd $(DIR_APP) && ARCH=$(MACHINE) RPM_OPT_FLAGS="$(CFLAGS)" make install DESTDIR=$(UCLIBC_DIR) + cd $(DIR_APP) && ARCH=$(MACHINE) RPM_OPT_FLAGS="$(CFLAGS)" make install-program DESTDIR=$(UCLIBC_DIR) +endif + @rm -rf $(DIR_APP) @$(POSTBUILD) diff --git a/lfs/lzma b/lfs/lzma index acc2eafb1..506b2fd0f 100644 --- a/lfs/lzma +++ b/lfs/lzma @@ -54,13 +54,26 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) @$(PREBUILD) @rm -rf $(DIR_SRC)/$(THISAPP) && mkdir $(DIR_SRC)/$(THISAPP) @cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE) -C $(THISAPP) - + +ifeq "$(STAGE)" "ipfire" cd $(DIR_APP) && make -C CPP/7zip/Compress/LZMA_Alone \ -f makefile.gcc -j $(PARALLELISM) CXX="g++ $(CXXFLAGS)" CXX_C="gcc $(CFLAGS)" install -m 755 \ $(DIR_APP)/CPP/7zip/Compress/LZMA_Alone/lzma \ /usr/bin/lzma_sdk +endif + +ifeq "$(STAGE)" "uclibc" + cd $(DIR_APP) && make -C CPP/7zip/Compress/LZMA_Alone \ + -f makefile.gcc -j $(PARALLELISM) \ + CXX="$(UCLIBC_TARGET)-g++ $(CXXFLAGS)" \ + CXX_C="$(UCLIBC_TARGET)-gcc $(CFLAGS)" + + install -m 755 \ + $(DIR_APP)/CPP/7zip/Compress/LZMA_Alone/lzma \ + $(UCLIBC_DIR)/bin/lzma_sdk +endif @rm -rf $(DIR_APP) @$(POSTBUILD) diff --git a/lfs/newt b/lfs/newt index 299a6eaa5..21aee164a 100644 --- a/lfs/newt +++ b/lfs/newt @@ -55,8 +55,23 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE) cd $(DIR_APP) && patch -Np1 < $(DIR_PATCHES)/$(THISAPP)-snack.patch cd $(DIR_APP) && patch -Np1 < $(DIR_PATCHES)/$(THISAPP)-whiptail.patch - cd $(DIR_APP) && ./configure --prefix=/usr --without-gpm-support --without-tcl + +ifeq "$(STAGE)" "ipfire" + cd $(DIR_APP) && ./configure --prefix=/usr --without-gpm-support \ + --without-tcl cd $(DIR_APP) && make -j $(PARALLELISM) cd $(DIR_APP) && make install +endif + +ifeq "$(STAGE)" "uclibc" + cd $(DIR_APP) && ./configure --prefix=$(UCLIBC_DIR)/usr \ + --without-gpm-support \ + --without-tcl \ + --build=$(IFS_TARGET) \ + --host=$(UCLIBC_TARGET) + cd $(DIR_APP) && make -j $(PARALLELISM) + cd $(DIR_APP) && make install +endif + @rm -rf $(DIR_APP) @$(POSTBUILD) diff --git a/lfs/parted b/lfs/parted index 7f6a0b190..04da6c68f 100644 --- a/lfs/parted +++ b/lfs/parted @@ -56,16 +56,38 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) @$(PREBUILD) @rm -rf $(DIR_APP) $(DIR_SRC)/$(PYPARTED) @cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE) - cd $(DIR_APP) && ./configure --prefix=/usr --without-readline --disable-nls \ - --disable-Werror --disable-dependency-tracking --disable-debug --with-gnu-ld + +ifeq "$(STAGE)" "ipfire" + cd $(DIR_APP) && ./configure --prefix=/usr \ + --without-readline \ + --disable-nls \ + --disable-Werror \ + --disable-dependency-tracking \ + --disable-debug \ + --with-gnu-ld cd $(DIR_APP) && make -j $(PARALLELISM) cd $(DIR_APP) && make install +endif + +ifeq "$(STAGE)" "uclibc" + cd $(DIR_APP) && ./configure --prefix=/usr \ + --build=$(IFS_TARGET) \ + --host=$(UCLIBC_TARGET) \ + --without-readline \ + --disable-nls \ + --disable-Werror \ + --disable-dependency-tracking \ + --disable-debug \ + --with-gnu-ld + cd $(DIR_APP) && make -j $(PARALLELISM) + cd $(DIR_APP) && make install DESTDIR=$(UCLIBC_DIR) ### pyparted # - cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(PYPARTED).tar.bz2 - cd $(DIR_SRC)/$(PYPARTED) && make all install \ - libdir=/usr/lib/python2.5/site-packages + #cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(PYPARTED).tar.bz2 + #cd $(DIR_SRC)/$(PYPARTED) && make all install \ + # libdir=$(UCLIBC_DIR)/usr/lib/python2.5/site-packages +endif @rm -rf $(DIR_APP) $(DIR_SRC)/$(PYPARTED) @$(POSTBUILD) diff --git a/lfs/pciutils b/lfs/pciutils index 06d151919..3f54d70c8 100644 --- a/lfs/pciutils +++ b/lfs/pciutils @@ -56,10 +56,24 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) cd $(DIR_APP) && sed -i 's/null ;/null 2>\&1 ;/' update-pciids.sh cd $(DIR_APP) && patch -Np1 -i $(DIR_PATCHES)/$(THISAPP)-sata.patch cd $(DIR_APP) && patch -Np1 -i $(DIR_PATCHES)/$(THISAPP)-devicetype.patch - cd $(DIR_APP) && make PREFIX=/usr $(MAKETUNING) + +ifeq "$(STAGE)" "ipfire" + cd $(DIR_APP) && make OPT=$(CLFLAGS) PREFIX=/usr -j $(PARALLELISM) cd $(DIR_APP) && make PREFIX=/usr install install -v -m 755 -d /usr/include/pci cd $(DIR_APP) && install -v -m 644 lib/libpci.a /usr/lib cd $(DIR_APP) && install -v -m 644 lib/*.h /usr/include/pci +endif + +ifeq "$(STAGE)" "uclibc" + cd $(DIR_APP) && sed -e "s/^\tar/\t$(UCLIBC_TARGET)-ar/" \ + -e "s/^\tranlib/\t$(UCLIBC_TARGET)-ranlib/" -i lib/Makefile + cd $(DIR_APP)/lib && ./configure /usr/share $(VER) $(UCLIBC_TARGET) $(KVER) + cd $(DIR_APP)/lib && make OPT=$(CLFLAGS) PREFIX=$(UCLIBC_DIR)/usr \ + HOST=$(UCLIBC_TARGET) CC=$(UCLIBC_TARGET)-gcc -j $(PARALLELISM) + install -v -m 755 -d $(UCLIBC_DIR)/usr/include/pci + cd $(DIR_APP) && install -v -m 644 lib/libpci.a $(UCLIBC_DIR)/usr/lib + cd $(DIR_APP) && install -v -m 644 lib/*.h $(UCLIBC_DIR)/usr/include/pci +endif @rm -rf $(DIR_APP) @$(POSTBUILD) diff --git a/lfs/pcre b/lfs/pcre index 212dc906e..ddb7b50f2 100644 --- a/lfs/pcre +++ b/lfs/pcre @@ -54,15 +54,27 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) @$(PREBUILD) @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE) cd $(DIR_APP) && patch -Np1 -i $(DIR_PATCHES)/$(THISAPP)-abi_breakage-1.patch - cd $(DIR_APP) && ./configure --prefix=/usr \ - --docdir=/usr/share/doc/pcre-$(VER) \ - --enable-utf8 \ - --enable-pcregrep-libz \ - --enable-pcregrep-libbz2 - + +ifeq "$(STAGE)" "base" + cd $(DIR_APP) && ./configure --prefix=/usr \ + --docdir=/usr/share/doc/pcre-$(VER) \ + --enable-utf8 \ + --enable-pcregrep-libz \ + --enable-pcregrep-libbz2 cd $(DIR_APP) && make -j $(PARALLELISM) cd $(DIR_APP) && make install mv -v /usr/lib/libpcre.so.* /lib/ ln -v -sf ../../lib/libpcre.so.0 /usr/lib/libpcre.so +endif + +ifeq "$(STAGE)" "uclibc" + cd $(DIR_APP) && ./configure --prefix=/usr \ + --enable-utf8 \ + --build=$(IFS_TARGET) \ + --host=$(UCLIBC_TARGET) + cd $(DIR_APP) && make -j $(PARALLELISM) + cd $(DIR_APP) && make install DESTDIR=$(UCLIBC_DIR) +endif + @rm -rf $(DIR_APP) @$(POSTBUILD) diff --git a/lfs/popt b/lfs/popt index 7e543ecc1..4064f272c 100644 --- a/lfs/popt +++ b/lfs/popt @@ -54,8 +54,24 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) @$(PREBUILD) @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE) cd $(DIR_APP) && sed -i -e "/*origOptString ==/c 0)" popt.c + +ifeq "$(STAGE)" "ipfire" cd $(DIR_APP) && ./configure --prefix=/usr cd $(DIR_APP) && make -j $(PARALLELISM) cd $(DIR_APP) && make install +endif + +ifeq "$(STAGE)" "uclibc" + cd $(DIR_APP) && \ + CC=$(UCLIBC_TARGET)-gcc \ + AR=$(UCLIBC_TARGET)-ar \ + AS=$(UCLIBC_TARGET)-as \ + LD=$(UCLIBC_TARGET)-ld \ + RANLIB=$(UCLIBC_TARGET)-ranlib \ + ./configure --prefix=/usr + cd $(DIR_APP) && make -j $(PARALLELISM) + cd $(DIR_APP) && make install DESTDIR=$(UCLIBC_DIR) +endif + @rm -rf $(DIR_APP) @$(POSTBUILD) diff --git a/lfs/python b/lfs/python index 055ae6cb3..4c9f52f69 100644 --- a/lfs/python +++ b/lfs/python @@ -37,7 +37,9 @@ TARGET = $(DIR_INFO)/$(STAGE_ORDER)_$(STAGE)/$(THISAPP) # Top-level Rules ############################################################################### -objects = $(DL_FILE) $(THISAPP)-gdbm-1.patch +objects = $(DL_FILE) $(THISAPP)-gdbm-1.patch \ + $(THISAPP)-crosscompile-1.patch \ + $(THISAPP)-crosscompile-2.patch install: $(TARGET) @@ -53,11 +55,39 @@ $(patsubst %,$(DIR_DL)/%,$(objects)) : $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) @$(PREBUILD) @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE) + +ifeq "$(STAGE)" "ipfire" cd $(DIR_APP) && patch -Np1 -i $(DIR_PATCHES)/$(THISAPP)-gdbm-1.patch cd $(DIR_APP) && OPT="$(CFLAGS)" ./configure --prefix=/usr \ - --enable-shared \ - --disable-ipv6 + --enable-shared \ + --disable-ipv6 cd $(DIR_APP) && make -j $(PARALLELISM) cd $(DIR_APP) && make install +endif + +ifeq "$(STAGE)" "uclibc" + cd $(DIR_APP) && patch -Np0 -i $(DIR_PATCHES)/$(THISAPP)-crosscompile-1.patch + cd $(DIR_APP) && patch -Np1 -i $(DIR_PATCHES)/$(THISAPP)-crosscompile-2.patch + cd $(DIR_APP) && ./configure + cd $(DIR_APP) && make -j $(PARALLELISM) python Parser/pgen + cd $(DIR_APP) && mv -vf python hostpython + cd $(DIR_APP) && mv -vf Parser/pgen Parser/hostpgen + cd $(DIR_APP) && make distclean + cd $(DIR_APP) && sed -i -e '/^HOSTPYTHON/s:=.*:=./hostpython:' \ + -e '/^HOSTPGEN/s:=.*:=./Parser/hostpgen:' \ + Makefile.pre.in + -rm -rf $(DIR_APP)/Lib/test $(UCLIBC_DIR)/usr/lib/python2.5/test + cd $(DIR_APP) && OPT="$(CFLAGS)" ./configure --prefix=/usr \ + --build=$(IFS_TARGET) \ + --host=$(UCLIBC_TARGET) \ + --enable-shared \ + --disable-ipv6 \ + --with-cxx=no + cd $(DIR_APP) && make -j $(PARALLELISM) \ + HOSTPYTHON=./hostpython HOSTPGEN=./Parser/hostpgen + cd $(DIR_APP) && make install DESTDIR=$(UCLIBC_DIR) \ + HOSTPYTHON=./hostpython HOSTPGEN=./Parser/hostpgen +endif + @rm -rf $(DIR_APP) @$(POSTBUILD) diff --git a/lfs/readline b/lfs/readline index 9b898e6e1..186dce369 100644 --- a/lfs/readline +++ b/lfs/readline @@ -56,7 +56,8 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) cd $(DIR_APP) && sed -i '/MV.*old/d' Makefile.in cd $(DIR_APP) && sed -i '/{OLDSUFF}/c:' support/shlib-install cd $(DIR_APP) && patch -Np1 -i $(DIR_PATCHES)/$(THISAPP)-fixes-5.patch - + +ifeq "$(STAGE)" "base" cd $(DIR_APP) && ./configure --prefix=/usr --libdir=/lib cd $(DIR_APP) && make -j $(PARALLELISM) SHLIB_LIBS=-lncurses @@ -66,5 +67,19 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) rm -fv /lib/lib{readline,history}.so ln -sfv ../../lib/libreadline.so.5 /usr/lib/libreadline.so ln -sfv ../../lib/libhistory.so.5 /usr/lib/libhistory.so +endif + +ifeq "$(STAGE)" "uclibc" + cd $(DIR_APP) && \ + CC=$(UCLIBC_TARGET)-gcc \ + AR=$(UCLIBC_TARGET)-ar \ + AS=$(UCLIBC_TARGET)-as \ + LD=$(UCLIBC_TARGET)-ld \ + RANLIB=$(UCLIBC_TARGET)-ranlib \ + ./configure --prefix=/ + cd $(DIR_APP) && make -j $(PARALLELISM) SHLIB_LIBS=-lncurses + cd $(DIR_APP) && make install DESTDIR=$(UCLIBC_DIR) +endif + @rm -rf $(DIR_APP) @$(POSTBUILD) diff --git a/lfs/slang b/lfs/slang index 4cf83c2ea..e2e34a2bb 100644 --- a/lfs/slang +++ b/lfs/slang @@ -37,7 +37,7 @@ TARGET = $(DIR_INFO)/$(STAGE_ORDER)_$(STAGE)/$(THISAPP) # Top-level Rules ############################################################################### -objects = $(DL_FILE) +objects = $(DL_FILE) $(THISAPP)-uclibc-1.patch install: $(TARGET) @@ -53,10 +53,26 @@ $(patsubst %,$(DIR_DL)/%,$(objects)) : $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) @$(PREBUILD) @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE) + +ifeq "$(STAGE)" "ipfire" cd $(DIR_APP) && ./configure --prefix=/usr --sysconfdir=/etc cd $(DIR_APP) && make -j $(PARALLELISM) cd $(DIR_APP) && make install_doc_dir=/usr/share/doc/slang-$(VER) \ SLSH_DOC_DIR=/usr/share/doc/slang-$(VER)/slsh install-all chmod -v 755 /usr/lib/libslang.so.$(VER) /usr/lib/slang/v2/modules/*.so +endif + +ifeq "$(STAGE)" "uclibc" + cd $(DIR_APP) && patch -Np1 -i $(DIR_DL)/$(THISAPP)-uclibc-1.patch + cd $(DIR_APP) && ./configure --prefix=/usr --sysconfdir=/etc \ + --with-png=no \ + --build=$(IFS_TARGET) \ + --host=$(UCLIBC_TARGET) + cd $(DIR_APP)/src && make -j $(PARALLELISM) + cd $(DIR_APP)/src && make DESTDIR=$(UCLIBC_DIR) install-all + -chmod -v 755 $(UCLIBC_DIR)/usr/lib/libslang.so.$(VER) \ + $(UCLIBC_DIR)/usr/lib/slang/v2/modules/*.so +endif + @rm -rf $(DIR_APP) @$(POSTBUILD) diff --git a/lfs/stage5 b/lfs/stage5 index 390c2d7f0..aad1316da 100644 --- a/lfs/stage5 +++ b/lfs/stage5 @@ -52,4 +52,7 @@ $(TARGET) : ln -svf ../lib /usr/$(UCLIBC_TARGET)/$(UCLIBC_TARGET)/lib ln -svf usr/$(UCLIBC_TARGET)/lib /ulib ln -svf lib /usr/$(UCLIBC_TARGET)/ulib + ln -svf . $(UCLIBC_DIR)/usr + #ln -svf ../bin $(UCLIBC_DIR)/usr/bin + #ln -svf ../sbin $(UCLIBC_DIR)/usr/sbin @$(POSTBUILD) diff --git a/lfs/uClibc b/lfs/uClibc index 2ec0e1102..2f9d01750 100644 --- a/lfs/uClibc +++ b/lfs/uClibc @@ -57,8 +57,8 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE) ## Copy configuration - cp -fv $(DIR_CONF)/$(PKG_NAME)/.config $(DIR_APP)/.config - cp -fv $(DIR_DL)/$(LOCALE_FILE) $(DIR_APP)/extra/locale + cp -f $(DIR_CONF)/$(PKG_NAME)/.config $(DIR_APP)/.config + cp -f $(DIR_DL)/$(LOCALE_FILE) $(DIR_APP)/extra/locale ifeq "$(PASS)" "0" rm -vf $(DIR_APP)/.config @@ -76,7 +76,7 @@ ifneq "$(PASS)" "0" # Do this on pass 1 and 2 -e "s@.*KERNEL_SOURCE.*@KERNEL_SOURCE=\"$(UCLIBC_DIR)\"@g" \ -i .config cd $(DIR_APP) && make CROSS=$(UCLIBC_TARGET)- all -j $(PARALLELISM) - rm -fvr $(DIR_APP)/include/{asm,asm-generic,linux} + rm -fr $(DIR_APP)/include/{asm,asm-generic,linux} cd $(DIR_APP) && make install endif @@ -84,9 +84,7 @@ ifeq "$(PASS)" "2" cd $(DIR_APP) && make headers cd $(DIR_APP) && make CC="gcc -Wl,--dynamic-linker,$(UCLIBC_LINKER) /ulib/libc.so.0" \ -C utils - make -C utils install - mv -vf $(UCLIBC_DIR)/sbin/ldconfig $(UCLIBC_DIR)/bin - rm -rvf $(UCLIBC_DIR)/sbin/ + mv -f $(DIR_APP)/utils/ldconfig $(UCLIBC_DIR)/bin endif @rm -rf $(DIR_APP) diff --git a/lfs/udev b/lfs/udev index 9af1f2786..471ae4c3b 100644 --- a/lfs/udev +++ b/lfs/udev @@ -84,7 +84,7 @@ ifeq "$(STAGE)" "uclibc" cd $(DIR_APP) && make DESTDIR=$(INSTALLER_DIR) EXTRAS="`echo extras/*/`" \ CROSS_COMPILE=$(UCLIBC_TARGET)- install - cd $(DIR_APP) && cp -v etc/udev/rules.d/[0-9]* $(INSTALLER_DIR)/etc/udev/rules.d/ + cd $(DIR_APP) && cp -vf etc/udev/rules.d/[0-9]* $(INSTALLER_DIR)/etc/udev/rules.d/ cd $(DIR_APP)/$(PKG_NAME)-config-$(CONFVER) && make install DESTDIR=$(INSTALLER_DIR) endif diff --git a/lfs/util-linux-ng b/lfs/util-linux-ng index 0052ddaec..d6b547873 100644 --- a/lfs/util-linux-ng +++ b/lfs/util-linux-ng @@ -73,7 +73,7 @@ endif ifeq "$(STAGE)" "uclibc" cd $(DIR_APP) && ./configure --build=$(IFS_TARGET) \ --host=$(UCLIBC_TARGET) - cd $(DIR_APP) && make -j $(PARALLELISM) + cd $(DIR_APP) && make -C disk-utils mkswap -j $(PARALLELISM) cd $(DIR_APP) && cp -vf disk-utils/mkswap $(UCLIBC_DIR)/sbin/mkswap endif diff --git a/lfs/zlib b/lfs/zlib index 6515668af..1d47c9e05 100644 --- a/lfs/zlib +++ b/lfs/zlib @@ -56,6 +56,7 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) @$(PREBUILD) @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE) +ifeq "$(STAGE)" "base" cd $(DIR_APP) && ./configure --prefix=/usr --shared --libdir=/lib cd $(DIR_APP) && make -j $(PARALLELISM) cd $(DIR_APP) && make install @@ -69,6 +70,20 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) cd $(DIR_APP) && make install chmod -v 644 /usr/lib/libz.a - +endif + +ifeq "$(STAGE)" "uclibc" + cd $(DIR_APP) && CC=$(UCLIBC_TARGET)-gcc ./configure --prefix=/usr \ + --shared \ + --libdir=/lib + cd $(DIR_APP) && make -j $(PARALLELISM) + cd $(DIR_APP) && install -v -m 644 zlib.h zconf.h \ + $(UCLIBC_DIR)/usr/include + cd $(DIR_APP) && install -v -m 755 libz.so.$(VER) \ + $(UCLIBC_DIR)/usr/lib + ln -svf libz.so.$(VER) $(UCLIBC_DIR)/usr/lib/libz.so.1 + ln -svf libz.so.$(VER) $(UCLIBC_DIR)/usr/lib/libz.so +endif + @rm -rf $(DIR_APP) @$(POSTBUILD) diff --git a/make.sh b/make.sh index 395eb723c..a0218efb1 100755 --- a/make.sh +++ b/make.sh @@ -59,7 +59,7 @@ toolchain_build() { fi toolchain_make binutils PASS=1 - toolchain_make gcc PASS=1 + toolchain_make gcc PASS=1 toolchain_make glibc toolchain_make adjust-toolchain @@ -67,7 +67,7 @@ toolchain_build() { toolchain_make tcl toolchain_make expect toolchain_make dejagnu - toolchain_make gcc PASS=2 + toolchain_make gcc PASS=2 toolchain_make binutils PASS=2 fi @@ -216,9 +216,9 @@ ipfire_build() { ### Building some general stuff # STAGE 2 - ipfire_make pam PASS=1 + ipfire_make pam PASS=1 ipfire_make shadow - ipfire_make pam PASS=2 + ipfire_make pam PASS=2 ipfire_make slang ipfire_make newt ipfire_make cyrus-sasl @@ -419,11 +419,23 @@ uclibc_build() { ipfire_make gcc PASS=2 ipfire_make uClibc PASS=2 ipfire_make gettext PASS=2 - ipfire_make busybox ipfire_make udev + ipfire_make pciutils + ipfire_make zlib ipfire_make ncurses - #ipfire_make e2fsprogs - #ipfire_make util-linux-ng + ipfire_make pcre + ipfire_make popt + ipfire_make readline + ipfire_make e2fsprogs + ipfire_make util-linux-ng + ipfire_make parted + ipfire_make python + ipfire_make kudzu + ipfire_make slang + ipfire_make newt + ipfire_make cpio + ipfire_make lzma + ipfire_make busybox } ################################################################################