Line 1... |
Line 1... |
#!/bin/bash
|
#!/bin/bash
|
|
################################################################################
|
|
##
|
|
## Filename: nlib-script.sh
|
|
##
|
|
## Project: Zip CPU -- a small, lightweight, RISC CPU soft core
|
|
##
|
|
## Purpose: To handle all of the newlib configuration options properly.
|
|
## This runs the newlib C-library configure script, using options
|
|
## that are currently known to work.
|
|
##
|
|
##
|
|
## Creator: Dan Gisselquist, Ph.D.
|
|
## Gisselquist Technology, LLC
|
|
##
|
|
################################################################################
|
|
##
|
|
## Copyright (C) 2016, Gisselquist Technology, LLC
|
|
##
|
|
## This program is free software (firmware): 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 3 of the License, or (at
|
|
## your option) any later version.
|
|
##
|
|
## This program is distributed in the hope that it will be useful, but WITHOUT
|
|
## ANY WARRANTY; without even the implied warranty of MERCHANTIBILITY or
|
|
## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
## for more details.
|
|
##
|
|
## License: GPL, v3, as defined and found on www.gnu.org,
|
|
## http://www.gnu.org/licenses/gpl.html
|
|
##
|
|
##
|
|
################################################################################
|
|
##
|
|
##
|
VERSION="newlib-2.5.0"
|
VERSION="newlib-2.5.0"
|
INSTALL_BASE=`pwd`/install
|
if [[ -z "$INSTALLD" ]]
|
|
then
|
|
INSTALLD=`pwd`/install
|
|
fi
|
|
INSTALL_BASE=${INSTALLD}
|
if [[ ! -d $INSTALL_BASE ]]
|
if [[ ! -d $INSTALL_BASE ]]
|
then
|
then
|
echo "I cant seem to find the install directory," $INSTALL_BASE
|
echo "I cant seem to find the install directory," $INSTALL_BASE
|
exit;
|
exit -1
|
|
fi
|
|
which zip-gcc > /dev/null
|
|
if [[ $? != 0 ]]
|
|
then
|
|
echo "Nlib-script Error: Unable to find zip-gcc in your path"
|
|
echo "PATH=$PATH"
|
|
exit -1
|
fi
|
fi
|
|
|
if [[ -d build-nlib ]]
|
if [[ -d build-nlib ]]
|
then
|
then
|
rm -rf build-nlib
|
rm -rf build-nlib
|
Line 24... |
Line 69... |
CLFS_HOST=$MACHTYPE
|
CLFS_HOST=$MACHTYPE
|
CLFS_TARGET="zip"
|
CLFS_TARGET="zip"
|
GCC_BASE=${INSTALL_BASE}/../build-gcc/
|
GCC_BASE=${INSTALL_BASE}/../build-gcc/
|
PATH=$PATH:${INSTALL_BASE}/cross-tools/bin:${GCC_BASE}/gcc
|
PATH=$PATH:${INSTALL_BASE}/cross-tools/bin:${GCC_BASE}/gcc
|
../$VERSION-zip/configure --prefix=${INSTALL_BASE}/cross-tools \
|
../$VERSION-zip/configure --prefix=${INSTALL_BASE}/cross-tools \
|
--target=${CLFS_TARGET} --host=$MACHTYPE --without-fp
|
--target=${CLFS_TARGET} --host=$MACHTYPE
|
|
|
|
|
No newline at end of file
|
No newline at end of file
|