mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-27 03:07:43 +02:00
Installer-Toolchain nochmals ueberarbeitet.
Kompiliert wenigstens schonmal durch... git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@373 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8
This commit is contained in:
13
lfs/binutils
13
lfs/binutils
@@ -38,10 +38,15 @@ DIR_APP = $(DIR_SRC)/$(THISAPP)
|
||||
ifeq "$(ROOT)" ""
|
||||
ifeq "$(LFS_PASS)" "install"
|
||||
TARGET = $(DIR_INFO)/$(THISAPP)-install
|
||||
EXTRA_CONFIG = --target=$(MACHINE)-linux-uclibc --prefix=/opt/$(MACHINE)-uClibc --disable-nls \
|
||||
--with-sysroot=/opt/$(MACHINE)-uClibc/$(MACHINE)-linux-uclibc
|
||||
EXTRA_MAKE =
|
||||
EXTRA_INSTALL =
|
||||
EXTRA_CONFIG = --prefix=/opt/$(MACHINE)-uClibc \
|
||||
--build=$(MACHINE)-pc-linux-gnu \
|
||||
--host=$(MACHINE)-pc-linux-gnu \
|
||||
--target=$(MACHINE)-linux-uclibc \
|
||||
--disable-nls \
|
||||
--enable-multilib \
|
||||
--disable-werror
|
||||
EXTRA_MAKE = all
|
||||
EXTRA_INSTALL =
|
||||
else
|
||||
TARGET = $(DIR_INFO)/$(THISAPP)
|
||||
EXTRA_CONFIG = --prefix=/usr --enable-shared --disable-nls
|
||||
|
||||
@@ -83,7 +83,7 @@ ifeq "$(PASS)" ""
|
||||
cd $(DIR_APP) && ./configure --prefix=/usr --sysconfdir=/etc \
|
||||
--with-dbpath=/var/lib/sasl/sasldb2 \
|
||||
--with-saslauthd=/var/run
|
||||
cd $(DIR_APP) && make $(MAKETUNING)
|
||||
cd $(DIR_APP) && make
|
||||
cd $(DIR_APP) && make install
|
||||
install -v -m700 -d /var/lib/sasl
|
||||
else
|
||||
|
||||
88
lfs/gcc
88
lfs/gcc
@@ -34,38 +34,56 @@ DL_FROM = $(URL_IPFIRE)
|
||||
DIR_APP = $(DIR_SRC)/$(THISAPP)
|
||||
CFLAGS =
|
||||
CXXFLAGS =
|
||||
TARGET_PATH = /opt/$(MACHINE)-uClibc/bin:$(PATH)
|
||||
|
||||
# Normal build or /tools build.
|
||||
#
|
||||
ifeq "$(ROOT)" ""
|
||||
ifeq "$(INST)" "1"
|
||||
TARGET = $(DIR_INFO)/$(THISAPP)-install1
|
||||
EXTRA_CONFIG = --target=$(MACHINE)-linux-uclibc --prefix=/opt/$(MACHINE)-uClibc \
|
||||
--with-local-prefix=/opt/$(MACHINE)-uClibc/$(MACHINE)-linux-uclibc --with-newlib \
|
||||
--with-sysroot=/opt/$(MACHINE)-uClibc --disable-nls \
|
||||
--enable-threads=no --enable-symvers=gnu \
|
||||
--disable-__cxa_atexit --enable-languages=c \
|
||||
--disable-shared --with-gnu-as --with-gnu-ld \
|
||||
--without-headers
|
||||
EXTRA_CONFIG = --prefix=/opt/$(MACHINE)-uClibc \
|
||||
--build=$(MACHINE)-pc-linux-gnu \
|
||||
--host=$(MACHINE)-pc-linux-gnu \
|
||||
--target=$(MACHINE)-linux-uclibc \
|
||||
--enable-languages=c \
|
||||
--with-sysroot=$(DIR_SRC)/uClibc_dev \
|
||||
--disable-__cxa_atexit \
|
||||
--enable-target-optspace \
|
||||
--with-gnu-ld \
|
||||
--disable-shared \
|
||||
--enable-threads \
|
||||
--enable-multilib \
|
||||
--disable-nls
|
||||
EXTRA_MAKE =
|
||||
EXTRA_INSTALL =
|
||||
else
|
||||
ifeq "$(INST)" "2"
|
||||
TARGET = $(DIR_INFO)/$(THISAPP)-install2
|
||||
EXTRA_CONFIG = --target=$(MACHINE)-linux-uclibc --prefix=/opt/$(MACHINE)-uClibc \
|
||||
--with-local-prefix=/opt/$(MACHINE)-uClibc/$(MACHINE)-linux-uclibc \
|
||||
--with-sysroot=/opt/$(MACHINE)-uClibc \
|
||||
--disable-nls \
|
||||
--enable-threads=posix --enable-symvers=gnu \
|
||||
--disable-__cxa_atexit --enable-languages=c,c++ \
|
||||
--enable-c99 --enable-long-long --with-gnu-as \
|
||||
--with-gnu-ld --enable-shared --enable-clocale \
|
||||
--enable-target-optspace
|
||||
EXTRA_CONFIG = --prefix=/opt/$(MACHINE)-uClibc \
|
||||
--build=$(MACHINE)-pc-linux-gnu \
|
||||
--host=$(MACHINE)-pc-linux-gnu \
|
||||
--target=$(MACHINE)-linux-uclibc \
|
||||
--enable-languages=c,c++ \
|
||||
--with-sysroot=$(DIR_SRC)/uClibc_dev \
|
||||
--disable-__cxa_atexit \
|
||||
--enable-target-optspace \
|
||||
--with-gnu-ld \
|
||||
--enable-shared \
|
||||
--disable-nls \
|
||||
--enable-threads \
|
||||
--enable-multilib
|
||||
EXTRA_MAKE =
|
||||
EXTRA_INSTALL =
|
||||
else
|
||||
TARGET = $(DIR_INFO)/$(THISAPP)
|
||||
EXTRA_CONFIG = --prefix=/usr \
|
||||
--libexecdir=/usr/lib --enable-shared \
|
||||
--enable-threads=posix --enable-__cxa_atexit \
|
||||
--enable-clocale=gnu --enable-languages=c,c++ \
|
||||
--disable-nls
|
||||
--libexecdir=/usr/lib \
|
||||
--enable-shared \
|
||||
--enable-threads=posix \
|
||||
--enable-__cxa_atexit \
|
||||
--enable-clocale=gnu \
|
||||
--enable-languages=c,c++ \
|
||||
--disable-nls
|
||||
EXTRA_MAKE =
|
||||
EXTRA_INSTALL =
|
||||
endif
|
||||
@@ -74,17 +92,22 @@ else
|
||||
ifeq "$(PASS)" "1"
|
||||
TARGET = $(DIR_INFO)/$(THISAPP)-tools1
|
||||
EXTRA_CONFIG = --prefix=/tools \
|
||||
--with-local-prefix=/tools --disable-nls --enable-shared \
|
||||
--enable-languages=c
|
||||
--with-local-prefix=/tools \
|
||||
--disable-nls \
|
||||
--enable-shared \
|
||||
--enable-languages=c
|
||||
EXTRA_MAKE = bootstrap BOOT_LDFLAGS="-static"
|
||||
EXTRA_INSTALL =
|
||||
else
|
||||
TARGET = $(DIR_INFO)/$(THISAPP)-tools2
|
||||
EXTRA_CONFIG = --prefix=/tools \
|
||||
--with-local-prefix=/tools --enable-clocale=gnu \
|
||||
--enable-shared --enable-threads=posix \
|
||||
--enable-__cxa_atexit --enable-languages=c,c++ \
|
||||
--disable-libstdcxx-pch
|
||||
--with-local-prefix=/tools \
|
||||
--enable-clocale=gnu \
|
||||
--enable-shared \
|
||||
--enable-threads=posix \
|
||||
--enable-__cxa_atexit \
|
||||
--enable-languages=c,c++ \
|
||||
--disable-libstdcxx-pch
|
||||
EXTRA_MAKE =
|
||||
EXTRA_INSTALL =
|
||||
endif
|
||||
@@ -132,16 +155,23 @@ ifeq "$(ROOT)" ""
|
||||
ifeq "$(INST)" "1"
|
||||
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/gcc-uclibc-conf.patch
|
||||
cd $(DIR_SRC)/gcc-build && $(DIR_APP)/configure $(EXTRA_CONFIG)
|
||||
override PATH = /opt/$(MACHINE)-uClibc/bin:/usr/local/bin:/bin:/usr/bin:/sbin:/usr/sbin
|
||||
cd $(DIR_SRC)/gcc-build && make all-gcc install-gcc
|
||||
cd $(DIR_SRC)/gcc-build && PATH=$(TARGET_PATH) make $(MAKETUNING) all-gcc
|
||||
cd $(DIR_SRC)/gcc-build && PATH=$(TARGET_PATH) make install-gcc
|
||||
cd /opt/$(MACHINE)-uClibc/bin && for i in `ls -w1 $(MACHINE)-linux-uclibc-*`; do \
|
||||
ln -svf $$i $(MACHINE)-linux-`echo $$i | cut -c 19-`; \
|
||||
done
|
||||
ln -svf $(MACHINE)-linux-uclibc /opt/$(MACHINE)-uClibc/$(MACHINE)-linux
|
||||
ln -svf gcc /opt/$(MACHINE)-uClibc/$(MACHINE)-linux-uclibc/bin/cc
|
||||
else
|
||||
ifeq "$(INST)" "2"
|
||||
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/gcc-uclibc-conf.patch
|
||||
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/gcc-uclibc-locale.patch
|
||||
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/gcc-libstdc++-pic.patch
|
||||
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/gcc-sdk-libstdc++-includes.patch
|
||||
ln -snf ../include /opt/$(MACHINE)-uClibc/$(MACHINE)-linux-uclibc/sys-include
|
||||
cd $(DIR_SRC)/gcc-build && $(DIR_APP)/configure $(EXTRA_CONFIG)
|
||||
cd $(DIR_SRC)/gcc-build && make all install
|
||||
cd $(DIR_SRC)/gcc-build && PATH=$(TARGET_PATH) make $(MAKETUNING) $(EXTRA_MAKE)
|
||||
cd $(DIR_SRC)/gcc-build && PATH=$(TARGET_PATH) make install $(EXTRA_INSTALL)
|
||||
cp -f /opt/$(MACHINE)-uClibc/lib/libgcc_s.so /lib
|
||||
cd /lib && ln -sf libgcc_s.so libgcc_s.so.1
|
||||
else
|
||||
|
||||
@@ -33,8 +33,6 @@ DL_FILE = $(THISAPP).bin.i386.tar.gz
|
||||
DL_FROM = $(URL_IPFIRE)
|
||||
DIR_APP = $(DIR_SRC)/$(THISAPP)
|
||||
TARGET = $(DIR_INFO)/$(THISAPP)
|
||||
PROG = iptraf
|
||||
PAK_VER = ipfire-beta1
|
||||
|
||||
###############################################################################
|
||||
# Top-level Rules
|
||||
@@ -78,5 +76,5 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
|
||||
@$(PREBUILD)
|
||||
@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
|
||||
cd $(DIR_APP).bin.i386/src && yes 'n' | make install TARGET=/usr/bin
|
||||
@rm -rf $(DIR_APP)
|
||||
@rm -rf $(DIR_APP).bin.i386
|
||||
@$(POSTBUILD)
|
||||
|
||||
@@ -79,7 +79,7 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
|
||||
ifeq "$(LFS_PASS)" "install"
|
||||
cd $(DIR_APP) && ./configure --prefix=/ --sbindir=/bin
|
||||
cd $(DIR_APP) && make $(MAKETUNING)
|
||||
cd $(DIR_APP) && install -v -m 755 mkreiserfs/mkreiserfs /install/initrd/sbin/mkreiserfs
|
||||
cd $(DIR_APP) && install -v -m 755 mkreiserfs/mkreiserfs /install/initrd/bin/mkreiserfs
|
||||
else
|
||||
cd $(DIR_APP) && ./configure --prefix=/usr --sbindir=/sbin
|
||||
cd $(DIR_APP) && make $(MAKETUNING)
|
||||
|
||||
53
lfs/uClibc
53
lfs/uClibc
@@ -50,13 +50,13 @@ STAGING_DIR=/opt/$(MACHINE)-uClibc
|
||||
|
||||
objects = $(DL_FILE) buildroot-snapshot-20061026.tar.bz2 uClibc-locale-030818.tgz
|
||||
|
||||
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
|
||||
buildroot-snapshot-20061026.tar.bz2 = $(DL_FROM)/buildroot-snapshot-20061026.tar.bz2
|
||||
uClibc-locale-030818.tgz = $(DL_FROM)/uClibc-locale-030818.tgz
|
||||
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
|
||||
buildroot-snapshot-20061026.tar.bz2 = $(DL_FROM)/buildroot-snapshot-20061026.tar.bz2
|
||||
uClibc-locale-030818.tgz = $(DL_FROM)/uClibc-locale-030818.tgz
|
||||
|
||||
$(DL_FILE)_MD5 = 1ada58d919a82561061e4741fb6abd29
|
||||
buildroot-snapshot-20061026.tar.bz2_MD5 = ecc5d48a780e46a56d1d39207d5868bd
|
||||
uClibc-locale-030818.tgz_MD5 = d75b2239b4e27c3c9cbed1c8f6eabba6
|
||||
$(DL_FILE)_MD5 = 1ada58d919a82561061e4741fb6abd29
|
||||
buildroot-snapshot-20061026.tar.bz2_MD5 = ecc5d48a780e46a56d1d39207d5868bd
|
||||
uClibc-locale-030818.tgz_MD5 = d75b2239b4e27c3c9cbed1c8f6eabba6
|
||||
|
||||
install : $(TARGET)
|
||||
|
||||
@@ -87,18 +87,42 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
|
||||
@$(PREBUILD)
|
||||
ifeq "$(PASS)" "1"
|
||||
@rm -rf $(DIR_APP)
|
||||
@mkdir -p /opt/$(MACHINE)-uClibc
|
||||
@mkdir -p /opt/$(MACHINE)-uClibc $(DIR_SRC)/uClibc_dev/usr/include $(DIR_SRC)/uClibc_dev/{,usr}/lib
|
||||
@cd $(DIR_SRC) && tar xfj $(DIR_DL)/$(DL_FILE)
|
||||
cp -f $(DIR_DL)/uClibc-locale-030818.tgz $(DIR_APP)/extra/locale/
|
||||
cp -f $(DIR_SRC)/config/uClibc/{locales,codesets}.txt $(DIR_APP)/extra/locale
|
||||
cd $(DIR_APP)/extra/locale && patch -Np3 < $(DIR_SRC)/src/patches/uClibc-gcc4-genwctype.patch
|
||||
cp -f $(DIR_SRC)/config/uClibc/uClibc.config-$(MACHINE) $(DIR_APP)/.config
|
||||
cd $(DIR_APP) && make CROSS= PREFIX=$(STAGING_DIR) oldconfig
|
||||
cd $(DIR_APP) && make CROSS= PREFIX=$(STAGING_DIR) pregen headers install_dev
|
||||
# cd $(DIR_APP)/extra/locale && make
|
||||
cd $(DIR_APP) && make oldconfig
|
||||
cd $(DIR_APP)/extra/locale && make
|
||||
cd $(DIR_APP) && make PREFIX=$(DIR_SRC)/uClibc_dev \
|
||||
DEVEL_PREFIX=/usr/ \
|
||||
RUNTIME_PREFIX=$(DIR_SRC)/uClibc_dev/ \
|
||||
pregen install_dev
|
||||
else
|
||||
ifeq "$(PASS)" "2"
|
||||
cd $(DIR_APP) && CROSS=$(MACHINE)-linux-uclibc- PREFIX=/opt/$(MACHINE)-uClibc make all install
|
||||
cd $(DIR_APP) && make PREFIX= \
|
||||
DEVEL_PREFIX=/ \
|
||||
RUNTIME_PREFIX=/ \
|
||||
all
|
||||
cd $(DIR_APP) && make PREFIX= \
|
||||
DEVEL_PREFIX=/opt/$(MACHINE)-uClibc/ \
|
||||
RUNTIME_PREFIX=/opt/$(MACHINE)-uClibc/ \
|
||||
install_runtime install_dev
|
||||
|
||||
## This is to fix a small bug
|
||||
if [ ! -h /opt/$(MACHINE)-uClibc/$(MACHINE)-linux-uclibc/lib ]; then \
|
||||
mv -vf /opt/$(MACHINE)-uClibc/$(MACHINE)-linux-uclibc/lib/* /opt/$(MACHINE)-uClibc/lib/; \
|
||||
rm -rf /opt/$(MACHINE)-uClibc/$(MACHINE)-linux-uclibc/lib; \
|
||||
ln -sfv ../lib /opt/$(MACHINE)-uClibc/$(MACHINE)-linux-uclibc/lib; \
|
||||
fi
|
||||
|
||||
cd $(DIR_APP) && make -C utils/ PREFIX=/opt/$(MACHINE)-uClibc \
|
||||
hostutils
|
||||
cd $(DIR_APP) && make PREFIX=/install/initrd \
|
||||
DEVEL_PREFIX=/usr/ \
|
||||
RUNTIME_PREFIX=/ \
|
||||
install_runtime
|
||||
cp -f /opt/$(MACHINE)-uClibc/lib/ld-uClibc-$(VER).so /lib
|
||||
cp -f /opt/$(MACHINE)-uClibc/lib/libuClibc-$(VER).so /lib
|
||||
cd /lib && ln -sf ld-uClibc-$(VER).so ld-uClibc.so.0
|
||||
@@ -106,12 +130,7 @@ ifeq "$(PASS)" "2"
|
||||
cd /lib && ln -sf libc.so.0 libc.so
|
||||
ln -sf /opt/$(MACHINE)-uClibc/lib/libm-$(VER).so /lib/libm.so.0
|
||||
else
|
||||
cd /opt/$(MACHINE)-uClibc/bin && for i in `ls -w1 $(MACHINE)-linux-uclibc-*`; do \
|
||||
ln -sf $$i $(MACHINE)-linux-`echo $$i | cut -c 19-`; \
|
||||
done
|
||||
ln -sf $(MACHINE)-linux-uclibc /opt/$(MACHINE)-uClibc/$(MACHINE)-linux
|
||||
ln -sf gcc /opt/$(MACHINE)-uClibc/$(MACHINE)-linux-uclibc/bin/cc
|
||||
cd $(DIR_APP) && make RUNTIME_PREFIX=/install/initrd/ install_runtime
|
||||
cd $(DIR_APP) && make PREFIX=/install/initrd utils install_utils
|
||||
chmod 755 /install/initrd/lib/libuClibc-$(VER).so
|
||||
rm -f /install/initrd/lib/{libm*,libcrypt*,libutil*,librt*}
|
||||
@rm -rf $(DIR_APP)
|
||||
|
||||
Reference in New Issue
Block a user