]> git.ipfire.org Git - ipfire-2.x.git/blobdiff - tools/make-functions
Add support to build an ARM toolchain.
[ipfire-2.x.git] / tools / make-functions
index 530cd4737260e882283b341ee7400b43fefad86b..13608085316f66285e9de852cc9fd061346a30ea 100644 (file)
@@ -2,7 +2,7 @@
 ###############################################################################
 #                                                                             #
 # IPFire.org - A linux based firewall                                         #
-# Copyright (C) 2007  Michael Tremer & Christian Schmidt                      #
+# Copyright (C) 2010  IPFire Team  <info@ipfire.org>                          #
 #                                                                             #
 # 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        #
@@ -224,6 +224,14 @@ if [ 'x86_64' = $MACHINE -o 'i686' = $MACHINE -o 'i586' = $MACHINE ]; then
        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
@@ -265,7 +273,7 @@ entershell() {
                exiterror "No such file or directory: $BASEDIR/build/usr/src/lfs/"
        fi
        echo "Entering to a shell inside LFS chroot, go out with exit"
-       chroot $LFS /tools/bin/env -i HOME=/root TERM=$TERM PS1='\u:\w\$ ' \
+       $linux32 chroot $LFS /tools/bin/env -i HOME=/root TERM=$TERM PS1='\u:\w\$ ' \
                PATH=/usr/local/bin:/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin \
                VERSION=$VERSION CONFIG_ROOT=$CONFIG_ROOT \
                NAME="$NAME" SNAME="$SNAME" SLOGAN="$SLOGAN" \
@@ -319,12 +327,14 @@ lfsmakecommoncheck()
 
        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
@@ -728,8 +738,16 @@ update_langs() {
                chmod 755 $BASEDIR/tools/{check_strings.pl,sort_strings.pl,check_langs.sh}
                $BASEDIR/tools/sort_strings.pl en
                $BASEDIR/tools/sort_strings.pl de
+               $BASEDIR/tools/sort_strings.pl fr
+               $BASEDIR/tools/sort_strings.pl es
+               $BASEDIR/tools/sort_strings.pl pl
+               $BASEDIR/tools/sort_strings.pl ru
                $BASEDIR/tools/check_strings.pl en > $BASEDIR/doc/language_issues.en
                $BASEDIR/tools/check_strings.pl de > $BASEDIR/doc/language_issues.de
+               $BASEDIR/tools/check_strings.pl fr > $BASEDIR/doc/language_issues.fr
+               $BASEDIR/tools/check_strings.pl es > $BASEDIR/doc/language_issues.es
+               $BASEDIR/tools/check_strings.pl es > $BASEDIR/doc/language_issues.pl
+               $BASEDIR/tools/check_strings.pl ru > $BASEDIR/doc/language_issues.ru
                $BASEDIR/tools/check_langs.sh > $BASEDIR/doc/language_missings
                beautify message DONE
 }