X-Git-Url: http://gitweb.hugovil.com/?a=blobdiff_plain;f=functions;h=79a57e1b835491bc040e3af9e5ef67b5cdefc27d;hb=07bb6026cea496a885d217cc5f505ca3896d78b8;hp=5d7d083cc24484d73a337d430e61db6d41e0c92a;hpb=aa229d2908422fce286bbd65710e31b086c8a2a2;p=hvlinux.git diff --git a/functions b/functions index 5d7d083..79a57e1 100644 --- a/functions +++ b/functions @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # This file is 'sourced' by other scripts, therefore the above line is of no # use, except when modifying the file in emacs to have syntax highlighting. @@ -22,6 +22,8 @@ BRACKET="\033[1;34m" TAR_OPTS="-b8" +HV_FONTS_PATH="/usr/share/fonts" + # It seems that when compiling bash-4.0, using # "make -j 1" is causing problems... if [ "x${MAKEJOBS}" = "x1" ]; then @@ -31,14 +33,27 @@ else fi case "${HVL_TARGET}" in + arm*) + CLFS_BUILDFLAGS="-mabi=aapcs-linux -mfloat-abi=soft" + CLFS_TARGET="arm-linux-gnueabi" + CLFS_ARCH=$(echo ${CLFS_TARGET} | sed -e 's/-.*//' -e 's/arm.*/arm/g') + CLFS_ENDIAN=$(echo ${CLFS_ARCH} | sed -e 's/armeb/BIG/' -e 's/arm/LITTLE/') + if [ "${CLFS_ENDIAN}" = "LITTLE" ]; then + CLFS_NOT_ENDIAN="BIG" + else + CLFS_NOT_ENDIAN="LITTLE" + fi + ;; "x86_64") CLFS_BUILDFLAGS="-m64" CLFS_TARGET="${HVL_TARGET}-unknown-linux-gnu" + CLFS_ARCH=${HVL_TARGET} ;; "x86") # No special flags CLFS_BUILDFLAGS="" CLFS_TARGET="i686-unknown-linux-gnu" + CLFS_ARCH=${HVL_TARGET} ;; *) echo "Unsupported target architecture: ${HVL_TARGET}" @@ -46,6 +61,11 @@ case "${HVL_TARGET}" in ;; esac +CLFS_HOST="$(echo $MACHTYPE | \ + sed "s/$(echo $MACHTYPE | cut -d- -f2)/cross/")" + +export CLFS_BUILDFLAGS CLFS_TARGET CLFS_ARCH CLFS_HOST CLFS_ENDIAN CLFS_NOT_ENDIAN + CLFS=${LFS} # Extracting the version number from a complete package name. @@ -97,7 +117,7 @@ get_pkg_name() return 1 fi - echo ${1} | sed "s!^\(.*\)-.*!\1!g" + echo ${1} | sed "s!^\(.*\)-[0-9]*\.[0-9]*.*!\1!g" } # Saves the content of CFLAGS and CXXFLAGS environment variables.