include Config
-VER = 2.17
+ifeq "$(MACHINE)" "arm"
+ VER = 2.18
+else
+ VER = 2.17
+endif
THISAPP = binutils-$(VER)
DL_FILE = $(THISAPP).tar.bz2
DL_FROM = $(URL_IPFIRE)
DIR_APP = $(DIR_SRC)/$(THISAPP)
+# XXX maybe we can remove that ugly MACHINE= by this
+#unexport MACHINE
+
# Normal build or /tools build.
#
ifeq "$(ROOT)" ""
ifeq "$(PASS)" "1"
TARGET = $(DIR_INFO)/$(THISAPP)-tools1
EXTRA_CONFIG = --prefix=/tools --disable-nls --disable-werror --disable-gprof
- EXTRA_MAKE = LDFLAGS="-all-static"
+ #EXTRA_MAKE = LDFLAGS="-all-static"
EXTRA_INSTALL =
else
TARGET = $(DIR_INFO)/$(THISAPP)-tools2
endif
endif
+ifeq "$(MACHINE)" "arm"
+ EXTRA_CONFIG += \
+ --host=$(BUILDTARGET) \
+ --build=$(BUILDTARGET) \
+ --target=$(BUILDTARGET) \
+ --with-abi=aapcs-linux \
+ --with-float=soft
+endif
+
###############################################################################
# Top-level Rules
###############################################################################
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
-$(DL_FILE)_MD5 = e26e2e06b6e4bf3acf1dc8688a94c0d1
+ifeq "$(MACHINE)" "arm"
+ $(DL_FILE)_MD5 = 9d22ee4dafa3a194457caf4706f9cf01
+else
+ $(DL_FILE)_MD5 = e26e2e06b6e4bf3acf1dc8688a94c0d1
+endif
install : $(TARGET)
@$(PREBUILD)
@rm -rf $(DIR_APP) $(DIR_SRC)/binutils-build && cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE)
@mkdir $(DIR_SRC)/binutils-build
- cd $(DIR_SRC)/binutils-build && $(DIR_APP)/configure $(EXTRA_CONFIG)
+ cd $(DIR_SRC)/binutils-build && MACHINE= $(DIR_APP)/configure $(EXTRA_CONFIG)
ifeq "$(PASS)" "1"
- cd $(DIR_SRC)/binutils-build && make configure-host
+ cd $(DIR_SRC)/binutils-build && make configure-host MAKEINFO=makeinfo MACHINE=
endif
- cd $(DIR_SRC)/binutils-build && make $(EXTRA_MAKE) $(MAKETUNING)
- cd $(DIR_SRC)/binutils-build && make $(EXTRA_INSTALL) install
+ cd $(DIR_SRC)/binutils-build && make $(EXTRA_MAKE) $(MAKETUNING) MAKEINFO=makeinfo MACHINE=
+ cd $(DIR_SRC)/binutils-build && make $(EXTRA_INSTALL) install MAKEINFO=makeinfo MACHINE=
ifeq "$(ROOT)" ""
ifneq "$(LFS_PASS)" "install"
cp -v $(DIR_APP)/include/libiberty.h /usr/include
endif
else
ifeq "$(PASS)" "1"
- cd $(DIR_SRC)/binutils-build && make -C ld clean
- cd $(DIR_SRC)/binutils-build && make -C ld LIB_PATH=/tools/lib
+ cd $(DIR_SRC)/binutils-build && make -C ld clean MACHINE=
+ cd $(DIR_SRC)/binutils-build && make -C ld LIB_PATH=/tools/lib MACHINE=
cd $(DIR_SRC)/binutils-build && cp -v ld/ld-new /tools/bin
else
- cd $(DIR_SRC)/binutils-build && make -C ld clean
- cd $(DIR_SRC)/binutils-build && make -C ld LIB_PATH=/usr/lib:/lib
+ cd $(DIR_SRC)/binutils-build && make -C ld clean MACHINE=
+ cd $(DIR_SRC)/binutils-build && make -C ld LIB_PATH=/usr/lib:/lib MACHINE=
cd $(DIR_SRC)/binutils-build && cp -v ld/ld-new /tools/bin
endif
endif
THISAPP = cleanup-toolchain
TARGET = $(DIR_INFO)/$(THISAPP)-$(PASS)-tools
+ifeq "$(MACHINE)" "arm"
+ GCC_VER = 4.1.2
+else
+ GCC_VER = 4.0.4
+endif
+
###############################################################################
# Top-level Rules
###############################################################################
@$(PREBUILD)
ifeq "$(PASS)" "1"
mv -v /tools/bin/{ld,ld-old}
- mv -v /tools/i686-pc-linux-gnu/bin/{ld,ld-old}
+ mv -v /tools/$(BUILDTARGET)/bin/{ld,ld-old}
cp -v /tools/bin/{ld-new,ld}
- ln -sv /tools/bin/ld /tools/i686-pc-linux-gnu/bin/ld
- gcc -dumpspecs > /tools/lib/gcc/i686-pc-linux-gnu/4.0.4/specs
- sed 's@^/lib/ld-linux.so.2@/tools&@g' /tools/lib/gcc/i686-pc-linux-gnu/4.0.4/specs > tempspecfile
- mv -vf tempspecfile /tools/lib/gcc/i686-pc-linux-gnu/4.0.4/specs
- find /tools/lib/gcc/i686-pc-linux-gnu/4.0.4/include/* -maxdepth 0 -xtype d -exec rm -rvf '{}' \;
- rm -vf `grep -l "DO NOT EDIT THIS FILE" /tools/lib/gcc/i686-pc-linux-gnu/4.0.4/include/*`
+ ln -sv /tools/bin/ld /tools/$(BUILDTARGET)/bin/ld
+ gcc -dumpspecs > /tools/lib/gcc/$(BUILDTARGET)/$(GCC_VER)/specs
+ sed 's@/lib/ld-linux.so@/tools&@g' /tools/lib/gcc/$(BUILDTARGET)/$(GCC_VER)/specs > tempspecfile
+ mv -vf tempspecfile /tools/lib/gcc/$(BUILDTARGET)/$(GCC_VER)/specs
+ find /tools/lib/gcc/$(BUILDTARGET)/$(GCC_VER)/include/* -maxdepth 0 -xtype d -exec rm -rvf '{}' \;
+ rm -vf `grep -l "DO NOT EDIT THIS FILE" /tools/lib/gcc/$(BUILDTARGET)/$(GCC_VER)/include/*`
endif
ifeq "$(PASS)" "2"
-strip --strip-debug /tools/lib/*
endif
ifeq "$(PASS)" "3"
mv -v /tools/bin/{ld,ld-old}
- mv -v /tools/i686-pc-linux-gnu/bin/{ld,ld-old}
+ mv -v /tools/$(BUILDTARGET)/bin/{ld,ld-old}
mv -v /tools/bin/{ld-new,ld}
- ln -sv /tools/bin/ld /tools/i686-pc-linux-gnu/bin/ld
+ ln -sv /tools/bin/ld /tools/$(BUILDTARGET)/bin/ld
gcc -dumpspecs | \
- perl -p -e 's@/tools/lib/ld-linux.so.2@/lib/ld-linux.so.2@g;' \
+ perl -p -e 's@/tools/lib/ld-linux.so@/lib/ld-linux.so@g;' \
-e 's@\*startfile_prefix_spec:\n@$$_/usr/lib/ @g;' > \
- /tools/lib/gcc/i686-pc-linux-gnu/4.0.4/specs
+ /tools/lib/gcc/$(BUILDTARGET)/$(GCC_VER)/specs
endif
@$(POSTBUILD)
$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
@$(PREBUILD)
@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE)
+ cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/coreutils-5.96-rename-tee.patch
ifeq "$(ROOT)" ""
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/$(THISAPP)-uname-1.patch
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/$(THISAPP)-suppress_uptime_kill_su-1.patch
include Config
-VER = 4.0.4
+ifeq "$(MACHINE)" "arm"
+ VER = 4.1.2
+else
+ VER = 4.0.4
+endif
THISAPP = gcc-$(VER)
DL_FILE = $(THISAPP).tar.bz2
--with-local-prefix=/tools \
--disable-nls \
--enable-shared \
- --enable-languages=c
+ --enable-languages=c \
+ --disable-bootstrap
EXTRA_MAKE =
#bootstrap BOOT_LDFLAGS="-static"
EXTRA_INSTALL =
endif
endif
+ifeq "$(MACHINE)" "arm"
+ EXTRA_CONFIG += \
+ --build=$(BUILDTARGET) \
+ --host=$(BUILDTARGET) \
+ --target=$(BUILDTARGET) \
+ --with-float=soft \
+ --disable-libmudflap \
+ --disable-libssp \
+ --disable-libgomp \
+ --enable-threads=posix \
+ --enable-long-long \
+ --enable-c99 \
+ --enable-__cxa_atexit \
+ --disable-multilib
+endif
+
+export XCFLAGS = $(CFLAGS)
+export TCFLAGS = $(CFLAGS)
+
###############################################################################
# Top-level Rules
###############################################################################
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
-$(DL_FILE)_MD5 = 8970debbc55bea85ee80961d733080f0
+ifeq "$(MACHINE)" "arm"
+ $(DL_FILE)_MD5 = a4a3eb15c96030906d8494959eeda23c
+else
+ $(DL_FILE)_MD5 = 8970debbc55bea85ee80961d733080f0
+endif
install : $(TARGET)
@$(PREBUILD)
@rm -rf $(DIR_APP) $(DIR_SRC)/gcc-build && cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE)
@mkdir $(DIR_SRC)/gcc-build
+
+ cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/gcc-4.1.2-gcc_eh.patch
+ cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/gcc-4.1.2-arm-linux-soft-float.patch
+
ifeq "$(ROOT)" ""
ifeq "$(INST)" "1"
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/gcc-uclibc-conf.patch
cd $(DIR_SRC)/gcc-build && make $(MAKETUNING) $(EXTRA_MAKE)
cd $(DIR_SRC)/gcc-build && make $(EXTRA_INSTALL) install
ln -sfv gcc /tools/bin/cc
+ ln -sf ccache $(ROOT)/usr/local/bin/$(BUILDTARGET)-gcc
+ ln -sf ccache $(ROOT)/usr/local/bin/$(BUILDTARGET)-g++
+ ln -sf ccache $(ROOT)/usr/local/bin/$(BUILDTARGET)-cc
else
cd $(DIR_APP) && cp -v gcc/Makefile.in{,.orig}
cd $(DIR_APP) && sed 's@\./fixinc\.sh@-c true@' gcc/Makefile.in.orig > gcc/Makefile.in
include Config
-VER = 2.3.6
+ifeq "$(MACHINE)" "arm"
+ VER = 2.5
+else
+ VER = 2.3.6
+endif
THISAPP = glibc-$(VER)
DL_FILE = $(THISAPP).tar.bz2
DL_FROM = $(URL_IPFIRE)
DIR_APP = $(DIR_SRC)/$(THISAPP)
-CFLAGS =
-CXXFLAGS =
# Normal build or /tools build.
#
ifeq "$(ROOT)" ""
TARGET = $(DIR_INFO)/$(THISAPP)
EXTRA_CONFIG = --prefix=/usr \
- --disable-profile --enable-add-ons \
+ --disable-profile \
--enable-kernel=2.6.0 --libexecdir=/usr/lib/glibc
EXTRA_MAKE =
EXTRA_INSTALL =
else
TARGET = $(DIR_INFO)/$(THISAPP)-tools
EXTRA_CONFIG = --prefix=/tools \
- --disable-profile --enable-add-ons \
+ --disable-profile \
--enable-kernel=2.6.0 --with-binutils=/tools/bin \
--without-gd --with-headers=/tools/include \
--without-selinux
EXTRA_INSTALL =
endif
+ifeq "$(MACHINE)" "arm"
+ # Disable hardware FP for ARM.
+ EXTRA_CONFIG += \
+ --build=$(MACHINE) \
+ --host=$(BUILDTARGET) \
+ --without-fp \
+ --enable-add-ons=nptl,ports
+else
+ EXTRA_CONFIG += --enable-add-ons
+endif
+
###############################################################################
# Top-level Rules
###############################################################################
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
glibc-libidn-$(VER).tar.bz2 = $(DL_FROM)/glibc-libidn-$(VER).tar.bz2
-$(DL_FILE)_MD5 = bfdce99f82d6dbcb64b7f11c05d6bc96
-glibc-libidn-$(VER).tar.bz2_MD5 = 49dbe06ce830fc73874d6b38bdc5b4db
+ifeq "$(MACHINE)" "arm"
+ $(DL_FILE)_MD5 = 1fb29764a6a650a4d5b409dda227ac9f
+ glibc-libidn-$(VER).tar.bz2_MD5 = 8787868ba8962d9b125997ec2f25ac01
+else
+ $(DL_FILE)_MD5 = bfdce99f82d6dbcb64b7f11c05d6bc96
+ glibc-libidn-$(VER).tar.bz2_MD5 = 49dbe06ce830fc73874d6b38bdc5b4db
+endif
+
+# ARM needs glibc-ports
+ifeq "$(MACHINE)" "arm"
+ objects += glibc-ports-$(VER).tar.bz2
+ glibc-ports-$(VER).tar.bz2 = $(DL_FROM)/glibc-ports-$(VER).tar.bz2
+ glibc-ports-$(VER).tar.bz2_MD5 = 183f6d46e8fa5e4b2aff240ab1586c2e
+endif
install : $(TARGET)
@$(PREBUILD)
@rm -rf $(DIR_APP) $(DIR_SRC)/glibc-build && cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE)
@mkdir $(DIR_SRC)/glibc-build
+ifeq "$(MACHINE)" "arm"
+ cd $(DIR_APP) && tar jxf $(DIR_DL)/glibc-ports-$(VER).tar.bz2
+ cd $(DIR_APP) && mv -v glibc-ports-$(VER) ports
+
+ cd $(DIR_APP)/ports && patch -Np1 -i $(DIR_SRC)/src/patches/glibc-ports-avoid-using-asm-procinfo.patch
+
+ # asm/page.h should not be included in sysdeps/unix/sysv/linux/arm/ioperm.c.
+ cd $(DIR_APP) && sed "/asm\/page.h/d" -i ports/sysdeps/unix/sysv/linux/arm/ioperm.c
+else
cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/$(THISAPP)-dont_use_origin_on_privil_exec.patch
+endif
ifeq "$(ROOT)" ""
+ifeq "$(MACHINE)" "i586"
cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/$(THISAPP)-linux_types-1.patch
cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/$(THISAPP)-inotify-1.patch
+endif
# This locale causes a loop on bash login - exclude it
cd $(DIR_APP) && sed -i '/vi_VN.TCVN/d' localedata/SUPPORTED
+ifeq "$(MACHINE)" "arm"
+ cd $(DIR_APP) && sed -i 's|libs -o|libs -L/usr/lib -Wl,-dynamic-linker=/lib/ld-linux.so.3 -o|' \
+ scripts/test-installation.pl
+else
cd $(DIR_APP) && sed -i 's|libs -o|libs -L/usr/lib -Wl,-dynamic-linker=/lib/ld-linux.so.2 -o|' \
scripts/test-installation.pl
endif
- cd $(DIR_SRC)/glibc-build && $(DIR_APP)/configure $(EXTRA_CONFIG)
+endif
+ cd $(DIR_SRC)/glibc-build && CFLAGS="$(CFLAGS)" $(DIR_APP)/configure $(EXTRA_CONFIG)
ifeq "$(ROOT)" ""
touch /etc/ld.so.conf
cd $(DIR_SRC)/glibc-build && make $(MAKETUNING) $(EXTRA_MAKE)
cd $(DIR_SRC)/glibc-build && make $(EXTRA_INSTALL) install
+ifeq "$(MACHINE)" "i586"
cp -v $(DIR_APP)/sysdeps/unix/sysv/linux/inotify.h /usr/include/sys
+endif
else
-mkdir /tools/etc
touch /tools/etc/ld.so.conf
mkdir -p /usr/lib/locale
cd $(DIR_SRC)/glibc-build && localedef -i en_US -f ISO-8859-1 en_US
cd $(DIR_SRC)/glibc-build && localedef -i en_US -f UTF-8 en_US.utf8
- cp -f /usr/share/zoneinfo/GMT /etc/localtime
+ # XXX zoneinfo stuff is not installed
+ #cp -f /usr/share/zoneinfo/GMT /etc/localtime
endif
@rm -rf $(DIR_APP) $(DIR_SRC)/glibc-build
@$(POSTBUILD)
endif
endif
-TARGET = $(DIR_INFO)/linux-$(VER)-$(VERSUFIX)
+ifeq "$(HEADERS)" "1"
+ifeq "$(TOOLS)" "1"
+ TARGET = $(DIR_INFO)/linux-libc-headers-$(VER)-$(VERSUFIX)-tools
+ HEADERS_PREFIX = /tools
+else
+ TARGET = $(DIR_INFO)/linux-libc-headers-$(VER)-$(VERSUFIX)
+ HEADERS_PREFIX = /usr
+endif
+else
+ TARGET = $(DIR_INFO)/linux-$(VER)-$(VERSUFIX)
+endif
+
+ifeq "$(MACHINE)" "arm"
+ HEADERS_ARCH=arm
+else
+ HEADERS_ARCH=x86
+endif
###############################################################################
# Top-level Rules
@$(PREBUILD)
@rm -rf $(DIR_APP) $(DIR_SRC)/linux $(DIR_SRC)/linux-*-suse_xen_patches $(DIR_SRC)/xen-* && cd $(DIR_SRC) && tar axf $(DIR_DL)/$(DL_FILE)
- ln -s linux-$(VER) /usr/src/linux
+ ln -svf linux-$(VER) $(DIR_SRC)/linux
ifeq "$(XEN)" "1"
# Apply gentoo Xen patches
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux-2.6.32.27_ipg-fix-driver-name.patch
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux-2.6.32.27_mcs7830-fix-driver-name.patch
+ifeq "$(HEADERS)" "1"
+ # Install the header files
+ cd $(DIR_APP) && make ARCH=$(HEADERS_ARCH) INSTALL_HDR_PATH=dest headers_install
+ -mkdir -pv $(BUILDROOT)/$(HEADERS_PREFIX)/include
+ cd $(DIR_APP) && find dest/include \( -name .install -o -name ..install.cmd \) -delete
+ cd $(DIR_APP) && cp -rv dest/include/* $(BUILDROOT)/$(HEADERS_PREFIX)/include
+else
+
# Install ipfire logo
cd $(DIR_APP) && cp -vf $(DIR_SRC)/config/kernel/ipfire_logo.ppm \
drivers/video/logo/logo_linux_clut224.ppm
# Cleanup kernel source
-
cp $(DIR_SRC)/config/kernel/kernel.config.$(MACHINE)-$(VERSUFIX) $(DIR_APP)/.config
cd $(DIR_APP) && make CC="$(KGCC)" oldconfig
cd $(DIR_APP) && make CC="$(KGCC)" clean
# Disable geode_aes modul
mv /lib/modules/$(VER)-$(VERSUFIX)/kernel/drivers/crypto/geode-aes.ko \
/lib/modules/$(VER)-$(VERSUFIX)/kernel/drivers/crypto/geode-aes.ko.off
+endif
@rm -rf $(DIR_SRC)/patch-o-matic* $(DIR_SRC)/iptables* $(DIR_SRC)/squashfs* $(DIR_SRC)/netfilter-layer7-*
@$(POSTBUILD)
$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
@$(PREBUILD)
@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE)
+ cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/util-linux-2.12r-umount-no-special.patch
ifeq "$(ROOT)" ""
ifeq "$(LFS_PASS)" "install"
cd $(DIR_APP) && CFLAGS="-Os -fomit-frame-pointer" ./configure
LOGFILE="$BASEDIR/log/_build.toolchain.log"
export LOGFILE
- ORG_PATH=$PATH
NATIVEGCC=`gcc --version | grep GCC | awk {'print $3'}`
export NATIVEGCC GCCmajor=${NATIVEGCC:0:1} GCCminor=${NATIVEGCC:2:1} GCCrelease=${NATIVEGCC:4:1}
+ ORG_PATH=$PATH
+ export PATH=$BASEDIR/build/usr/local/bin:$BASEDIR/build/tools/bin:$PATH
lfsmake1 ccache PASS=1
lfsmake1 make PASS=1
lfsmake1 binutils PASS=1
lfsmake1 gcc PASS=1
- export PATH=$BASEDIR/build/usr/local/bin:$BASEDIR/build/tools/bin:$PATH
- lfsmake1 linux-libc-header
+ if [ "${MACHINE}" = "arm" ]; then
+ lfsmake1 linux TOOLS=1 HEADERS=1
+ else
+ lfsmake1 linux-libc-header
+ fi
lfsmake1 glibc
lfsmake1 cleanup-toolchain PASS=1
lfsmake1 tcl
LOGFILE="$BASEDIR/log/_build.base.log"
export LOGFILE
lfsmake2 stage2
- lfsmake2 linux-libc-header
+ if [ "${MACHINE}" = "arm" ]; then
+ lfsmake2 linux HEADERS=1
+ else
+ lfsmake2 linux-libc-header
+ fi
lfsmake2 man-pages
lfsmake2 glibc
lfsmake2 cleanup-toolchain PASS=3
lfsmake2 udev
lfsmake2 util-linux
lfsmake2 vim
- lfsmake2 grub
+
+ # ARM cannot use grub.
+ if [ "${MACHINE}" != "arm" ]; then
+ lfsmake2 grub
+ fi
}
buildipfire() {
ipfiremake xz
ipfiremake linux-firmware
ipfiremake zd1211-firmware
- ipfiremake linux XEN=1
- ipfiremake kqemu XEN=1
- ipfiremake v4l-dvb XEN=1
- ipfiremake madwifi XEN=1
- ipfiremake mISDN XEN=1
- ipfiremake dahdi XEN=1 KMOD=1
- ipfiremake cryptodev XEN=1
- ipfiremake compat-wireless XEN=1
- ipfiremake r8169 XEN=1
- ipfiremake r8168 XEN=1
- ipfiremake r8101 XEN=1
- ipfiremake e1000 XEN=1
- ipfiremake e1000e XEN=1
- ipfiremake igb XEN=1
- ipfiremake linux PAE=1
- ipfiremake kqemu PAE=1
- ipfiremake kvm-kmod PAE=1
- ipfiremake v4l-dvb PAE=1
- ipfiremake madwifi PAE=1
- ipfiremake alsa PAE=1 KMOD=1
- ipfiremake mISDN PAE=1
- ipfiremake dahdi PAE=1 KMOD=1
- ipfiremake cryptodev PAE=1
- ipfiremake compat-wireless PAE=1
-# ipfiremake r8169 PAE=1
-# ipfiremake r8168 PAE=1
-# ipfiremake r8101 PAE=1
- ipfiremake e1000 PAE=1
- ipfiremake e1000e PAE=1
- ipfiremake igb PAE=1
+
+ # The xen and PAE kernels are only available for x86
+ if [ "${MACHINE}" != "arm" ]; then
+ ipfiremake linux XEN=1
+ ipfiremake kqemu XEN=1
+ ipfiremake v4l-dvb XEN=1
+ ipfiremake madwifi XEN=1
+ ipfiremake mISDN XEN=1
+ ipfiremake dahdi XEN=1 KMOD=1
+ ipfiremake cryptodev XEN=1
+ ipfiremake compat-wireless XEN=1
+ ipfiremake r8169 XEN=1
+ ipfiremake r8168 XEN=1
+ ipfiremake r8101 XEN=1
+ ipfiremake e1000 XEN=1
+ ipfiremake e1000e XEN=1
+ ipfiremake igb XEN=1
+ ipfiremake linux PAE=1
+ ipfiremake kqemu PAE=1
+ ipfiremake kvm-kmod PAE=1
+ ipfiremake v4l-dvb PAE=1
+ ipfiremake madwifi PAE=1
+ ipfiremake alsa PAE=1 KMOD=1
+ ipfiremake mISDN PAE=1
+ ipfiremake dahdi PAE=1 KMOD=1
+ ipfiremake cryptodev PAE=1
+ ipfiremake compat-wireless PAE=1
+# ipfiremake r8169 PAE=1
+# ipfiremake r8168 PAE=1
+# ipfiremake r8101 PAE=1
+ ipfiremake e1000 PAE=1
+ ipfiremake e1000e PAE=1
+ ipfiremake igb PAE=1
+ fi
+
+ # Default kernel build
ipfiremake linux
- ipfiremake kqemu
- ipfiremake kvm-kmod
+
+ # Virtualization helpers are only available for x86.
+ if [ "${MACHINE}" != "arm" ]; then
+ ipfiremake kqemu
+ ipfiremake kvm-kmod
+ fi
ipfiremake v4l-dvb
ipfiremake madwifi
ipfiremake alsa KMOD=1
for i in *; do
if [ -f "$i" -a "$i" != "Config" ]; then
echo -ne "Loading $i"
- make -s -f $i LFS_BASEDIR=$BASEDIR MESSAGE="$i\t ($c/$MAX_RETRIES)" download >> $LOGFILE 2>&1
+ make -s -f $i LFS_BASEDIR=$BASEDIR MACHINE=$MACHINE \
+ MESSAGE="$i\t ($c/$MAX_RETRIES)" download >> $LOGFILE 2>&1
if [ $? -ne 0 ]; then
beautify message FAIL
FINISHED=0
ERROR=0
for i in *; do
if [ -f "$i" -a "$i" != "Config" ]; then
- make -s -f $i LFS_BASEDIR=$BASEDIR MESSAGE="$i\t " md5 >> $LOGFILE 2>&1
+ make -s -f $i LFS_BASEDIR=$BASEDIR MACHINE=$MACHINE \
+ MESSAGE="$i\t " md5 >> $LOGFILE 2>&1
if [ $? -ne 0 ]; then
echo -ne "MD5 difference in lfs/$i"
beautify message FAIL
test -d $BASEDIR/cache/toolchains || mkdir -p $BASEDIR/cache/toolchains
cd $BASEDIR && tar -zc --exclude='log/_build.*.log' -f cache/toolchains/$SNAME-$VERSION-toolchain-$TOOLCHAINVER-$BUILDMACHINE.tar.gz \
build/{bin,etc,usr/bin,usr/local} \
- build/tools/{bin,etc,*-linux-gnu,include,lib,libexec,sbin,share,var} \
+ build/tools/{bin,etc,*-linux-gnu*,include,lib,libexec,sbin,share,var} \
log >> $LOGFILE
md5sum cache/toolchains/$SNAME-$VERSION-toolchain-$TOOLCHAINVER-$BUILDMACHINE.tar.gz \
> cache/toolchains/$SNAME-$VERSION-toolchain-$TOOLCHAINVER-$BUILDMACHINE.md5
--- /dev/null
+From b50508742035812f8ae8671eedc6623fac53f51d Mon Sep 17 00:00:00 2001
+From: Jim Meyering <jim@meyering.net>
+Date: Thu, 22 Jun 2006 12:50:32 +0000
+Subject: [PATCH] * src/tee.c (tee_files): Rename from tee, to avoid conflict with
+ the function in glibc's <fcntl.h>. Reported by Andreas Schwab.
+
+---
+ src/tee.c | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/src/tee.c b/src/tee.c
+index f99642d..f612181 100644
+--- a/src/tee.c
++++ b/src/tee.c
+@@ -1,5 +1,5 @@
+ /* tee - read from standard input and write to standard output and files.
+- Copyright (C) 85,1990-2005 Free Software Foundation, Inc.
++ Copyright (C) 85,1990-2006 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+@@ -31,7 +31,7 @@
+
+ #define AUTHORS "Mike Parker", "Richard M. Stallman", "David MacKenzie"
+
+-static bool tee (int nfiles, const char **files);
++static bool tee_files (int nfiles, const char **files);
+
+ /* If true, append to output files rather than truncating them. */
+ static bool append;
+@@ -121,7 +121,7 @@ main (int argc, char **argv)
+ /* Do *not* warn if tee is given no file arguments.
+ POSIX requires that it work when given no arguments. */
+
+- ok = tee (argc - optind, (const char **) &argv[optind]);
++ ok = tee_files (argc - optind, (const char **) &argv[optind]);
+ if (close (STDIN_FILENO) != 0)
+ error (EXIT_FAILURE, errno, _("standard input"));
+
+@@ -133,7 +133,7 @@ main (int argc, char **argv)
+ Return true if successful. */
+
+ static bool
+-tee (int nfiles, const char **files)
++tee_files (int nfiles, const char **files)
+ {
+ FILE **descriptors;
+ char buffer[BUFSIZ];
+--
+1.7.2.5
+
--- /dev/null
+diff -u -r gcc-4.0.2/gcc/config/arm/t-linux gcc-4.0.2/gcc/config/arm.new/t-linux
+--- gcc-4.0.2/gcc/config/arm/t-linux 2005-10-18 22:04:44.000000000 +1000
++++ gcc-4.0.2/gcc/config/arm.new/t-linux 2005-10-18 22:05:03.000000000 +1000
+@@ -4,7 +4,12 @@ TARGET_LIBGCC2_CFLAGS = -fomit-frame-poi
+ LIBGCC2_DEBUG_CFLAGS = -g0
+
+ LIB1ASMSRC = arm/lib1funcs.asm
+-LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx
++LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx \
++ _negdf2 _addsubdf3 _muldivdf3 _cmpdf2 _unorddf2 _fixdfsi _fixunsdfsi \
++ _truncdfsf2 _negsf2 _addsubsf3 _muldivsf3 _cmpsf2 _unordsf2 \
++ _fixsfsi _fixunssfsi _floatdidf _floatdisf \
++ _bb_init_func _call_via_rX _interwork_call_via_rX \
++ _lshrdi3 _ashrdi3 _ashldi3
+
+ # MULTILIB_OPTIONS = mhard-float/msoft-float
+ # MULTILIB_DIRNAMES = hard-float soft-float
+
+
+--- gcc-4.1.1/gcc/config/arm/linux-elf.h 2007-01-06 11:17:51.000000000 +0000
++++ gcc-4.1.1/gcc/config/arm/linux-elf-soft.h 2007-01-06 11:22:01.000000000 +0000
+@@ -49,7 +49,7 @@
+ %{shared:-lc} \
+ %{!shared:%{profile:-lc_p}%{!profile:-lc}}"
+
+-#define LIBGCC_SPEC "%{msoft-float:-lfloat} %{mfloat-abi=soft*:-lfloat} -lgcc"
++/* #define LIBGCC_SPEC "%{msoft-float:-lfloat} %{mfloat-abi=soft*:-lfloat} -lgcc" */
+
+ #define LINUX_TARGET_INTERPRETER "/lib/ld-linux.so.2"
+
--- /dev/null
+diff -ur gcc-4.1.2/gcc/cp/g++spec.c gcc-4.1.2-gcc_eh/gcc/cp/g++spec.c
+--- gcc-4.1.2/gcc/cp/g++spec.c 2005-06-25 02:59:41.000000000 +0200
++++ gcc-4.1.2-gcc_eh/gcc/cp/g++spec.c 2007-08-03 14:46:03.000000000 +0200
+@@ -251,7 +251,7 @@
+ #endif
+
+ /* Make sure to have room for the trailing NULL argument. */
+- num_args = argc + added + need_math + shared_libgcc + (library > 0) + 1;
++ num_args = argc + added + need_math + shared_libgcc + 2 * (library > 0) + 1;
+ arglist = xmalloc (num_args * sizeof (char *));
+
+ i = 0;
+@@ -311,7 +311,10 @@
+ {
+ arglist[j] = saw_profile_flag ? LIBSTDCXX_PROFILE : LIBSTDCXX;
+ if (arglist[j][0] != '-' || arglist[j][1] == 'l')
+- added_libraries++;
++ {
++ arglist[++j] = "-lgcc_eh";
++ added_libraries += 2;
++ }
+ j++;
+ }
+ if (saw_math)
--- /dev/null
+diff -Naur gcc-4.1.2.orig/gcc/config/alpha/linux-elf.h gcc-4.1.2/gcc/config/alpha/linux-elf.h
+--- gcc-4.1.2.orig/gcc/config/alpha/linux-elf.h 2005-06-25 01:22:41.000000000 +0000
++++ gcc-4.1.2/gcc/config/alpha/linux-elf.h 2011-09-01 17:11:11.000000000 +0000
+@@ -27,7 +27,7 @@
+ #define SUBTARGET_EXTRA_SPECS \
+ { "elf_dynamic_linker", ELF_DYNAMIC_LINKER },
+
+-#define ELF_DYNAMIC_LINKER "/lib/ld-linux.so.2"
++#define ELF_DYNAMIC_LINKER "/tools/lib/ld-linux.so.2"
+
+ #define LINK_SPEC "-m elf64alpha %{G*} %{relax:-relax} \
+ %{O*:-O3} %{!O*:-O1} \
+diff -Naur gcc-4.1.2.orig/gcc/config/arm/linux-eabi.h gcc-4.1.2/gcc/config/arm/linux-eabi.h
+--- gcc-4.1.2.orig/gcc/config/arm/linux-eabi.h 2005-11-15 14:32:13.000000000 +0000
++++ gcc-4.1.2/gcc/config/arm/linux-eabi.h 2011-09-01 17:11:47.000000000 +0000
+@@ -53,7 +53,7 @@
+ /* Use ld-linux.so.3 so that it will be possible to run "classic"
+ GNU/Linux binaries on an EABI system. */
+ #undef LINUX_TARGET_INTERPRETER
+-#define LINUX_TARGET_INTERPRETER "/lib/ld-linux.so.3"
++#define LINUX_TARGET_INTERPRETER "/tools/lib/ld-linux.so.3"
+
+ /* At this point, bpabi.h will have clobbered LINK_SPEC. We want to
+ use the GNU/Linux version, not the generic BPABI version. */
+diff -Naur gcc-4.1.2.orig/gcc/config/arm/linux-elf.h gcc-4.1.2/gcc/config/arm/linux-elf.h
+--- gcc-4.1.2.orig/gcc/config/arm/linux-elf.h 2005-10-10 01:04:31.000000000 +0000
++++ gcc-4.1.2/gcc/config/arm/linux-elf.h 2011-09-01 17:11:11.000000000 +0000
+@@ -51,7 +51,7 @@
+
+ #define LIBGCC_SPEC "%{msoft-float:-lfloat} %{mfloat-abi=soft*:-lfloat} -lgcc"
+
+-#define LINUX_TARGET_INTERPRETER "/lib/ld-linux.so.2"
++#define LINUX_TARGET_INTERPRETER "/tools/lib/ld-linux.so.2"
+
+ #define LINUX_TARGET_LINK_SPEC "%{h*} %{version:-v} \
+ %{b} \
+diff -Naur gcc-4.1.2.orig/gcc/config/frv/linux.h gcc-4.1.2/gcc/config/frv/linux.h
+--- gcc-4.1.2.orig/gcc/config/frv/linux.h 2005-06-25 01:22:41.000000000 +0000
++++ gcc-4.1.2/gcc/config/frv/linux.h 2011-09-01 17:11:11.000000000 +0000
+@@ -41,7 +41,7 @@
+ %{mfdpic: -m elf32frvfd -z text} %{shared} %{pie} \
+ %{!shared: %{!static: \
+ %{rdynamic:-export-dynamic} \
+- %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}} \
++ %{!dynamic-linker:-dynamic-linker /tools/lib/ld.so.1}} \
+ %{static}}"
+
+ /* Support for compile-time default CPU. */
+diff -Naur gcc-4.1.2.orig/gcc/config/i386/gnu.h gcc-4.1.2/gcc/config/i386/gnu.h
+--- gcc-4.1.2.orig/gcc/config/i386/gnu.h 2004-09-08 00:17:19.000000000 +0000
++++ gcc-4.1.2/gcc/config/i386/gnu.h 2011-09-01 17:11:11.000000000 +0000
+@@ -27,7 +27,7 @@
+ %{!shared: \
+ %{!static: \
+ %{rdynamic:-export-dynamic} \
+- %{!dynamic-linker:-dynamic-linker /lib/ld.so}} \
++ %{!dynamic-linker:-dynamic-linker /tools/lib/ld.so}} \
+ %{static:-static}}"
+
+ #undef STARTFILE_SPEC
+diff -Naur gcc-4.1.2.orig/gcc/config/i386/linux64.h gcc-4.1.2/gcc/config/i386/linux64.h
+--- gcc-4.1.2.orig/gcc/config/i386/linux64.h 2005-08-10 17:53:01.000000000 +0000
++++ gcc-4.1.2/gcc/config/i386/linux64.h 2011-09-01 17:11:11.000000000 +0000
+@@ -60,8 +60,8 @@
+ %{!shared: \
+ %{!static: \
+ %{rdynamic:-export-dynamic} \
+- %{m32:%{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
+- %{!m32:%{!dynamic-linker:-dynamic-linker /lib64/ld-linux-x86-64.so.2}}} \
++ %{m32:%{!dynamic-linker:-dynamic-linker /tools/lib/ld-linux.so.2}} \
++ %{!m32:%{!dynamic-linker:-dynamic-linker /tools/lib64/ld-linux-x86-64.so.2}}} \
+ %{static:-static}}"
+
+ /* Similar to standard Linux, but adding -ffast-math support. */
+diff -Naur gcc-4.1.2.orig/gcc/config/i386/linux.h gcc-4.1.2/gcc/config/i386/linux.h
+--- gcc-4.1.2.orig/gcc/config/i386/linux.h 2005-08-10 17:53:01.000000000 +0000
++++ gcc-4.1.2/gcc/config/i386/linux.h 2011-09-01 17:11:11.000000000 +0000
+@@ -105,7 +105,7 @@
+ /* If ELF is the default format, we should not use /lib/elf. */
+
+ #define LINK_EMULATION "elf_i386"
+-#define DYNAMIC_LINKER "/lib/ld-linux.so.2"
++#define DYNAMIC_LINKER "/tools/lib/ld-linux.so.2"
+
+ #undef SUBTARGET_EXTRA_SPECS
+ #define SUBTARGET_EXTRA_SPECS \
+diff -Naur gcc-4.1.2.orig/gcc/config/ia64/linux.h gcc-4.1.2/gcc/config/ia64/linux.h
+--- gcc-4.1.2.orig/gcc/config/ia64/linux.h 2006-12-12 15:24:07.000000000 +0000
++++ gcc-4.1.2/gcc/config/ia64/linux.h 2011-09-01 17:11:11.000000000 +0000
+@@ -43,7 +43,7 @@
+ %{!shared: \
+ %{!static: \
+ %{rdynamic:-export-dynamic} \
+- %{!dynamic-linker:-dynamic-linker /lib/ld-linux-ia64.so.2}} \
++ %{!dynamic-linker:-dynamic-linker /tools/lib/ld-linux-ia64.so.2}} \
+ %{static:-static}}"
+
+ #define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}"
+diff -Naur gcc-4.1.2.orig/gcc/config/ia64/linux.h.orig gcc-4.1.2/gcc/config/ia64/linux.h.orig
+--- gcc-4.1.2.orig/gcc/config/ia64/linux.h.orig 1970-01-01 00:00:00.000000000 +0000
++++ gcc-4.1.2/gcc/config/ia64/linux.h.orig 2006-12-12 15:24:07.000000000 +0000
+@@ -0,0 +1,59 @@
++/* Definitions for ia64-linux target. */
++
++/* This macro is a C statement to print on `stderr' a string describing the
++ particular machine description choice. */
++
++#define TARGET_VERSION fprintf (stderr, " (IA-64) Linux");
++
++/* This is for -profile to use -lc_p instead of -lc. */
++#undef CC1_SPEC
++#define CC1_SPEC "%{profile:-p} %{G*}"
++
++/* Target OS builtins. */
++#define TARGET_OS_CPP_BUILTINS() \
++do { \
++ LINUX_TARGET_OS_CPP_BUILTINS(); \
++ builtin_define("_LONGLONG"); \
++} while (0)
++
++/* Need to override linux.h STARTFILE_SPEC, since it has crtbeginT.o in. */
++#undef STARTFILE_SPEC
++#ifdef HAVE_LD_PIE
++#define STARTFILE_SPEC \
++ "%{!shared: %{pg|p|profile:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}}\
++ crti.o%s %{shared|pie:crtbeginS.o%s;:crtbegin.o%s}"
++#else
++#define STARTFILE_SPEC \
++ "%{!shared: %{pg|p|profile:gcrt1.o%s;:crt1.o%s}}\
++ crti.o%s %{shared|pie:crtbeginS.o%s;:crtbegin.o%s}"
++#endif
++
++/* Similar to standard Linux, but adding -ffast-math support. */
++#undef ENDFILE_SPEC
++#define ENDFILE_SPEC \
++ "%{ffast-math|funsafe-math-optimizations:crtfastmath.o%s} \
++ %{shared|pie:crtendS.o%s;:crtend.o%s} crtn.o%s"
++
++/* Define this for shared library support because it isn't in the main
++ linux.h file. */
++
++#undef LINK_SPEC
++#define LINK_SPEC "\
++ %{shared:-shared} \
++ %{!shared: \
++ %{!static: \
++ %{rdynamic:-export-dynamic} \
++ %{!dynamic-linker:-dynamic-linker /lib/ld-linux-ia64.so.2}} \
++ %{static:-static}}"
++
++#define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}"
++
++#define JMP_BUF_SIZE 76
++
++/* Override linux.h LINK_EH_SPEC definition.
++ Signalize that because we have fde-glibc, we don't need all C shared libs
++ linked against -lgcc_s. */
++#undef LINK_EH_SPEC
++#define LINK_EH_SPEC ""
++
++#define MD_UNWIND_SUPPORT "config/ia64/linux-unwind.h"
+diff -Naur gcc-4.1.2.orig/gcc/config/linux.h gcc-4.1.2/gcc/config/linux.h
+--- gcc-4.1.2.orig/gcc/config/linux.h 2005-08-06 13:26:35.000000000 +0000
++++ gcc-4.1.2/gcc/config/linux.h 2011-09-01 17:11:11.000000000 +0000
+@@ -104,3 +104,7 @@
+ #define TARGET_C99_FUNCTIONS 1
+
+ #define TARGET_POSIX_IO
++
++/* Remove /usr/include from the end of the include search path. */
++#undef STANDARD_INCLUDE_DIR
++#define STANDARD_INCLUDE_DIR 0
+diff -Naur gcc-4.1.2.orig/gcc/config/m32r/linux.h gcc-4.1.2/gcc/config/m32r/linux.h
+--- gcc-4.1.2.orig/gcc/config/m32r/linux.h 2005-07-08 10:00:15.000000000 +0000
++++ gcc-4.1.2/gcc/config/m32r/linux.h 2011-09-01 17:11:11.000000000 +0000
+@@ -66,7 +66,7 @@
+ %{!ibcs: \
+ %{!static: \
+ %{rdynamic:-export-dynamic} \
+- %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
++ %{!dynamic-linker:-dynamic-linker /tools/lib/ld-linux.so.2}} \
+ %{static:-static}}}"
+ #else
+ #define LINK_SPEC "%(link_cpu) -m m32relf_linux %{shared:-shared} \
+@@ -74,7 +74,7 @@
+ %{!ibcs: \
+ %{!static: \
+ %{rdynamic:-export-dynamic} \
+- %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
++ %{!dynamic-linker:-dynamic-linker /tools/lib/ld-linux.so.2}} \
+ %{static:-static}}}"
+ #endif
+
+diff -Naur gcc-4.1.2.orig/gcc/config/m68k/linux.h gcc-4.1.2/gcc/config/m68k/linux.h
+--- gcc-4.1.2.orig/gcc/config/m68k/linux.h 2005-06-25 01:22:41.000000000 +0000
++++ gcc-4.1.2/gcc/config/m68k/linux.h 2011-09-01 17:11:11.000000000 +0000
+@@ -128,7 +128,7 @@
+ %{!shared: \
+ %{!static: \
+ %{rdynamic:-export-dynamic} \
+- %{!dynamic-linker*:-dynamic-linker /lib/ld.so.1}} \
++ %{!dynamic-linker*:-dynamic-linker /tools/lib/ld.so.1}} \
+ %{static}}"
+
+ /* For compatibility with linux/a.out */
+diff -Naur gcc-4.1.2.orig/gcc/config/mips/linux64.h gcc-4.1.2/gcc/config/mips/linux64.h
+--- gcc-4.1.2.orig/gcc/config/mips/linux64.h 2005-06-25 01:22:41.000000000 +0000
++++ gcc-4.1.2/gcc/config/mips/linux64.h 2011-09-01 17:11:11.000000000 +0000
+@@ -47,9 +47,9 @@
+ %{!static: \
+ %{rdynamic:-export-dynamic} \
+ %{!dynamic-linker: \
+- %{mabi=n32: -dynamic-linker /lib32/ld.so.1} \
+- %{mabi=64: -dynamic-linker /lib64/ld.so.1} \
+- %{mabi=32: -dynamic-linker /lib/ld.so.1}}} \
++ %{mabi=n32: -dynamic-linker /tools/lib32/ld.so.1} \
++ %{mabi=64: -dynamic-linker /tools/lib64/ld.so.1} \
++ %{mabi=32: -dynamic-linker /tools/lib/ld.so.1}}} \
+ %{static:-static}}} \
+ %{mabi=n32:-melf32%{EB:b}%{EL:l}tsmipn32} \
+ %{mabi=64:-melf64%{EB:b}%{EL:l}tsmip} \
+diff -Naur gcc-4.1.2.orig/gcc/config/mips/linux.h gcc-4.1.2/gcc/config/mips/linux.h
+--- gcc-4.1.2.orig/gcc/config/mips/linux.h 2006-12-17 13:57:31.000000000 +0000
++++ gcc-4.1.2/gcc/config/mips/linux.h 2011-09-01 17:11:11.000000000 +0000
+@@ -112,7 +112,7 @@
+ %{!ibcs: \
+ %{!static: \
+ %{rdynamic:-export-dynamic} \
+- %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}} \
++ %{!dynamic-linker:-dynamic-linker /tools/lib/ld.so.1}} \
+ %{static:-static}}}"
+
+ #undef SUBTARGET_ASM_SPEC
+diff -Naur gcc-4.1.2.orig/gcc/config/mn10300/linux.h gcc-4.1.2/gcc/config/mn10300/linux.h
+--- gcc-4.1.2.orig/gcc/config/mn10300/linux.h 2005-06-25 01:22:41.000000000 +0000
++++ gcc-4.1.2/gcc/config/mn10300/linux.h 2011-09-01 17:11:11.000000000 +0000
+@@ -37,7 +37,7 @@
+ #define LINK_SPEC "%{mrelax:--relax} %{shared:-shared} \
+ %{!static: \
+ %{rdynamic:-export-dynamic} \
+- %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}} \
++ %{!dynamic-linker:-dynamic-linker /tools/lib/ld.so.1}} \
+ %{static:-static}"
+
+ #undef PROCESSOR_DEFAULT
+diff -Naur gcc-4.1.2.orig/gcc/config/pa/pa-linux.h gcc-4.1.2/gcc/config/pa/pa-linux.h
+--- gcc-4.1.2.orig/gcc/config/pa/pa-linux.h 2007-01-12 02:23:38.000000000 +0000
++++ gcc-4.1.2/gcc/config/pa/pa-linux.h 2011-09-01 17:11:11.000000000 +0000
+@@ -55,7 +55,7 @@
+ %{!shared: \
+ %{!static: \
+ %{rdynamic:-export-dynamic} \
+- %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}} \
++ %{!dynamic-linker:-dynamic-linker /tools/lib/ld.so.1}} \
+ %{static:-static}}"
+
+ /* glibc's profiling functions don't need gcc to allocate counters. */
+diff -Naur gcc-4.1.2.orig/gcc/config/rs6000/linux64.h gcc-4.1.2/gcc/config/rs6000/linux64.h
+--- gcc-4.1.2.orig/gcc/config/rs6000/linux64.h 2006-02-10 20:58:33.000000000 +0000
++++ gcc-4.1.2/gcc/config/rs6000/linux64.h 2011-09-01 17:11:11.000000000 +0000
+@@ -339,11 +339,11 @@
+
+ #define LINK_OS_LINUX_SPEC32 "-m elf32ppclinux %{!shared: %{!static: \
+ %{rdynamic:-export-dynamic} \
+- %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}}}"
++ %{!dynamic-linker:-dynamic-linker /tools/lib/ld.so.1}}}"
+
+ #define LINK_OS_LINUX_SPEC64 "-m elf64ppc %{!shared: %{!static: \
+ %{rdynamic:-export-dynamic} \
+- %{!dynamic-linker:-dynamic-linker /lib64/ld64.so.1}}}"
++ %{!dynamic-linker:-dynamic-linker /tools/lib64/ld64.so.1}}}"
+
+ #undef TOC_SECTION_ASM_OP
+ #define TOC_SECTION_ASM_OP \
+diff -Naur gcc-4.1.2.orig/gcc/config/rs6000/sysv4.h gcc-4.1.2/gcc/config/rs6000/sysv4.h
+--- gcc-4.1.2.orig/gcc/config/rs6000/sysv4.h 2006-02-10 20:58:33.000000000 +0000
++++ gcc-4.1.2/gcc/config/rs6000/sysv4.h 2011-09-01 17:11:11.000000000 +0000
+@@ -1041,7 +1041,7 @@
+
+ #define LINK_OS_LINUX_SPEC "-m elf32ppclinux %{!shared: %{!static: \
+ %{rdynamic:-export-dynamic} \
+- %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}}}"
++ %{!dynamic-linker:-dynamic-linker /tools/lib/ld.so.1}}}"
+
+ #if defined(HAVE_LD_EH_FRAME_HDR)
+ # define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
+@@ -1072,7 +1072,7 @@
+
+ #define LINK_OS_GNU_SPEC "-m elf32ppclinux %{!shared: %{!static: \
+ %{rdynamic:-export-dynamic} \
+- %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}}}"
++ %{!dynamic-linker:-dynamic-linker /tools/lib/ld.so.1}}}"
+
+ #define CPP_OS_GNU_SPEC "-D__unix__ -D__gnu_hurd__ -D__GNU__ \
+ %{!undef: \
+diff -Naur gcc-4.1.2.orig/gcc/config/s390/linux.h gcc-4.1.2/gcc/config/s390/linux.h
+--- gcc-4.1.2.orig/gcc/config/s390/linux.h 2006-12-12 15:24:07.000000000 +0000
++++ gcc-4.1.2/gcc/config/s390/linux.h 2011-09-01 17:11:11.000000000 +0000
+@@ -86,8 +86,8 @@
+ %{!static: \
+ %{rdynamic:-export-dynamic} \
+ %{!dynamic-linker: \
+- %{m31:-dynamic-linker /lib/ld.so.1} \
+- %{m64:-dynamic-linker /lib/ld64.so.1}}}}"
++ %{m31:-dynamic-linker /tools/lib/ld.so.1} \
++ %{m64:-dynamic-linker /tools/lib/ld64.so.1}}}}"
+
+ #define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}"
+
+diff -Naur gcc-4.1.2.orig/gcc/config/s390/linux.h.orig gcc-4.1.2/gcc/config/s390/linux.h.orig
+--- gcc-4.1.2.orig/gcc/config/s390/linux.h.orig 1970-01-01 00:00:00.000000000 +0000
++++ gcc-4.1.2/gcc/config/s390/linux.h.orig 2006-12-12 15:24:07.000000000 +0000
+@@ -0,0 +1,107 @@
++/* Definitions for Linux for S/390.
++ Copyright (C) 1999, 2000, 2001, 2002, 2004 Free Software Foundation, Inc.
++ Contributed by Hartmut Penner (hpenner@de.ibm.com) and
++ Ulrich Weigand (uweigand@de.ibm.com).
++
++This file is part of GCC.
++
++GCC is free software; you can redistribute it and/or modify it under
++the terms of the GNU General Public License as published by the Free
++Software Foundation; either version 2, or (at your option) any later
++version.
++
++GCC is distributed in the hope that it will be useful, but WITHOUT ANY
++WARRANTY; without even the implied warranty of MERCHANTABILITY or
++FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
++for more details.
++
++You should have received a copy of the GNU General Public License
++along with GCC; see the file COPYING. If not, write to the Free
++Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
++02110-1301, USA. */
++
++#ifndef _LINUX_H
++#define _LINUX_H
++
++/* Target specific version string. */
++
++#ifdef DEFAULT_TARGET_64BIT
++#undef TARGET_VERSION
++#define TARGET_VERSION fprintf (stderr, " (Linux for zSeries)");
++#else
++#undef TARGET_VERSION
++#define TARGET_VERSION fprintf (stderr, " (Linux for S/390)");
++#endif
++
++
++/* Target specific type definitions. */
++
++/* ??? Do we really want long as size_t on 31-bit? */
++#undef SIZE_TYPE
++#define SIZE_TYPE (TARGET_64BIT ? "long unsigned int" : "long unsigned int")
++#undef PTRDIFF_TYPE
++#define PTRDIFF_TYPE (TARGET_64BIT ? "long int" : "int")
++
++#undef WCHAR_TYPE
++#define WCHAR_TYPE "int"
++#undef WCHAR_TYPE_SIZE
++#define WCHAR_TYPE_SIZE 32
++
++
++/* Target specific preprocessor settings. */
++
++#define TARGET_OS_CPP_BUILTINS() \
++ do \
++ { \
++ LINUX_TARGET_OS_CPP_BUILTINS(); \
++ if (flag_pic) \
++ { \
++ builtin_define ("__PIC__"); \
++ builtin_define ("__pic__"); \
++ } \
++ } \
++ while (0)
++
++
++/* Target specific assembler settings. */
++
++#undef ASM_SPEC
++#define ASM_SPEC "%{m31&m64}%{mesa&mzarch}%{march=*}"
++
++
++/* Target specific linker settings. */
++
++#ifdef DEFAULT_TARGET_64BIT
++#define MULTILIB_DEFAULTS { "m64" }
++#else
++#define MULTILIB_DEFAULTS { "m31" }
++#endif
++
++#undef LINK_SPEC
++#define LINK_SPEC \
++ "%{m31:-m elf_s390}%{m64:-m elf64_s390} \
++ %{shared:-shared} \
++ %{!shared: \
++ %{static:-static} \
++ %{!static: \
++ %{rdynamic:-export-dynamic} \
++ %{!dynamic-linker: \
++ %{m31:-dynamic-linker /lib/ld.so.1} \
++ %{m64:-dynamic-linker /lib/ld64.so.1}}}}"
++
++#define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}"
++
++#define TARGET_ASM_FILE_END file_end_indicate_exec_stack
++
++#define MD_UNWIND_SUPPORT "config/s390/linux-unwind.h"
++
++#ifdef TARGET_LIBC_PROVIDES_SSP
++/* s390 glibc provides __stack_chk_guard in 0x14(tp),
++ s390x glibc provides it at 0x28(tp). */
++#define TARGET_THREAD_SSP_OFFSET (TARGET_64BIT ? 0x28 : 0x14)
++#endif
++
++/* Define if long doubles should be mangled as 'g'. */
++#define TARGET_ALTERNATE_LONG_DOUBLE_MANGLING
++
++#endif
+diff -Naur gcc-4.1.2.orig/gcc/config/sh/linux.h gcc-4.1.2/gcc/config/sh/linux.h
+--- gcc-4.1.2.orig/gcc/config/sh/linux.h 2005-06-25 01:22:41.000000000 +0000
++++ gcc-4.1.2/gcc/config/sh/linux.h 2011-09-01 17:11:11.000000000 +0000
+@@ -60,7 +60,7 @@
+ "%{shared:-shared} \
+ %{!static: \
+ %{rdynamic:-export-dynamic} \
+- %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
++ %{!dynamic-linker:-dynamic-linker /tools/lib/ld-linux.so.2}} \
+ %{static:-static}"
+
+ /* Output assembler code to STREAM to call the profiler. */
+diff -Naur gcc-4.1.2.orig/gcc/config/sparc/linux64.h gcc-4.1.2/gcc/config/sparc/linux64.h
+--- gcc-4.1.2.orig/gcc/config/sparc/linux64.h 2006-02-11 08:38:51.000000000 +0000
++++ gcc-4.1.2/gcc/config/sparc/linux64.h 2011-09-01 17:11:11.000000000 +0000
+@@ -162,21 +162,21 @@
+ { "link_arch_default", LINK_ARCH_DEFAULT_SPEC }, \
+ { "link_arch", LINK_ARCH_SPEC },
+
+-#define LINK_ARCH32_SPEC "-m elf32_sparc -Y P,/usr/lib %{shared:-shared} \
++#define LINK_ARCH32_SPEC "-m elf32_sparc -Y P,/tools/lib %{shared:-shared} \
+ %{!shared: \
+ %{!ibcs: \
+ %{!static: \
+ %{rdynamic:-export-dynamic} \
+- %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
++ %{!dynamic-linker:-dynamic-linker /tools/lib/ld-linux.so.2}} \
+ %{static:-static}}} \
+ "
+
+-#define LINK_ARCH64_SPEC "-m elf64_sparc -Y P,/usr/lib64 %{shared:-shared} \
++#define LINK_ARCH64_SPEC "-m elf64_sparc -Y P,/tools/lib64 %{shared:-shared} \
+ %{!shared: \
+ %{!ibcs: \
+ %{!static: \
+ %{rdynamic:-export-dynamic} \
+- %{!dynamic-linker:-dynamic-linker /lib64/ld-linux.so.2}} \
++ %{!dynamic-linker:-dynamic-linker /tools/lib64/ld-linux.so.2}} \
+ %{static:-static}}} \
+ "
+
+@@ -252,12 +252,12 @@
+ #else /* !SPARC_BI_ARCH */
+
+ #undef LINK_SPEC
+-#define LINK_SPEC "-m elf64_sparc -Y P,/usr/lib64 %{shared:-shared} \
++#define LINK_SPEC "-m elf64_sparc -Y P,/tools/lib64 %{shared:-shared} \
+ %{!shared: \
+ %{!ibcs: \
+ %{!static: \
+ %{rdynamic:-export-dynamic} \
+- %{!dynamic-linker:-dynamic-linker /lib64/ld-linux.so.2}} \
++ %{!dynamic-linker:-dynamic-linker /tools/lib64/ld-linux.so.2}} \
+ %{static:-static}}} \
+ %{mlittle-endian:-EL} \
+ %{!mno-relax:%{!r:-relax}} \
+diff -Naur gcc-4.1.2.orig/gcc/config/sparc/linux.h gcc-4.1.2/gcc/config/sparc/linux.h
+--- gcc-4.1.2.orig/gcc/config/sparc/linux.h 2006-02-11 08:38:51.000000000 +0000
++++ gcc-4.1.2/gcc/config/sparc/linux.h 2011-09-01 17:11:11.000000000 +0000
+@@ -126,13 +126,13 @@
+ /* If ELF is the default format, we should not use /lib/elf. */
+
+ #undef LINK_SPEC
+-#define LINK_SPEC "-m elf32_sparc -Y P,/usr/lib %{shared:-shared} \
++#define LINK_SPEC "-m elf32_sparc -Y P,/tools/lib %{shared:-shared} \
+ %{!mno-relax:%{!r:-relax}} \
+ %{!shared: \
+ %{!ibcs: \
+ %{!static: \
+ %{rdynamic:-export-dynamic} \
+- %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
++ %{!dynamic-linker:-dynamic-linker /tools/lib/ld-linux.so.2}} \
+ %{static:-static}}}"
+
+ /* The sun bundled assembler doesn't accept -Yd, (and neither does gas).
+diff -Naur gcc-4.1.2.orig/gcc/config/xtensa/linux.h gcc-4.1.2/gcc/config/xtensa/linux.h
+--- gcc-4.1.2.orig/gcc/config/xtensa/linux.h 2005-06-25 01:22:41.000000000 +0000
++++ gcc-4.1.2/gcc/config/xtensa/linux.h 2011-09-01 17:11:11.000000000 +0000
+@@ -50,7 +50,7 @@
+ %{!ibcs: \
+ %{!static: \
+ %{rdynamic:-export-dynamic} \
+- %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}} \
++ %{!dynamic-linker:-dynamic-linker /tools/lib/ld.so.1}} \
+ %{static:-static}}}"
+
+ #undef LOCAL_LABEL_PREFIX
--- /dev/null
+#
+# Submitted-By: Marc Kleine-Budde, 2006-11-22
+# Committed-By: Marc Kleine-Budde
+#
+# Error:
+#
+# try to compile glibc-ports with sanitized headers
+#
+# arm-v4t-linux-gnueabi-gcc ../ports/sysdeps/arm/eabi/setfpucw.c -c
+#-std=gnu99 -O2 -Wall -Winline -Wwrite-strings -fmerge-all-constants
+#-g -Wstrict-prototypes -Wno-uninitialized -D__NO_MATH_INLINES
+#-D__LIBC_INTERNAL_MATH_INLINES -DNO_LONG_DOUBLE
+#-D_Mlong_double_=double -I../include
+#-I/home/mkl/pengutronix/ptxdist/build/OSELAS.Toolchain-trunk-headers/build-target/glibc-2.5-build/math
+#-I/home/mkl/pengutronix/ptxdist/build/OSELAS.Toolchain-trunk-headers/build-target/glibc-2.5-build
+#-I../ports/sysdeps/arm/elf
+#-I../ports/sysdeps/unix/sysv/linux/arm/eabi/nptl
+#-I../ports/sysdeps/unix/sysv/linux/arm/eabi
+#-I../ports/sysdeps/unix/sysv/linux/arm/nptl
+#-I../ports/sysdeps/unix/sysv/linux/arm
+#-I../ports/sysdeps/unix/sysv/linux -I../nptl/sysdeps/unix/sysv/linux
+#-I../nptl/sysdeps/pthread -I../sysdeps/pthread
+#-I../sysdeps/unix/sysv/linux -I../sysdeps/gnu
+#-I../sysdeps/unix/common -I../sysdeps/unix/mman
+#-I../sysdeps/unix/inet -I../ports/sysdeps/unix/sysv
+#-I../nptl/sysdeps/unix/sysv -I../sysdeps/unix/sysv
+#-I../ports/sysdeps/unix/arm -I../ports/sysdeps/unix
+#-I../nptl/sysdeps/unix -I../sysdeps/unix -I../sysdeps/posix
+#-I../ports/sysdeps/arm/eabi -I../ports/sysdeps/arm/nptl
+#-I../ports/sysdeps/arm -I../sysdeps/wordsize-32
+#-I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754/dbl-64
+#-I../sysdeps/ieee754 -I../sysdeps/generic/elf -I../sysdeps/generic
+#-I../ports -I../nptl -I.. -I../libio -I. -nostdinc -isystem
+#/ptx/work/mkl/ptxdist/build/OSELAS.Toolchain-trunk-headers/install/arm-v4t-linux-gnueabi/gcc-4.1.1-glibc-2.5-linux-2.6.19-rc6-s/bin/../lib/gcc/arm-v4t-linux-gnueabi/4.1.1/include
+#-isystem
+#/home/mkl/pengutronix/ptxdist/build/OSELAS.Toolchain-trunk-headers/install/arm-v4t-linux-gnueabi/gcc-4.1.1-glibc-2.5-linux-2.6.19-rc6-s/sysroot-arm-v4t-linux-gnueabi/usr/include
+#-D_LIBC_REENTRANT -include ../include/libc-symbols.h -o
+#/home/mkl/pengutronix/ptxdist/build/OSELAS.Toolchain-trunk-headers/build-target/glibc-2.5-build/math/setfpucw.o
+#-MD -MP -MF
+#/home/mkl/pengutronix/ptxdist/build/OSELAS.Toolchain-trunk-headers/build-target/glibc-2.5-build/math/setfpucw.o.dt
+#-MT
+#/home/mkl/pengutronix/ptxdist/build/OSELAS.Toolchain-trunk-headers/build-target/glibc-2.5-build/math/setfpucw.o
+# ../ports/sysdeps/arm/eabi/setfpucw.c:26:26: error: asm/procinfo.h: No such file or directory
+# ../ports/sysdeps/arm/eabi/setfpucw.c: In function '__setfpucw':
+# ../ports/sysdeps/arm/eabi/setfpucw.c:31: error: 'HWCAP_VFP' undeclared (first use in this function)
+# ../ports/sysdeps/arm/eabi/setfpucw.c:31: error: (Each undeclared identifier is reported only once
+# ../ports/sysdeps/arm/eabi/setfpucw.c:31: error: for each function it appears in.)
+#
+# Description:
+#
+# http://sourceware.org/ml/libc-ports/2006-10/msg00040.html
+#
+# State:
+#
+# added to glibc-ports on 10/31/2006 06:20 PM
+#
+Date: Tue, 24 Oct 2006 19:25:12 +0000 (UTC)
+From: "Joseph S. Myers" <joseph@codesourcery.com>
+To: libc-ports@sourceware.org
+Subject: Avoid using asm/procinfo.h
+
+I previously noted
+<http://sourceware.org/ml/libc-ports/2006-08/msg00023.html> that the
+use of <asm/procinfo.h>, a Linux-specific kernel header, in
+sysdeps/arm/eabi, is an abstraction violation, and that in principle
+all the files in sysdeps/arm/eabi should use sysdep.h not
+asm/procinfo.h for HWCAP_VFP.
+
+The ARM kernel maintainers have now declared that <asm/procinfo.h>
+should not be used outside the kernel at all (and in particular that
+headers_install is correct in not exporting it), and that these
+definitions will move to a different kernel header. This gives a
+concrete reason for making the change to use glibc's internal
+definitions, which this patch does, thereby allowing glibc to build
+with the exported headers.
+
+2006-10-24 Joseph S. Myers <joseph@codesourcery.com>
+
+ * sysdeps/arm/eabi/fclrexcpt.c: Include <sysdep.h> instead of
+ <asm/procinfo.h>. Use HWCAP_ARM_VFP instead of HWCAP_VFP.
+ * sysdeps/arm/eabi/fedisblxcpt.c: Likewise.
+ * sysdeps/arm/eabi/feenablxcpt.c: Likewise.
+ * sysdeps/arm/eabi/fegetenv.c: Likewise.
+ * sysdeps/arm/eabi/fegetexcept.c: Likewise.
+ * sysdeps/arm/eabi/fegetround.c: Likewise.
+ * sysdeps/arm/eabi/feholdexcpt.c: Likewise.
+ * sysdeps/arm/eabi/fesetenv.c: Likewise.
+ * sysdeps/arm/eabi/fesetround.c: Likewise.
+ * sysdeps/arm/eabi/fraiseexcpt.c: Likewise.
+ * sysdeps/arm/eabi/fsetexcptflg.c: Likewise.
+ * sysdeps/arm/eabi/ftestexcept.c: Likewise.
+ * sysdeps/arm/eabi/setfpucw.c: Likewise.
+
+Index: glibc-ports-2.5/sysdeps/arm/eabi/fclrexcpt.c
+===================================================================
+--- glibc-ports-2.5.orig/sysdeps/arm/eabi/fclrexcpt.c
++++ glibc-ports-2.5/sysdeps/arm/eabi/fclrexcpt.c
+@@ -23,12 +23,12 @@
+ #include <unistd.h>
+ #include <ldsodefs.h>
+ #include <dl-procinfo.h>
+-#include <asm/procinfo.h>
++#include <sysdep.h>
+
+ int
+ __feclearexcept (int excepts)
+ {
+- if (GLRO (dl_hwcap) & HWCAP_VFP)
++ if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
+ {
+ unsigned long int temp;
+
+Index: glibc-ports-2.5/sysdeps/arm/eabi/fedisblxcpt.c
+===================================================================
+--- glibc-ports-2.5.orig/sysdeps/arm/eabi/fedisblxcpt.c
++++ glibc-ports-2.5/sysdeps/arm/eabi/fedisblxcpt.c
+@@ -24,12 +24,12 @@
+ #include <unistd.h>
+ #include <ldsodefs.h>
+ #include <dl-procinfo.h>
+-#include <asm/procinfo.h>
++#include <sysdep.h>
+
+ int
+ fedisableexcept (int excepts)
+ {
+- if (GLRO (dl_hwcap) & HWCAP_VFP)
++ if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
+ {
+ unsigned long int new_exc, old_exc;
+
+Index: glibc-ports-2.5/sysdeps/arm/eabi/feenablxcpt.c
+===================================================================
+--- glibc-ports-2.5.orig/sysdeps/arm/eabi/feenablxcpt.c
++++ glibc-ports-2.5/sysdeps/arm/eabi/feenablxcpt.c
+@@ -24,12 +24,12 @@
+ #include <unistd.h>
+ #include <ldsodefs.h>
+ #include <dl-procinfo.h>
+-#include <asm/procinfo.h>
++#include <sysdep.h>
+
+ int
+ feenableexcept (int excepts)
+ {
+- if (GLRO (dl_hwcap) & HWCAP_VFP)
++ if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
+ {
+ unsigned long int new_exc, old_exc;
+
+Index: glibc-ports-2.5/sysdeps/arm/eabi/fegetenv.c
+===================================================================
+--- glibc-ports-2.5.orig/sysdeps/arm/eabi/fegetenv.c
++++ glibc-ports-2.5/sysdeps/arm/eabi/fegetenv.c
+@@ -23,12 +23,12 @@
+ #include <unistd.h>
+ #include <ldsodefs.h>
+ #include <dl-procinfo.h>
+-#include <asm/procinfo.h>
++#include <sysdep.h>
+
+ int
+ __fegetenv (fenv_t *envp)
+ {
+- if (GLRO (dl_hwcap) & HWCAP_VFP)
++ if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
+ {
+ unsigned long int temp;
+ _FPU_GETCW (temp);
+Index: glibc-ports-2.5/sysdeps/arm/eabi/fegetexcept.c
+===================================================================
+--- glibc-ports-2.5.orig/sysdeps/arm/eabi/fegetexcept.c
++++ glibc-ports-2.5/sysdeps/arm/eabi/fegetexcept.c
+@@ -24,12 +24,12 @@
+ #include <unistd.h>
+ #include <ldsodefs.h>
+ #include <dl-procinfo.h>
+-#include <asm/procinfo.h>
++#include <sysdep.h>
+
+ int
+ fegetexcept (void)
+ {
+- if (GLRO (dl_hwcap) & HWCAP_VFP)
++ if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
+ {
+ unsigned long temp;
+
+Index: glibc-ports-2.5/sysdeps/arm/eabi/fegetround.c
+===================================================================
+--- glibc-ports-2.5.orig/sysdeps/arm/eabi/fegetround.c
++++ glibc-ports-2.5/sysdeps/arm/eabi/fegetround.c
+@@ -23,12 +23,12 @@
+ #include <unistd.h>
+ #include <ldsodefs.h>
+ #include <dl-procinfo.h>
+-#include <asm/procinfo.h>
++#include <sysdep.h>
+
+ int
+ fegetround (void)
+ {
+- if (GLRO (dl_hwcap) & HWCAP_VFP)
++ if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
+ {
+ unsigned int temp;
+
+Index: glibc-ports-2.5/sysdeps/arm/eabi/feholdexcpt.c
+===================================================================
+--- glibc-ports-2.5.orig/sysdeps/arm/eabi/feholdexcpt.c
++++ glibc-ports-2.5/sysdeps/arm/eabi/feholdexcpt.c
+@@ -23,12 +23,12 @@
+ #include <unistd.h>
+ #include <ldsodefs.h>
+ #include <dl-procinfo.h>
+-#include <asm/procinfo.h>
++#include <sysdep.h>
+
+ int
+ feholdexcept (fenv_t *envp)
+ {
+- if (GLRO (dl_hwcap) & HWCAP_VFP)
++ if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
+ {
+ unsigned long int temp;
+
+Index: glibc-ports-2.5/sysdeps/arm/eabi/fesetenv.c
+===================================================================
+--- glibc-ports-2.5.orig/sysdeps/arm/eabi/fesetenv.c
++++ glibc-ports-2.5/sysdeps/arm/eabi/fesetenv.c
+@@ -23,12 +23,12 @@
+ #include <unistd.h>
+ #include <ldsodefs.h>
+ #include <dl-procinfo.h>
+-#include <asm/procinfo.h>
++#include <sysdep.h>
+
+ int
+ __fesetenv (const fenv_t *envp)
+ {
+- if (GLRO (dl_hwcap) & HWCAP_VFP)
++ if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
+ {
+ unsigned int temp;
+
+Index: glibc-ports-2.5/sysdeps/arm/eabi/fesetround.c
+===================================================================
+--- glibc-ports-2.5.orig/sysdeps/arm/eabi/fesetround.c
++++ glibc-ports-2.5/sysdeps/arm/eabi/fesetround.c
+@@ -23,12 +23,12 @@
+ #include <unistd.h>
+ #include <ldsodefs.h>
+ #include <dl-procinfo.h>
+-#include <asm/procinfo.h>
++#include <sysdep.h>
+
+ int
+ fesetround (int round)
+ {
+- if (GLRO (dl_hwcap) & HWCAP_VFP)
++ if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
+ {
+ fpu_control_t temp;
+
+Index: glibc-ports-2.5/sysdeps/arm/eabi/fraiseexcpt.c
+===================================================================
+--- glibc-ports-2.5.orig/sysdeps/arm/eabi/fraiseexcpt.c
++++ glibc-ports-2.5/sysdeps/arm/eabi/fraiseexcpt.c
+@@ -24,12 +24,12 @@
+ #include <unistd.h>
+ #include <ldsodefs.h>
+ #include <dl-procinfo.h>
+-#include <asm/procinfo.h>
++#include <sysdep.h>
+
+ int
+ feraiseexcept (int excepts)
+ {
+- if (GLRO (dl_hwcap) & HWCAP_VFP)
++ if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
+ {
+ int fpscr;
+ const float fp_zero = 0.0, fp_one = 1.0, fp_max = FLT_MAX,
+Index: glibc-ports-2.5/sysdeps/arm/eabi/fsetexcptflg.c
+===================================================================
+--- glibc-ports-2.5.orig/sysdeps/arm/eabi/fsetexcptflg.c
++++ glibc-ports-2.5/sysdeps/arm/eabi/fsetexcptflg.c
+@@ -24,12 +24,12 @@
+ #include <unistd.h>
+ #include <ldsodefs.h>
+ #include <dl-procinfo.h>
+-#include <asm/procinfo.h>
++#include <sysdep.h>
+
+ int
+ __fesetexceptflag (const fexcept_t *flagp, int excepts)
+ {
+- if (GLRO (dl_hwcap) & HWCAP_VFP)
++ if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
+ {
+ fexcept_t temp;
+
+Index: glibc-ports-2.5/sysdeps/arm/eabi/ftestexcept.c
+===================================================================
+--- glibc-ports-2.5.orig/sysdeps/arm/eabi/ftestexcept.c
++++ glibc-ports-2.5/sysdeps/arm/eabi/ftestexcept.c
+@@ -23,12 +23,12 @@
+ #include <unistd.h>
+ #include <ldsodefs.h>
+ #include <dl-procinfo.h>
+-#include <asm/procinfo.h>
++#include <sysdep.h>
+
+ int
+ fetestexcept (int excepts)
+ {
+- if (GLRO (dl_hwcap) & HWCAP_VFP)
++ if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
+ {
+ fexcept_t temp;
+
+Index: glibc-ports-2.5/sysdeps/arm/eabi/setfpucw.c
+===================================================================
+--- glibc-ports-2.5.orig/sysdeps/arm/eabi/setfpucw.c
++++ glibc-ports-2.5/sysdeps/arm/eabi/setfpucw.c
+@@ -23,12 +23,12 @@
+ #include <unistd.h>
+ #include <ldsodefs.h>
+ #include <dl-procinfo.h>
+-#include <asm/procinfo.h>
++#include <sysdep.h>
+
+ void
+ __setfpucw (fpu_control_t set)
+ {
+- if (GLRO (dl_hwcap) & HWCAP_VFP)
++ if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
+ {
+ fpu_control_t cw;
+
--- /dev/null
+--- util-linux-2.12r.old/mount/umount.c
++++ util-linux-2.12r/mount/umount.c
+@@ -31,7 +31,7 @@
+ #include <arpa/inet.h>
+ #endif
+
+-#if defined(MNT_FORCE) && !defined(__sparc__) && !defined(__arm__)
++#if defined(MNT_FORCE)
+ /* Interesting ... it seems libc knows about MNT_FORCE and presumably
+ about umount2 as well -- need not do anything */
+ #else /* MNT_FORCE */
CXXFLAGS="-O2 -march=i586 -pipe -fomit-frame-pointer"
C2FLAGS="-O2 -march=i586 -mtune=i586 -pipe -fomit-frame-pointer"
CXX2FLAGS="-O2 -march=i586 -mtune=i586 -pipe -fomit-frame-pointer"
+elif [ 'armv5tejl' = $MACHINE -o 'armv5tel' = $MACHINE ]; then
+ echo "`date -u '+%b %e %T'`: Machine is ARM (or equivalent)" >> $LOGFILE
+ MACHINE=arm
+ BUILDTARGET=arm-unknown-linux-gnueabi
+ CFLAGS="-O2 -march=armv5te -fomit-frame-pointer -pipe"
+ CXXFLAGS="$CFLAGS"
+ C2FLAGS="$CFLAGS"
+ CXX2FLAGS="$CXXFLAGS"
else
echo "`date -u '+%b %e %T'`: Can't determine your architecture - $MACHINE" >> $LOGFILE
exit 1
echo -ne "`date -u '+%b %e %T'`: Building $* " >> $LOGFILE
- cd $BASEDIR/lfs && make -s -f $* LFS_BASEDIR=$BASEDIR MESSAGE="$1\t " download >> $LOGFILE 2>&1
+ cd $BASEDIR/lfs && make -s -f $* LFS_BASEDIR=$BASEDIR MACHINE=$MACHINE \
+ MESSAGE="$1\t " download >> $LOGFILE 2>&1
if [ $? -ne 0 ]; then
exiterror "Download error in $1"
fi
- cd $BASEDIR/lfs && make -s -f $* LFS_BASEDIR=$BASEDIR MESSAGE="$1\t md5sum" md5 >> $LOGFILE 2>&1
+ cd $BASEDIR/lfs && make -s -f $* LFS_BASEDIR=$BASEDIR MACHINE=$MACHINE \
+ MESSAGE="$1\t md5sum" md5 >> $LOGFILE 2>&1
if [ $? -ne 0 ]; then
exiterror "md5sum error in $1, check file in cache or signature"
fi